debug-workflow
Skill6 starsChanged 13 days agoApache-2.0View on GitHub
Execute the Debug Code Change workflow end-to-end with safety gates. Use when debugging code changes, investigating issues, or performing root cause analysis with audit trail.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- tammai/bigin-skillstheir own version, first seen Oct 11, 2026
- shioki/Cursor-Knowledge-Management-Systemtheir own version, first seen Oct 9, 2026
- bibektimilsina00/runmycrewtheir own version, first seen May 19, 2026
- masteranime/n8n-claude-skillstheir own version, first seen Apr 26, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- masteranime/n8n-claude-skills★ 32same name
- bibektimilsina00/runmycrew★ 1same name
- shioki/Cursor-Knowledge-Management-System★ 1same name
- tammai/bigin-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- attributeSkill
- auditSkill
- gap-analysis-workflowSkill
- checkpointSkill
- classifySkill
- compareSkill
- constrainSkill
- critiqueSkill
- decomposeSkill
- delegateSkill
- detectSkill
- digital-twin-bootstrapSkill
- digital-twin-sync-workflowSkill
- discover-capabilitiesSkill
- discoverSkill
- executeSkill
- explainSkill
- generateSkill
- groundSkill
- inquireSkill
- integrateSkill
- invokeSkill
- measureSkill
- mutateSkill
- observeSkill
- persistSkill
- perspective-validationSkill
- planSkill
- predictSkill
- recallSkill
- receiveSkill
- retrieveSkill
- rollbackSkill
- searchSkill
- sendSkill
- simulateSkill
- stateSkill
- synchronizeSkill
- transformSkill
- transitionSkill
- verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 6 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Run the composed workflow debug_code_change (reference/workflow_catalog.yaml) using atomic capability skills to diagnose and fix a bug with …
- Distinctive: line 17
Every step output is grounded with evidence anchors
- Distinctive: line 19
All issues are traced to root cause with supporting evidence
- Distinctive: line 35
Create checkpoint marker: if mutation might occur:
- Very specific: line 36
Create .claude/checkpoint.ok after confirming rollback strategy
- Very specific: line 62
If the fix command fails or times out (R401/R402), roll back to checkpoint_out and end the run with that error
- Distinctive: line 65
Run targeted verification: tests pass, the symptom is resolved, and public interfaces are unchanged
- Very specific: line 67
If verification cannot run (R401/R402 after its retries), roll back to checkpoint_out and end the run with that error
- Very specific: line 276
NEVER proceed to execute without checkpoint and explicit plan
- Distinctive: line 277
STOP and request clarification if any step produces confidence < 0.3
- Distinctive: line 278
ALWAYS verify fix before marking workflow complete
- Very specific: line 293
Never skip /observe to jump directly to /plan
- Very specific: line 294
Never proceed past /critique without addressing identified weaknesses
- Very specific: line 295
Never run /execute without prior /checkpoint
- Very specific: line 296
Never mark complete without /verify confirmation
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intent
Run the composed workflow debug_code_change (reference/workflow_catalog.yaml) using atomic capability skills to diagnose and fix a bug with full safety and audit capabilities.
Success criteria:
- Every step output is grounded with evidence anchors
- Safety gates are respected (checkpoint before any mutation)
- All issues are traced to root cause with supporting evidence
- Final result includes complete audit trail
- Rollback runs only when verification fails
Compatible schemas:
reference/workflow_catalog.yaml
Inputs
| Parameter | Required | Type | Description |
bug | Yes | object | The failure to diagnose and fix: component (where it is), symptom (what goes wrong), fix_command (the command that applies and tests the fix) |
user_input | No | object | domain and constraints (e.g. time budget, files to exclude) |
Procedure
- Create checkpoint marker if mutation might occur:
- Create
.claude/checkpoint.okafter confirming rollback strategy
- Create
- Invoke
/observeonbug.componentand store output asobserve_out- Observe failing behavior, logs, and relevant code paths
- Invoke
/searchforbug.symptomand store output assearch_out- Find related code, configs, and error patterns
- Invoke
/attributewithbug.symptomas the effect and store output asattribute_out- Build the dependency graph and identify causal relationships around the failing component
- Invoke
/constrainonbug.componentand store output asconstrain_out- Define the invariants the fix must keep (existing tests pass, public interfaces unchanged)
- Invoke
/critiqueonattribute_out.causesand store output ascritique_out- List likely failure modes and edge cases
- Invoke
/planwithuser_input.constraints, and the observation, related code, causes and critique (critique_out.issues,critique_out.suggestions) as context, and store output asplan_out- Produce a minimal fix plan with checkpoints
- Invoke
/checkpointonbug.componentand store output ascheckpoint_out- Save a restore point before mutation
- Invoke
/executewithbug.fix_commandand store output asexecute_out- Apply the fix, run tests, and produce a diff summary
- Skip this step when
plan_out.stepsis empty: no fix is applied, and the run goes on to the audit - If the fix command fails or times out (R401/R402), roll back to
checkpoint_outand end the run with that error
- Invoke
/verifyon the component andexecute_out, and store output asverify_out- Run targeted verification: tests pass, the symptom is resolved, and public interfaces are unchanged
- Skip this step when the fix was not applied (
execute_outis null) - If verification cannot run (R401/R402 after its retries), roll back to
checkpoint_outand end the run with that error
- Invoke
/rollbacktocheckpoint_out.checkpoint_idifverify_out.passedis false, and store output asrollback_out- The step is skipped when no fix was applied or verification passes
- The step does not take a checkpoint of its own (
requires_checkpoint: false): it restores the one taken at step 7, which the fix consumed
- Invoke
/auditand store output asaudit_out- Record what changed and why: the component, the causes, the plan, the exit code, the verdict, and whether it was rolled back (
rollback_out.restored; null when the rollback was skipped)
- Record what changed and why: the component, the causes, the plan, the exit code, the verdict, and whether it was rolled back (
Output Contract
Return a structured object:
workflow_id: string # Unique workflow execution ID
bug: object # The bug as given
status: completed | failed | rolled_back
steps:
observe_out:
observation: object
evidence_anchors: array[string]
search_out:
results: array[object]
evidence_anchors: array[string]
attribute_out:
causes: array[object]
strengths: object # Causal strength per cause
evidence_anchors: array[string]
constrain_out:
compliant: boolean
violations: array[object]
evidence_anchors: array[string]
critique_out:
issues: array[object]
evidence_anchors: array[string]
plan_out:
steps: array[object]
risks: array[object]
evidence_anchors: array[string]
checkpoint_out:
checkpoint_id: string
evidence_anchors: array[string]
execute_out:
result: any
evidence_anchors: array[string]
verify_out:
passed: boolean
violations: array[object]
evidence_anchors: array[string]
rollback_out: # null when no fix was applied or verification passed (the step was skipped)
restored: boolean
evidence_anchors: array[string]
audit_out:
audit_id: string
recorded: boolean
evidence_anchors: array[string]
root_cause:
description: string
evidence_anchors: array[string]
resolution:
description: string
files_changed: array[string]
verification: PASS | FAIL
audit_log_pointer: string # Where the audit step appended its record (.claude/audit/records.jsonl)
confidence: number # 0.0-1.0
evidence_anchors: array[string]
assumptions: array[string]Field Definitions
| Field | Type | Description |
workflow_id | string | Unique identifier for this workflow execution |
status | enum | Final workflow status |
steps | object | Each step's output, keyed by its store_as |
root_cause | object | Identified root cause with evidence |
resolution | object | What was done to fix the issue |
verification | enum | Final PASS/FAIL after fix applied |
confidence | number | 0.0-1.0 based on evidence quality |
evidence_anchors | array | All evidence references collected |
assumptions | array | Explicit assumptions made during debugging |
Examples
Example 1: Debug Failing Test After Refactor
Input:
bug:
component: "src/api/handlers/auth.py"
symptom: "test_login_success fails with 401 after the handler refactor"
fix_command: "git apply fix.patch && pytest tests/test_auth.py"
user_input:
constraints:
max_time: "30m"Output:
workflow_id: "debug_20240115_143022"
bug:
component: "src/api/handlers/auth.py"
symptom: "test_login_success fails with 401 after the handler refactor"
fix_command: "git apply fix.patch && pytest tests/test_auth.py"
status: completed
steps:
observe_out:
observation:
failing_test: "tests/test_auth.py::test_login_success"
expected_status: 200
actual_status: 401
evidence_anchors:
- "file:tests/test_auth.py:45"
- "file:src/api/handlers/auth.py:78"
search_out:
results:
- location: "src/api/handlers/auth.py:validate_token"
- location: "src/utils/jwt.py:decode_token"
evidence_anchors:
- "tool:grep:validate_token"
attribute_out:
causes:
- id: signature_after_expiry
cause: "Signature check moved after the expiry check"
strengths:
signature_after_expiry: 0.9
evidence_anchors:
- "tool:git:blame"
constrain_out:
compliant: true
violations: []
evidence_anchors: []
critique_out:
issues:
- issue: "Signature validation after the expiry check rejects valid tokens"
location: "src/api/handlers/auth.py:78-85"
evidence_anchors:
- "file:src/api/handlers/auth.py:78-85"
plan_out:
steps:
- action: "Move the signature check before the expiry check"
verification: "test_login_success passes; no other auth test regresses"
risks: []
evidence_anchors:
- "file:src/api/handlers/auth.py:78"
checkpoint_out:
checkpoint_id: "chk_20240115_143000"
evidence_anchors:
- "tool:git:stash"
execute_out:
result: "patch applied; 12 passed"
evidence_anchors:
- "tool:bash:git apply fix.patch && pytest tests/test_auth.py"
verify_out:
passed: true
violations: []
evidence_anchors:
- "tool:bash:pytest tests/test_auth.py"
rollback_out: null # skipped: verification passed
audit_out:
audit_id: "audit_20240115_143500"
recorded: true
evidence_anchors:
- "file:.claude/audit/records.jsonl"
root_cause:
description: "Token signature validation was moved after expiry check during refactor, causing valid tokens to be rejected before signature verification"
evidence_anchors:
- "file:src/api/handlers/auth.py:78-85"
- "tool:git:blame"
resolution:
description: "Restored original validation order: signature check before expiry check"
files_changed:
- "src/api/handlers/auth.py"
verification: PASS
audit_log_pointer: ".claude/audit/records.jsonl"
confidence: 0.95
evidence_anchors:
- "file:tests/test_auth.py:45"
- "file:src/api/handlers/auth.py:78-85"
- "tool:bash:pytest"
- "tool:git:diff"
assumptions:
- "Test environment matches production configuration"
- "No concurrent changes to auth module"Evidence pattern: Combined code inspection, git blame for change attribution, test execution for verification.
Verification
- Step Completeness: All 11 workflow steps executed with output (execute and verify skipped when the plan had no steps; rollback skipped when nothing was applied or verification passed)
- Evidence Grounding: Every step output includes evidence_anchors
- Checkpoint Created: Mutation steps preceded by checkpoint
- Root Cause Identified: root_cause has specific description and evidence
- Verification Passed: verify_out.passed is true before completion
- Audit Trail: audit_log_pointer points to valid log file
- Rollback Ready: checkpoint_out.checkpoint_id recorded before the fix ran
Verification tools: Bash (for test execution), Git (for change verification), Read (for audit log)
Safety Constraints
mutation: truerequires_checkpoint: truerequires_approval: true (theexecutestep that applies the fix)risk: high
Capability-specific rules:
- NEVER proceed to
executewithout checkpoint and explicit plan - STOP and request clarification if any step produces confidence < 0.3
- ALWAYS verify fix before marking workflow complete
- Record the checkpoint before any mutation
- Preserve original error state for comparison
Composition Patterns
Commonly follows:
receive- After receiving bug report or error notificationretrieve- After fetching relevant context or logs
Commonly precedes:
explain- To create debug report for stakeholderssend- To notify team of resolution
Anti-patterns:
- Never skip
/observeto jump directly to/plan - Never proceed past
/critiquewithout addressing identified weaknesses - Never run
/executewithout prior/checkpoint - Never mark complete without
/verifyconfirmation
Workflow references:
- See
reference/workflow_catalog.yaml#debug_code_changefor step definitions - See
reference/composition_patterns.md#checkpoint-act-verify-rollbackfor CAVR pattern
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

