From pro-workflow
Orchestrates AI coding workflows with self-correction loops, pre-flight discipline rules, and cross-agent support for Claude Code and other agents.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pro-workflow:pro-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Complete AI coding workflow system from production use. Orchestration patterns, reference guides, and battle-tested habits that compound over time.
Complete AI coding workflow system from production use. Orchestration patterns, reference guides, and battle-tested habits that compound over time.
Works with: Claude Code, Cursor, Codex, Gemini CLI, and 32+ AI coding agents via SkillKit. Sections marked (Claude Code) use features specific to Claude Code — Cursor users can skip those or use the noted alternatives.
"80% of my code is written by AI, 20% is spent reviewing and correcting it." — Karpathy
This skill optimizes for that ratio. Every pattern here reduces correction cycles.
The single most powerful pattern. Your CLAUDE.md trains itself through corrections.
When you correct Claude:
## Self-Correction Protocol
When the user corrects me or I make a mistake:
1. Acknowledge specifically what went wrong
2. Propose a concise rule: `[LEARN] Category: One-line rule`
3. Wait for approval before adding to LEARNED section
### LEARNED
<!-- Auto-populated through corrections -->
User: You edited the wrong file
Claude: I edited src/utils.ts when you meant src/lib/utils.ts.
[LEARN] Navigation: Confirm full path before editing files with common names.
Should I add this?
Self-correction catches mistakes after the fact. This catches them before.
Karpathy's observations on LLM coding pitfalls name the upstream failures: silent assumptions, overcomplicated diffs, drive-by edits, vague success criteria. Four rules prevent each one.
| Rule | Prevents |
|---|---|
| Surface, don't assume | Wrong interpretation, hidden confusion, missing tradeoffs |
| Minimum viable code | 200-line diffs that should be 50, speculative abstractions |
| Stay in your lane | Drive-by refactors, "improvements" to adjacent code |
| Verifiable goals | Endless re-clarification, "make it work" loops |
Full rules in rules/pre-flight-discipline.mdc (alwaysApply: true). Pairs with self-correction: pre-flight stops the mistake, self-correction captures the lesson when one slips through.
## Pre-Flight Discipline
Before coding: state assumptions, present ambiguity, push back if simpler exists.
Every changed line traces to the request - no drive-by edits.
Convert imperatives to verifiable goals: "fix bug" → "failing test → make it pass".
Zero dead time. While one Claude thinks, work on something else.
Claude Code:
claude --worktree # or claude -w (auto-creates isolated worktree)
Cursor / Any editor:
git worktree add ../project-feat feature-branch
git worktree add ../project-fix bugfix-branch
Ctrl+F — Kill all background agents (two-press confirmation)Ctrl+B — Send task to backgroundisolation: worktree in agent frontmatter| Scenario | Action |
|---|---|
| Waiting on tests | Start new feature in worktree |
| Long build | Debug issue in parallel |
| Exploring approaches | Try 2-3 simultaneously |
## Parallel Work
When blocked on long operations, use `claude -w` for instant parallel sessions.
Subagents with `isolation: worktree` get their own safe working copy.
End sessions with intention. Capture learnings, verify state.
git status, tests, lint~/.claude/commands/wrap-up.md:
Execute wrap-up checklist:
1. `git status` - uncommitted changes?
2. `npm test -- --changed` - tests passing?
3. What was learned this session?
4. Propose LEARNED additions
5. One-paragraph summary
For complex projects, modularize Claude memory.
.claude/
├── CLAUDE.md # Entry point
├── AGENTS.md # Workflow rules
├── SOUL.md # Style preferences
└── LEARNED.md # Auto-populated
# Workflow Rules
## Planning
Plan mode when: >3 files, architecture decisions, multiple approaches.
## Quality Gates
Before complete: lint, typecheck, test --related.
## Subagents
Use for: parallel exploration, background tasks.
Avoid for: tasks needing conversation context.
# Style
- Concise over verbose
- Action over explanation
- Acknowledge mistakes directly
- No features beyond scope
Batch reviews at checkpoints, not every change.
## Review Checkpoints
Pause for review at: plan completion, >5 file edits, git operations, auth/security code.
Between: proceed with confidence.
Opus 4.6 and Sonnet 4.6 both support adaptive thinking and 1M-token context (as of 2025-08). The 1M context is available as a beta option (via the context-1m-2025-08-07 beta header); the default context window remains 200K. Sonnet 4.5 (200K context) has been retired from the Max plan in favor of Sonnet 4.6. See Models overview for current capabilities.
| Task | Model |
|---|---|
| Quick fixes, exploration | Haiku 4.5 |
| Features, balanced work | Sonnet 4.6 |
| Refactors, architecture | Opus 4.6 |
| Hard bugs, multi-system | Opus 4.6 |
Opus 4.6 and Sonnet 4.6 automatically calibrate reasoning depth per task — lightweight for simple operations, deep analysis for complex problems. No configuration needed. Extended thinking is built-in.
## Model Hints (as of 2025-08)
Opus 4.6 and Sonnet 4.6 auto-calibrate reasoning depth — no need to toggle thinking mode.
Use subagents with Haiku for fast read-only exploration, Sonnet 4.6 for balanced work.
Docs: https://docs.anthropic.com/en/docs/about-claude/models/overview
200k tokens is precious. Manage it.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50Auto-document insights from sessions.
## Learning Log
After tasks, note learnings:
`[DATE] [TOPIC]: Key insight`
Append to .claude/learning-log.md
Run /learn for a topic-by-topic guide covering sessions, context, CLAUDE.md, subagents, hooks, and more (see commands/learn.md). Official docs: https://code.claude.com/docs/
Add to your CLAUDE.md:
## Pro Workflow
### Self-Correction
When corrected, propose rule → add to LEARNED after approval.
### Planning
Multi-file: plan first, wait for "proceed".
### Quality
After edits: lint, typecheck, test.
### LEARNED
git clone https://github.com/rohitg00/pro-workflow.git /tmp/pw
cp -r /tmp/pw/templates/split-claude-md/* ./.claude/
cp -r /tmp/pw/commands/* ~/.claude/commands/
Pro-workflow includes automated hooks to enforce the patterns. Cursor users get equivalent enforcement through .mdc rules in the rules/ directory.
| Trigger | Action |
|---|---|
| Edit/Write | Track edit count, remind at 5/10 edits |
| git commit | Remind to run quality gates |
| git push | Remind about /wrap-up |
| Trigger | Action |
|---|---|
| Code edit (.ts/.js/.py/.go) | Check for console.log, TODOs, secrets |
| Test commands | Suggest [LEARN] from failures |
| Hook | Action |
|---|---|
| SessionStart | Load LEARNED patterns, show worktree count |
| Stop | Context-aware reminders using last_assistant_message |
| SessionEnd | Check uncommitted changes, prompt for learnings |
| ConfigChange | Detect when quality gates or hooks are modified mid-session |
# Copy hooks to your settings
cp ~/skills/pro-workflow/hooks/hooks.json ~/.claude/settings.local.json
# Or merge with existing settings
Based on Twitter thread insights:
Switch modes based on what you're doing.
| Context | Trigger | Behavior |
|---|---|---|
| dev | "Let's build" | Code first, iterate fast |
| review | "Review this" | Read-only, security focus |
| research | "Help me understand" | Explore, summarize, plan |
Use: "Switch to dev mode" or load context file.
Specialized subagents for focused tasks.
| Agent | Purpose | Tools |
|---|---|---|
| planner | Break down complex tasks | Read-only |
| reviewer | Code review, security audit | Read + test |
Use planner agent when:
Use reviewer agent when:
Create project-specific subagents in .claude/agents/ or user-wide in ~/.claude/agents/:
/agents to create, edit, and manage interactivelyCoordinate multiple Claude Code sessions as a team:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1Shift+Down to navigate, wraps around) or split panes (tmux/iTerm2)The most powerful pattern for complex features. Three layers, each with a single job.
Command (user-facing entry point)
└── Agent (execution, constrained tools, preloaded skills)
└── Skill (domain knowledge, injected at startup)
For features touching >5 files or needing architecture decisions:
All four phases run in order. Each phase requires explicit user approval before the next phase begins.
# Agent frontmatter
skills: ["api-conventions", "project-patterns"]
Full skill content injected at agent startup. Use for knowledge the agent always needs.
Skills with user-invocable: true are called via /skill-name. Use context: fork for isolated execution that doesn't pollute main context.
| Scenario | Pattern |
|---|---|
| Feature > 5 files | /develop with orchestrator |
| Bug investigation | debugger agent |
| Quick exploration | scout agent (background) |
| Code review | reviewer agent |
| Simple task | Just do it directly |
/doctor if things feel off/compact at 50% — don't wait for auto-compactultrathink in prompts for maximum reasoning/rename for easy /resume/wrap-up to capture learningsCLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 for proactive compaction.mcp.json at project root)npx skillkit translate pro-workflow --agent cursorStart with 3 MCPs. Add only for concrete needs.
Essential:
context7 — Live documentation lookupplaywright — Browser automation (most token-efficient)github — PRs, issues, code searchSee mcp-config.example.json for setup and curated recommendations.
| Command | Purpose | Cursor Equivalent |
|---|---|---|
/wrap-up | End-of-session ritual | wrap-up skill |
/learn-rule | Extract correction to memory | learn-rule skill |
/develop | Multi-phase feature build | orchestrate skill |
/doctor | Health check | — |
/commit | Smart commit with quality gates | smart-commit skill |
/insights | Session analytics and patterns | insights skill |
/replay | Surface past learnings | replay-learnings skill |
/handoff | Session handoff document | session-handoff skill |
/search | Search learnings by keyword | — |
/list | List all stored learnings | — |
/learn | Topic-by-topic Claude Code guide | — |
Deep dives on configuration and features:
| Guide | Topics |
|---|---|
docs/settings-guide.md | All settings keys, permission modes, hierarchy, sandbox, env vars |
docs/cli-cheatsheet.md | Every CLI flag, keyboard shortcut, slash command |
docs/orchestration-patterns.md | Command > Agent > Skill architecture, frontmatter reference |
docs/context-loading.md | CLAUDE.md monorepo loading, agent memory, skills discovery |
docs/cross-agent-workflows.md | Claude Code + Cursor config mapping, background agents |
docs/new-features.md | Voice mode, agent teams, checkpointing, new hook events |
docs/daily-habits.md | Session habits, debugging tips, terminal setup, anti-patterns |
Complete AI coding workflow system from production use across Claude Code, Cursor, and beyond.
npx claudepluginhub rohitg00/pro-workflow --plugin pro-workflowExpert in using Claude Code CLI for advanced configuration, hooks, MCPs, CLAUDE.md, workflows, sub-agents, and permissions to maximize productivity.
Crafts effective prompts, CLAUDE.md instructions, rules, agent system prompts, and skill bodies for reliable Claude Code behavior.
Orchestrates Codex agents for code implementation, file modifications, codebase research, security audits, testing, and multi-step execution workflows.