/agent-capability-standard:mutate [target] [operation] [checkpoint_id]from agent-capability-standard
Change persistent state with checkpoint and rollback support. Use when modifying files, updating databases, changing configuration, or any operation that permanently alters state.
Ships in agent-capability-standard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Make controlled changes to persistent state with safety guarantees. This is the primary capability for modifications and REQUIRES a checkpoint for rollback capability.
CRITICAL: This capability requires checkpoint to have been called first.
Success criteria:
Compatible schemas:
schemas/output_schema.yaml| Parameter | Required | Type | Description |
|---|---|---|---|
target | Yes | string | What to modify (file path, resource identifier) |
operation | Yes | object | The modification to apply |
checkpoint_id | Yes | string | Checkpoint ID for rollback (from checkpoint capability) |
Verify checkpoint exists: Ensure recovery is possible
Capture previous state: Record what will change
Apply mutation: Make the change
Verify change: Confirm mutation succeeded
Record mutation: Document what changed
Return result: Provide complete mutation record
Return a structured object:
success: boolean # Whether mutation completed
target: string # What was modified
operation: string # What was done
previous_state:
snapshot: any # State before mutation
captured_at: string # When captured
new_state:
snapshot: any # State after mutation
verified_at: string # When verified
diff:
type: string # unified, structural, summary
content: string # The actual diff
checkpoint_id: string # For rollback reference
rollback_command: string # How to undo this change
evidence_anchors: ["file:line", "command:output"]
| Field | Type | Description |
|---|---|---|
success | boolean | Whether mutation completed successfully |
target | string | Resource that was modified |
operation | string | Description of the change |
previous_state | object | State before modification |
new_state | object | State after modification |
diff | object | Difference between states |
checkpoint_id | string | Reference for rollback |
rollback_command | string | How to undo the change |
Input:
target: "src/services/user_service.rb"
operation:
type: "edit"
description: "Add null check for user parameter"
changes:
- line: 42
old: "user.email"
new: "user&.email"
checkpoint_id: "chk-20240115-001"
Output:
success: true
target: "src/services/user_service.rb"
operation: "Added safe navigation operator for null user handling"
previous_state:
snapshot: "def get_email(user)\n user.email\nend"
captured_at: "2024-01-15T10:30:00Z"
new_state:
snapshot: "def get_email(user)\n user&.email\nend"
verified_at: "2024-01-15T10:30:01Z"
diff:
type: "unified"
content: |
@@ -42 +42 @@
- user.email
+ user&.email
checkpoint_id: "chk-20240115-001"
rollback_command: "git checkout src/services/user_service.rb"
evidence_anchors:
- "src/services/user_service.rb:42"
Input:
target: "users table"
operation:
type: "sql"
description: "Add status column with default value"
sql: "ALTER TABLE users ADD COLUMN status VARCHAR(20) DEFAULT 'active'"
checkpoint_id: "chk-20240115-002"
Output:
success: true
target: "users table"
operation: "Added status column with default 'active'"
previous_state:
snapshot:
columns: ["id", "email", "created_at"]
captured_at: "2024-01-15T11:00:00Z"
new_state:
snapshot:
columns: ["id", "email", "created_at", "status"]
verified_at: "2024-01-15T11:00:05Z"
diff:
type: "structural"
content: "+ status VARCHAR(20) DEFAULT 'active'"
checkpoint_id: "chk-20240115-002"
rollback_command: "ALTER TABLE users DROP COLUMN status"
evidence_anchors:
- "command:psql:schema_after"
Input:
target: "config/database.yml"
operation:
type: "edit"
description: "Update connection pool size"
checkpoint_id: "chk-20240115-003"
Output:
success: false
target: "config/database.yml"
operation: "Update connection pool size (FAILED)"
previous_state:
snapshot: "pool: 5"
captured_at: "2024-01-15T12:00:00Z"
new_state:
snapshot: null
verified_at: null
diff:
type: "none"
content: "Mutation failed: file locked by another process"
checkpoint_id: "chk-20240115-003"
rollback_command: "N/A - mutation did not complete"
evidence_anchors:
- "error:file_locked"
error:
message: "File locked by another process"
recoverable: true
suggestion: "Retry after process releases lock"
Verification tools: Read (to verify state changes)
mutation: truerequires_checkpoint: truerequires_approval: truerisk: highCapability-specific rules:
Commonly follows:
checkpoint - REQUIRED before any mutationplan - Mutations execute planned changesverify - Verify preconditions before mutatingCommonly precedes:
verify - Verify mutation resultsaudit - Record mutation for audit trailrollback - Undo mutation if verification failsAnti-patterns:
Workflow references:
reference/workflow_catalog.yaml#debug_code_change for mutation in bug fixesreference/workflow_catalog.yaml#digital_twin_sync_loop for mutation in sync loopsWhat SKILL.md sets; muted values are Claude Code's defaults
general-purpose), in the backgroundagent-capability-standard@synapti-marketplace is listed by synaptiai/synapti-marketplace — review the source before installing
npx claudepluginhub synaptiai/synapti-marketplace --plugin agent-capability-standard42 skills in this plugin
/attributeEstablish cause-effect relationships between events or states. Use when analyzing root causes, mapping dependencies, tracing effects, or building causal models./auditProduce a comprehensive audit trail of actions, tools used, changes made, and decision rationale. Use when recording compliance evidence, tracking changes, or documenting decision lineage./gap-analysis-workflowIdentify capability gaps and propose new skills with prioritization. Use when analyzing missing capabilities, planning skill development, performing ontology expansion, or assessing coverage.Other plugins' skills for the same job