Skip to content

Instantly share code, notes, and snippets.

@gsannikov
Created February 24, 2026 20:14
Show Gist options
  • Select an option

  • Save gsannikov/3fd3ec5a3674976d5517922db316755a to your computer and use it in GitHub Desktop.

Select an option

Save gsannikov/3fd3ec5a3674976d5517922db316755a to your computer and use it in GitHub Desktop.
Claude Code Capability Audit Prompt — workflow that audits your agent patterns against latest platform features and suggests migrations
description visibility adaptive last_audit
Audit workflows against latest agent capabilities and suggest migrations + cross-agent parity
ops
true
2026-02-24

/ops-refactor

Workflow Capability Refactor

Audits Augur workflows, skills, and orchestration patterns against the latest Claude Code capabilities, then suggests concrete migrations. Also identifies behaviors that should be ported to other agents (Cursor, Windsurf, Gemini CLI, etc.) for cross-agent parity.

Usage

  • /ops-refactor — Full audit (both capability migration + cross-agent parity)
  • /ops-refactor capabilities — Only Part 1: new capability migration suggestions
  • /ops-refactor parity — Only Part 2: cross-agent portability suggestions
  • /ops-refactor <workflow> — Deep-dive a specific workflow/skill for migration opportunities

Part 1: Capability Migration Audit

Step 1: Research Latest Capabilities

Use web search to check the latest Claude Code changelog and docs for new/updated features. Focus on these categories:

Category What to Look For
Skills system Hot-reload, context: fork, custom agent routing, frontmatter hooks
Agent Teams Native multi-agent coordination, task dependencies, teammate communication
Hooks New lifecycle events (WorktreeCreate/Remove), async hooks, frontmatter-scoped hooks
Worktrees isolation: worktree in subagent frontmatter, --worktree CLI flag
MCP Lazy loading / Tool Search, list_changed notifications, wildcard permissions
Permissions Wildcard rules, managed policies, unreachable rule detection
Background Ctrl+B backgrounding, cloud tasks (& prefix), /teleport
SDK / Headless -p / --print modes, session persistence, CI/CD patterns
Plugins Marketplace distribution, bundled MCP servers, auto-update

Save findings to a temporary scratchpad for comparison in Step 2.

Step 2: Inventory Current Patterns

Scan the current codebase for patterns that map to the capability categories above.

# Orchestration patterns (swarm, offload, actions)
echo "=== Orchestration ==="
ls plugins/ai/skills/ai_bridge/augur/data/agent-workflows/orch-*.md
find plugins/*/skills/*/augur/data/actions -name "*.yaml" 2>/dev/null | head -20

# Subagent/dispatch patterns
echo "=== Subagent Dispatch ==="
grep -rl "dispatch:" plugins/*/skills/*/augur/data/actions/*.yaml 2>/dev/null | head -20

# Hook usage
echo "=== Hooks ==="
ls .claude/hooks.json 2>/dev/null
cat .claude/settings.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print(json.dumps(d.get('hooks',{}), indent=2))" 2>/dev/null

# Worktree patterns
echo "=== Worktree ==="
grep -rl "worktree" plugins/ai/skills/ai_bridge/augur/data/agent-workflows/*.md 2>/dev/null

# MCP tool surface
echo "=== MCP Tools ==="
find plugins/*/skills/*/mcp -name "*.py" 2>/dev/null | wc -l

# Skill definitions
echo "=== Skills ==="
find plugins/*/skills/*/augur/data/skills -name "SKILL.md" 2>/dev/null | wc -l

# Custom agents
echo "=== Agents ==="
ls .claude/agents/*.md 2>/dev/null

Step 3: Gap Analysis

For each capability category, compare current implementation against the latest available feature. Classify each gap:

Classification Meaning
MIGRATE Direct replacement exists — current custom code can be replaced by a native feature
ENHANCE Current pattern works but a new feature would make it significantly better
EXPLORE New capability has no current equivalent — worth evaluating
SKIP Already using the latest pattern, or not applicable

Step 4: Generate Migration Report

For each non-SKIP finding, produce:

### [Category]: [Finding Title]

**Classification**: MIGRATE | ENHANCE | EXPLORE
**Impact**: HIGH | MEDIUM | LOW
**Current pattern**: <what we do now>
**New capability**: <what's available>
**Migration path**:
1. <specific step>
2. <specific step>
**Files to change**: <list of files>
**Est. effort**: <S/M/L>
**Risk**: <what could break>

Step 5: Priority Matrix

Rank all findings by impact/effort:

| # | Finding | Class | Impact | Effort | Priority |
|---|---------|-------|--------|--------|----------|
| 1 | ... | MIGRATE | HIGH | S | P0 |
| 2 | ... | ENHANCE | HIGH | M | P1 |

Priority formula: P0 = HIGH impact + S effort, P1 = HIGH impact + M effort OR MEDIUM impact + S effort, P2 = everything else.

Known Migration Candidates (Adaptive)

Patterns confirmed in previous runs. Check these first as quick wins:

Current Pattern New Capability Classification
Custom swarm orchestration (/orch-swarm) Native Agent Teams with task dependencies MIGRATE
Global hooks in .claude/settings.json Frontmatter-scoped hooks per skill/agent ENHANCE
Manual worktree management in /dev-merge isolation: worktree in subagent frontmatter ENHANCE
Custom MCP tool discovery in /start MCP Tool Search lazy loading (95% context reduction) MIGRATE
Offload dispatcher for multi-agent routing Agent Teams with model routing per teammate EXPLORE
sync_agents.py generating IDE configs Skills hot-reload + AgentSkills.io standard EXPLORE
Custom slash command registry in registry.yaml Native skills system with / invocation ENHANCE
Worktree registry cleanup scripts WorktreeCreate/WorktreeRemove hooks MIGRATE
Manual context checkpoint (/context-save) context: fork in skill frontmatter ENHANCE
Sequential action workflows Background agents + task dependencies ENHANCE

Part 2: Cross-Agent Parity

Step 1: Read Current Feature Matrix

# Find latest client feature matrix
ls -t plugins/ai/skills/ai_bridge/augur/client-feature-matrix-*.md 2>/dev/null | head -1

Read the matrix. If none exists, build one from the adapter implementations:

# Check what adapters sync_agents.py supports
grep -n "adapter\|agent_type\|ide_type" plugins/ai/skills/ai_bridge/scripts/sync_agents.py | head -30

Step 2: Identify Portable Behaviors

For each Augur capability that works in Claude Code, classify portability to other agents:

Behavior Mechanism in Claude Code Portable Via
Slash commands Workflow .md files Skills/commands (Cursor, Windsurf have their own formats)
Agent rules CLAUDE.md + topic docs .cursorrules, .windsurfrules, .gemini/STYLE.md
MCP tools MCP servers Universal (all agents support MCP)
Hooks hooks lifecycle events Limited (Cursor has some, others don't)
Subagents Task tool / .claude/agents/ Not portable (agent-specific)
Skills .claude/skills/ SKILL.md AgentSkills.io (if other agents adopt)
Background tasks Ctrl+B, & prefix Not portable

Step 3: Parity Gap Report

For each non-Claude agent, produce:

### [Agent Name] (e.g., Cursor, Windsurf, Gemini CLI)

**Current adapter**: <file path in sync_agents.py>
**Sync coverage**: X% of Claude Code features

| Feature | Claude Code | This Agent | Gap | Portable? |
|---------|-------------|-----------|-----|-----------|
| Slash commands | Yes (42 commands) | Partial (rules only) | Workflow execution | Via rules file |
| MCP tools | Yes (358 tools) | Yes | None | Universal |
| ... | ... | ... | ... | ... |

**Recommended implementations**:
1. <what to build/port and how>

Step 4: Implementation Suggestions

For behaviors worth porting, provide:

  1. What: The specific behavior to implement
  2. Why: What the user gains in the other agent
  3. How: Concrete implementation approach (e.g., "add to .cursorrules", "create MCP server", "write adapter in sync_agents.py")
  4. Effort: S/M/L
  5. Priority: Based on how often the user uses that agent

Focus on the 80/20 — the ~5 behaviors that would give the most value across the most agents.

Output Format

Full Report Structure

# Workflow Capability Refactor Report — [DATE]

## Part 1: Capability Migrations

### Summary
- Total patterns audited: N
- MIGRATE: N (replace custom with native)
- ENHANCE: N (improve existing)
- EXPLORE: N (evaluate new)
- SKIP: N (already current)
- Est. total token savings: NK/session
- Est. total latency savings: Ns/invocation

### Priority Matrix
{table from Step 5}

### Detailed Findings
{one section per finding from Step 4}

## Part 2: Cross-Agent Parity

### Agent Coverage Summary
| Agent | Current Parity | Top Gap |
|-------|---------------|---------|
| Cursor | X% | ... |
| Windsurf | X% | ... |
| Gemini CLI | X% | ... |

### Per-Agent Reports
{one section per agent from Step 3}

### Top 5 Parity Implementations
{ranked list from Step 4}

## Recommended Next Steps
1. [Immediate] ...
2. [This week] ...
3. [Backlog] ...

Severity Classification

Severity Criteria
HIGH Native feature directly replaces custom code, saving >10K tokens or >30s per invocation
MEDIUM Enhancement improves existing pattern, saving 3-10K tokens or 10-30s
LOW Minor improvement or exploratory — worth tracking but not urgent

Key Files Referenced

Pattern Purpose
plugins/ai/skills/ai_bridge/augur/data/agent-workflows/*.md Workflow definitions
plugins/ai/skills/ai_bridge/scripts/sync_agents.py IDE adapter sync
plugins/ai/skills/ai_bridge/augur/client-feature-matrix-*.md Client feature comparison
plugins/*/skills/*/augur/data/actions/*.yaml Action dispatch modes
plugins/*/skills/*/augur/data/actions/*.yaml Action dispatch definitions
.claude/settings.json Current hooks and permissions
.claude/agents/*.md Custom subagent definitions
config/system/llm.yaml LLM routing config

This workflow records findings and updates its Known Migration Candidates table after each run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment