pro-workflow
Complete AI coding workflow system. Orchestration patterns, 18 hook events, 5 agents, cross-agent support, reference guides, and searchable learnings. Works with Claude Code, Cursor, and 32+ agents.
What this skill does
# Pro Workflow 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. ## The Core Insight > "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. --- ## 1. The Self-Correction Loop **The single most powerful pattern.** Your CLAUDE.md trains itself through corrections. ### How It Works When you correct Claude: 1. Claude acknowledges the mistake 2. Proposes a rule to prevent it 3. You approve → rule goes into memory 4. Future sessions avoid the same mistake ### Add to CLAUDE.md ```markdown ## 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 --> ``` ### Trigger Phrases - "Add that to your rules" - "Remember this" - "Don't do that again" ### Example Flow ```text 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? ``` --- ## 1b. Pre-Flight Discipline **Self-correction catches mistakes after the fact. This catches them before.** Karpathy's [observations on LLM coding pitfalls](https://x.com/karpathy/status/2015883857489522876) 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. ### Add to CLAUDE.md ```markdown ## 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". ``` --- ## 2. Parallel Sessions with Worktrees **Zero dead time.** While one Claude thinks, work on something else. ### Setup **Claude Code:** ```bash claude --worktree # or claude -w (auto-creates isolated worktree) ``` **Cursor / Any editor:** ```bash git worktree add ../project-feat feature-branch git worktree add ../project-fix bugfix-branch ``` ### Background Agent Management *(Claude Code)* - `Ctrl+F` — Kill all background agents (two-press confirmation) - `Ctrl+B` — Send task to background - Subagents support `isolation: worktree` in agent frontmatter ### When to Parallelize | Scenario | Action | |----------|--------| | Waiting on tests | Start new feature in worktree | | Long build | Debug issue in parallel | | Exploring approaches | Try 2-3 simultaneously | ### Add to CLAUDE.md ```markdown ## Parallel Work When blocked on long operations, use `claude -w` for instant parallel sessions. Subagents with `isolation: worktree` get their own safe working copy. ``` --- ## 3. The Wrap-Up Ritual End sessions with intention. Capture learnings, verify state. ### /wrap-up Checklist 1. **Changes Audit** - List modified files, uncommitted changes 2. **State Check** - Run `git status`, tests, lint 3. **Learning Capture** - What mistakes? What worked? 4. **Next Session** - What's next? Any blockers? 5. **Summary** - One paragraph of what was accomplished ### Create Command `~/.claude/commands/wrap-up.md`: ```markdown 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 ``` --- ## 4. Split Memory Architecture For complex projects, modularize Claude memory. ### Structure ```text .claude/ ├── CLAUDE.md # Entry point ├── AGENTS.md # Workflow rules ├── SOUL.md # Style preferences └── LEARNED.md # Auto-populated ``` ### AGENTS.md ```markdown # 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. ``` ### SOUL.md ```markdown # Style - Concise over verbose - Action over explanation - Acknowledge mistakes directly - No features beyond scope ``` --- ## 5. The 80/20 Review Pattern Batch reviews at checkpoints, not every change. ### Review Points 1. After plan approval 2. After each milestone 3. Before destructive operations 4. At /wrap-up ### Add to CLAUDE.md ```markdown ## Review Checkpoints Pause for review at: plan completion, >5 file edits, git operations, auth/security code. Between: proceed with confidence. ``` --- ## 6. Model Selection **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](https://docs.anthropic.com/en/docs/about-claude/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 | ### Adaptive Thinking 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. ### Add to CLAUDE.md ```markdown ## 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 ``` --- ## 7. Context Discipline 200k tokens is precious. Manage it. ### Rules 1. Read before edit 2. Compact at task boundaries 3. Disable unused MCPs (<10 enabled, <80 tools) 4. Summarize explorations 5. Use subagents to isolate high-volume output (tests, logs, docs) ### Context Compaction - Auto-compacts at ~95% capacity (keeps long-running agents alive) - Configure earlier compaction: `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50` - Use PreCompact hooks to save state before compaction - Subagents auto-compact independently from the main session ### Good Compact Points - After planning, before execution - After completing a feature - When context >70% - Before switching task domains --- ## 8. Learning Log Auto-document insights from sessions. ### Add to CLAUDE.md ```markdown ## Learning Log After tasks, note learnings: `[DATE] [TOPIC]: Key insight` Append to .claude/learning-log.md ``` --- ## Learn Claude Code 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/** --- ## Quick Setup ### Minimal Add to your CLAUDE.md: ```markdown ## Pro Workflow ### Self-Correction When corrected, propose rule → add to LEARNED
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.