Workflow Skills
Persistent history and rollback system for AI operations ("Time Machine").
Allows tagging tasks, snapshotting objects before modification, and undoing specific tasks even after Editor restarts.
NEW: Session-level undo - Group all changes from a conversation and undo them together.
Guardrails
Mode: Semi-Auto (available by default)
DO NOT (common hallucinations):
- does not exist → use to end and save a task
- does not exist → use (by taskId) or (by sessionId)
- does not exist → use
- is deprecated → use
Routing:
- For simple undo/redo (1 step) → / (editor module)
- For multi-step undo → with parameter (this module)
- For conversation-level undo → (this module)
Bookmark Skills
Save current selection and scene view position as a bookmark.
| Parameter | Type | Required | Default | Description |
|---|
| bookmarkName | string | Yes | - | Name for the bookmark |
| note | string | No | null | Optional note for the bookmark |
Returns: { success, bookmark, selectedCount, hasSceneView, note }
Restore selection and scene view from a bookmark.
| Parameter | Type | Required | Default | Description |
|---|
| bookmarkName | string | Yes | - | Name of the bookmark to restore |
Returns: { success, bookmark, restoredSelection, note }
List all saved bookmarks.
No parameters.
Returns: { success, count, bookmarks: [{ name, selectedCount, hasSceneView, note, createdAt }] }
Delete a bookmark.
| Parameter | Type | Required | Default | Description |
|---|
| bookmarkName | string | Yes | - | Name of the bookmark to delete |
History Skills
Undo the last operation (or multiple steps).
| Parameter | Type | Required | Default | Description |
|---|
| steps | int | No | 1 | Number of undo steps to perform |
Redo the last undone operation (or multiple steps).
| Parameter | Type | Required | Default | Description |
|---|
| steps | int | No | 1 | Number of redo steps to perform |
Get the name of the current undo group.
No parameters.
Returns: { success, currentGroup, groupIndex }
Planning And Batch Governance
Generate a combined execution plan for multiple skills on the server side.
| Parameter | Type | Required | Default | Description |
|---|
| string | Yes | - | JSON array of { "name": "...", "params": { ... } }
entries |
Returns: { totalSteps, totalRisk, steps, dependencies, warnings, mayDisconnect }
Query project assets with filters that are useful before batch cleanup or migration work.
| Parameter | Type | Required | Default | Description |
|---|
| string | No | - | Extra filter text |
| string | No | | Search root |
| string | No | - | Asset type filter such as or |
| string | No | - | Regex applied to file name without extension |
| string | No | - | Asset label filter such as |
| int | No | | Max assets returned |
Returns: { count, totalMatched, summary, assets }
Retry only the failed items from an earlier batch execution report. This now reuses the original operation context stored in the report.
| Parameter | Type | Required | Default | Description |
|---|
| string | Yes | - | Source report ID from / |
| bool | No | | Return a immediately or wait for completion |
| int | No | | Chunk size for retry execution |
Returns: { status, jobId?, retryCount, originalReportId, reportId? }
Session Management (Conversation-Level Undo)
Start a new session (conversation-level). All changes will be tracked and can be undone together.
Call this at the beginning of each conversation.
| Parameter | Type | Required | Default | Description |
|---|
| tag | string | No | null | Label for the session |
Returns: { success, sessionId, message }
End the current session and save all tracked changes.
Call this at the end of each conversation.
No parameters.
Returns: { success, sessionId, message }
Undo all changes made during a specific session (conversation-level undo).
| Parameter | Type | Required | Default | Description |
|---|
| sessionId | string | No | null | The UUID of the session to undo. If not provided, undoes the most recent session |
Returns: { success, sessionId, message }
List all recorded sessions (conversation-level history).
No parameters.
Returns: { success, count, currentSessionId, sessions: [{ sessionId, taskCount, totalChanges, startTime, endTime, tags }] }
Get the current session status.
No parameters.
Returns: { success, hasActiveSession, currentSessionId, isRecording, currentTaskId, currentTaskTag, currentTaskDescription, snapshotCount }
Task-Level Skills
Start a new persistent workflow task to track changes for undo. Call workflow_task_end when done.
| Parameter | Type | Required | Default | Description |
|---|
| tag | string | Yes | - | Short label for the task (e.g., "Create NPC") |
| description | string | No | "" | Detailed description or prompt |
Returns: { success, taskId, message }
End the current workflow task and save it. Requires an active task (call workflow_task_start first).
No parameters.
Returns: { success, taskId, snapshotCount, message }
Manually snapshot an object's state before modification. Requires an active task (call workflow_task_start first).
Call this BEFORE , , etc.
| Parameter | Type | Required | Default | Description |
|---|
| name | string | No | null | Name of the Game Object |
| instanceId | int | No | 0 | Instance ID of the object (preferred) |
Returns: { success, objectName, type }
workflow_snapshot_created
Record a newly created object for undo tracking. Requires an active task (call workflow_task_start first).
Note: and
automatically record created objects, so you typically don't need to call this manually.
| Parameter | Type | Required | Default | Description |
|---|
| name | string | No | null | Name of the Game Object |
| instanceId | int | No | 0 | Instance ID of the object (preferred) |
Returns: { success, objectName, type }
List persistent workflow history.
No parameters.
Returns: { success, count, history: [{ id, tag, description, time, changes }] }
Undo changes from a specific task (restore to previous state). The undone task is saved and can be redone later.
| Parameter | Type | Required | Default | Description |
|---|
| taskId | string | Yes | - | The UUID of the task to undo |
Redo a previously undone task (restore changes).
| Parameter | Type | Required | Default | Description |
|---|
| taskId | string | No | null | The UUID of the task to redo. If not provided, redoes the most recently undone task |
List all undone tasks that can be redone.
No parameters.
Returns: { success, count, undoneStack: [{ id, tag, description, time, changes }] }
(deprecated) Alias for
. Use
instead.
| Parameter | Type | Required | Default | Description |
|---|
| taskId | string | Yes | - | The UUID of the task to undo |
Delete a task from history (does not revert changes, just removes the record).
| Parameter | Type | Required | Default | Description |
|---|
| taskId | string | Yes | - | The UUID of the task to delete |
Minimal Example
python
import unity_skills
# Session-level: wrap entire conversation for bulk undo
unity_skills.call_skill("workflow_session_start", tag="Build Player")
unity_skills.call_skill("gameobject_create", name="Player", primitiveType="Capsule")
unity_skills.call_skill("component_add", name="Player", componentType="Rigidbody")
unity_skills.call_skill("workflow_session_end")
# Later: undo entire session
sessions = unity_skills.call_skill("workflow_session_list")
unity_skills.call_skill("workflow_session_undo", sessionId=sessions["sessions"][0]["sessionId"])
Auto-Tracked Operations
The following operations are automatically tracked for undo when a session/task is active:
- /
- /
gameobject_duplicate_batch
- /
- (canvas, button, text, image, etc.)
- /
- /
For modification operations, the system auto-snapshots target objects before changes when possible.
Exact Signatures
Exact names, parameters, defaults, and returns are defined by
or
unity_skills.get_skill_schema()
, not by this file.