SkillAtlasSkill 详情

pro-workflow

Your Claude Code gets smarter every session.

审核状态:已审核Quality 72Security 70

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年8月11日

Pro Workflow

Stars npm License skills add Docs

Your Claude Code gets smarter every session.

Self-correcting memory + persistent FTS5-indexed wikis + auto-research loop, all on one SQLite store.
Correct Claude once — it never repeats the mistake. Build a wiki on a topic — it grows itself overnight.
41 skills • 8 agents • 23 commands • 37 hook scripts across 24 events
Works with Claude Code, Cursor, and 32+ agents via skills add.


The Problem

You correct Claude the same way 50 times. You explain conventions every new session. Context compacts, learnings vanish, mistakes repeat. You research the same topic in three different sessions because there is nowhere durable for the answers to land.

Every Claude Code user hits this wall.

The Solution

Pro Workflow puts a single SQLite store underneath every session.

  • Self-correction memory — every correction becomes a rule, FTS5-searchable, auto-loaded on session start.
  • Knowledge plane — persistent research wikis on disk + FTS5 shadow index, queryable from any session, optionally grown by an auto-research loop.
  • Quality gates — LLM-powered hooks, deterministic git/secret guards, compaction-aware state, cost tracking.

After 50 sessions you barely correct anything. After a week of auto-research, your wiki on a topic is denser than the curated lists you started from.

Self-Correction Loop

Session 1:  You → "Don't mock the database in tests"
            Claude → Proposes rule → You approve → Saved to SQLite

Session 2:  SessionStart loads all learnings + lists your wikis
            UserPromptSubmit auto-injects top wiki hits when relevant
            Claude writes integration tests, cites the right wiki page

Session 50: Correction rate near zero. Wiki has 200 cited claims.

Install

Pro Workflow is published in two places: the Claude Code plugin marketplace (native), and skills add (cross-agent installer). Other agents do not have first-class plugins yet — skills add installs the skill bundle into each agent's native skill directory.

Claude Code (native)

/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow

Cursor, Codex, Copilot CLI, Droid, Gemini CLI, OpenCode, and 26 more (via skills add)

skills add installs the 41 skills + 23 commands into each agent's native skill directory.

npx skills add rohitg00/pro-workflow

Notes:

  • Use rohitg00/pro-workflow (the GitHub form), not the bare name — skills add resolves providers from owner/repo, not marketplace slugs.

Works with these agents: cursor, codex, gemini-cli, opencode, github-copilot, droid (factory), antigravity, amp, clawdbot, cline, codebuddy, commandcode, continue, crush, goose, kilo, kiro-cli, mcpjam, mux, neovate, openhands, pi, qoder, qwen, roo, trae, universal, vercel, windsurf, zencoder.

Roster notes (2026): windsurf relaunched as Devin Desktop, which speaks the Agent Client Protocol (ACP); gemini-cli was superseded by the Antigravity CLI for consumers. The adapter names above still resolve, but target the current product. MCP works across every agent in this list with the same setup. See references/modern-workflows-2026.md for the interop picture.

After install, run skills sync to register the skills with the target agent's config.

Manual install (any agent, any OS)

If neither path works for your setup, clone and copy the bundle directly. Adjust the destination to your agent's skill directory (e.g. ~/.cursor/rules/, ~/.gemini/extensions/, etc.).

git clone https://github.com/rohitg00/pro-workflow.git /tmp/pw
cd /tmp/pw && npm install && npm run build

cp -r /tmp/pw/templates/split-claude-md/* ./.claude/
cp -r /tmp/pw/skills    ~/.claude/skills/
cp -r /tmp/pw/commands  ~/.claude/commands/
cp    /tmp/pw/hooks/hooks.json ~/.claude/hooks.json

First-run smoke test

/doctor              # confirms SQLite store, hooks, skills load
/wrap-up             # runs the end-of-session ritual (no-op on fresh install)

If /doctor reports KB: missing, run cd ~/.claude/plugins/*/pro-workflow && npm install && npm run build — the SQLite components need a build step a handful of marketplaces skip.


What to type first

After install you have 41 skills and 23 slash commands. You don't need to memorize them; the agent picks the right skill from your prompt. The five commands below cover 80% of daily use:

WhenCommandWhat it does
Wrong correction repeats/learn-ruleCapture the correction as a rule. Loaded on every future SessionStart.
End of a coding session/wrap-upAudit changes, persist learnings, write a handoff doc.
Researching a topic/wiki init <slug>Spin up a persistent FTS5 wiki. Auto-injected when you mention the topic later.
Stuck on a hard bug/developResearch → Plan → Implement phases with validation gates.
Before a PR/smart-commitQuality gates, staged review, conventional commit message.

Full list: commands/ · skills/ · /list inside any session.


60-second tour

# 1. Self-correction (existing)
/learn-rule          # capture a correction
/wrap-up             # end session, persist learnings, audit changes
/insights            # heatmaps, trends, productivity

# 2. Knowledge plane (v3.3, new)
/wiki init agent-memory --title "Agent Memory" --flavor research
/wiki page agent-memory wiki/concepts/episodic-memory.md --type concept
/wiki ask "what is episodic memory" --wiki agent-memory

# 3. Auto-research (budget-capped, opt-in)
/wiki seed agent-memory "memory consolidation in agents"
/wiki research agent-memory --max-pages 5 --budget-usd 0.50

# 4. Hybrid retrieval (BM25 + vector RRF, optional)
/wiki embed agent-memory                       # OPENAI_API_KEY or VOYAGE_API_KEY
/wiki hybrid "consolidation patterns" --wiki agent-memory

# 5. Multi-LLM deliberation (transcript persists as a wiki page)
/wiki council "should we adopt episodic memory?" --wiki agent-memory

# 6. Browse the wiki visually (single-file HTML, S3-shareable)
/wiki view agent-memory
open ~/.pro-workflow/wikis/agent-memory/derived/viewer.html

# Kill switch for any auto loop
touch ~/.pro-workflow/STOP

UserPromptSubmit auto-loads top-3 wiki hits when prompts mention indexed topics. SessionStart lists registered wikis and recent learnings.


What's new in v3.3

Persistent knowledge plane on top of self-correction memory.

SkillPurpose
wiki-builderPersistent FTS5-indexed research wikis. 9 flavors: research, paper, domain, product, person, organization, project, codebase, incident. Path-traversal-guarded.
wiki-queryBM25 retrieval with snippets. ask, related, show. Auto-injects on UserPromptSubmit.
wiki-research-loopBudget-capped BFS. Pluggable source fetchers (web/arXiv/GitHub + custom). Convergence detection, kill-switch, atomic seed claim, try/finally state guards.
llm-councilProvider-agnostic 3-phase deliberation (Anthropic/OpenAI/OpenRouter/Fireworks/custom). Promise.allSettled so one provider failure doesn't abort the run. Transcript persists as a wiki page.
survey-generatorProvider-agnostic literature survey. Output target = wiki markdown page. Bibliography validation (uniqueness + section-paper refs), citation IDs aligned with sources.md rows.
wiki-viewerSingle-file HTML viewer for any wiki: pages + sources + seeds + link graph + in-browser search + "copy as seed" CTAs. S3-shareable. Applied lessons from Thariq Shihipar's HTML-as-output thesis.

Plus: /wiki command (now with view), learn-rule Wiki: <slug> scoping, schema additions (wikis, wiki_pages + FTS5, wiki_sources, wiki_claims, wiki_seeds, wiki_embeddings, learnings_wiki), reactive file-watcher seed enqueue, cron-tick driver, /doctor extended with KB + provider sections.


Comparison

FeaturePro WorkflowSuperpowersECCgstackGSD
Self-correcting memory (SQLite + FTS5)YesNoNoNoNo
Persistent research wikis (FTS5)YesNoNoNoNo
Auto-research loop (budget-capped BFS)YesNoNoNoNo
Hybrid retrieval (BM25 + vector + RRF)YesNoNoNoNo
Multi-provider LLM councilYesNoNoNoNo
LLM-powered hooks (type: "prompt")YesNoNoNoNo
Permission denial analysisYesNoNoNoNo
Compaction-aware state preservationYesNoNoNoNo
Cost tracking and budget alertsYesNoNoNoNo
MCP overhead auditingYesNoNoNoNo
Cross-agent (32+ agents via skills add)YesNoSomeNoNo
Skills3414140+18+0
Agents8536018
Commands22360+5+57
Hook events2481800

What's inside

41 skills

Knowledge plane (new in v3.3)

SkillWhat it does
wiki-builderScaffold + register FTS5-indexed research wikis
wiki-queryBM25 retrieval, snippets, related, show
wiki-research-loopBudget-capped BFS over web/arXiv/GitHub fetchers
llm-councilProvider-agnostic 3-phase multi-LLM deliberation
survey-generatorLiterature survey artifact, output to a wiki page
wiki-viewerSingle-file HTML viewer (pages, sources, seeds, link graph, search)

Quality gates and observability

SkillWhat it does
smart-commitQuality gates, staged review, conventional commits
llm-gateAI-powered commit and secret hooks (type: "prompt")
permission-tunerAnalyze denials, generate allow/deny rules
compact-guardState preservation through compaction cycles
cost-trackerSession cost awareness with budget benchmarks
mcp-auditMCP server token-overhead analysis
token-efficiencyAnti-sycophancy + tool-call budgets + read-before-write
safe-modeGuardrails for destructive operations
insightsSession analytics, correction trends, productivity
thoroughness-scoringRate completeness of implementations
deslopRemove AI-generated code slop from a diff

Memory and learning

SkillWhat it does
pro-workflowCore 8 patterns
learn-ruleCapture corrections (now wiki-scopeable)
replay-learningsSurface past learnings for the current task
wrap-upEnd-of-session ritual
session-handoffResume documents for the next session

Orchestration and engineering loop

SkillWhat it does
orchestrateMulti-phase Research → Plan → Implement → Review
agent-teamsMulti-instance coordination, shared task list
batch-orchestrationParallel worktree agents for large changes
parallel-worktreesGit worktree setup for zero dead time
context-engineeringWrite/Select/Compress/Isolate framework
context-optimizerToken management, context budget, MCP audit
auto-setupAuto-detect project type, configure quality gates
file-watcherReactive workflows on config and dependency changes
bug-captureCapture defects as durable issues without leaking paths
module-mapOne-screen map of an unfamiliar codebase area
plan-interrogateStress-test a plan by walking its decision tree
sprint-statusTrack multi-session progress

8 agents

AgentPurpose
plannerBreak down complex tasks (read-only, approval-gated)
reviewerCode review and security audit (checklist-based)
scoutConfidence-gated exploration (background, worktree-isolated)
orchestratorMulti-phase feature development
debuggerSystematic, hypothesis-driven bug investigation
context-engineerContext-window analysis (lightweight, read-only)
permission-analystDenial-pattern analysis, rule-optimization recommendations
cost-analystToken-usage analysis, identify expensive operations

23 commands

CommandWhat it does
/wikiKnowledge-plane entry: init, page, ask, hybrid, seed, research, council, survey, embed, status
/developMulti-phase feature build with validation gates
/commitSmart commit with quality gates
/wrap-upEnd-of-session checklist and learning capture
/learn-rule / /learnExtract correction or learn Claude Code best practices
/doctorSetup health check (now includes wiki KB + council providers)
/insightsSession analytics and correction heatmap
/replaySurface past learnings for the current task
/handoffSession handoff document
/search / /listSearch and list stored learnings
/deslopRemove AI-generated code slop
/context-optimizerAudit and optimize context-window usage
/parallelSet up git worktrees for parallel sessions
/safe-modeToggle destructive-operation guardrails
/sprint-statusTrack multi-session progress
/auto-setupAuto-detect project type, configure quality gates
/compact-guardProtected compaction with state preservation
/cost-trackerTrack session costs and optimization tips
/mcp-auditAudit MCP servers for token overhead
/permission-tunerGenerate allow/deny rules from denial patterns

37 hook scripts across 24 events

SessionStart, SessionEnd, UserPromptSubmit, PreToolUse, PostToolUse, Stop, PreCompact, PostCompact, SubagentStart, SubagentStop, TaskCreated, TaskCompleted, PermissionRequest, PermissionDenied, PostToolUseFailure, TeammateIdle, StopFailure, FileChanged, ConfigChange, Notification, Setup, WorktreeCreate, WorktreeRemove, CwdChanged.

Selected high-leverage hooks:

HookScriptEffect
SessionStartsession-start.jsLoads learnings; lists registered wikis
UserPromptSubmitprompt-submit.jsAuto-injects top-3 wiki hits when prompts match the index
Stoplearn-capture.jsAuto-captures [LEARN] blocks (now parses Wiki: <slug>)
FileChangedfile-changed.jsEdits inside a wiki tree enqueue verify-seeds
PreToolUse(Bash)commit-validate.js, git-blast-radius.js, pre-push-check.jsConventional commit + destructive op + push guardrails
PreToolUse(Write)secret-scan.jsLLM-powered secret detection
PreCompact / PostCompactpre-compact.js, post-compact.jsSave and re-inject critical context summary

Reference guides

GuideWhat's covered
modern-workflows-2026.mdMulti-agent orchestration, Agent Teams, checkpoints, ACP/MCP interop, skills-commands merger
../references/models-2026.mdCurrent model tiers, effort routing, task budgets
settings-guide.mdSettings keys, permission modes, hierarchy
cli-cheatsheet.mdCLI flags, keyboard shortcuts, slash commands
orchestration-patterns.mdCommand → Agent → Skill architecture, agent teams
context-engineering.mdWrite/Select/Compress/Isolate, memory taxonomy, compaction
agent-teams.mdSetup, decomposition, teams vs sub-agents
context-loading.mdCLAUDE.md loading, agent memory, skills discovery
cross-agent-workflows.mdClaude Code + Cursor together, skills add cross-agent
decision-framework.mdWhen to use which pattern
daily-habits.mdSession habits, debugging tips, anti-patterns
new-features.mdCheckpoints, remote sessions, agent and prompt hooks
claude-code-resources.mdOfficial docs map and resource index

How it works

/develop flow

Development Flow

Research before planning. Plan before implementing. Review before committing. Validation gates between every phase.

Architecture

Architecture Diagram

Command → Agent → Skill, layered over a single SQLite store. The knowledge plane (v3.3) plugs into the same store as the learning rules.

Storage

~/.pro-workflow/
├── data.db                 # learnings, sessions, wikis (registry), wiki_pages (+FTS5),
│                           # wiki_sources, wiki_claims, wiki_seeds, wiki_embeddings,
│                           # learnings_wiki
├── wikis/<slug>/           # global-scope wikis (default location)
├── council/<session-id>/   # llm-council transcripts
├── fetchers/               # user-supplied custom source fetchers
├── tick.log                # cron-driven research-tick log
└── STOP                    # touch this file to halt every research loop

Project-scope wikis live at <project>/.claude/wikis/<slug>/ and are committable.


Patterns

PatternWhat it does
Self-Correction LoopClaude learns from corrections automatically
Knowledge PlaneWiki + auto-research loop on the same SQLite store
Multi-Phase DevResearch → Plan → Implement → Review with gates
Parallel WorktreesZero dead time with native claude -w
Wrap-Up RitualEnd sessions with intention, capture learnings
Split MemoryModular CLAUDE.md for complex projects
80/20 ReviewBatch reviews at checkpoints
Context EngineeringWrite/Select/Compress/Isolate for token management
Agent TeamsMulti-instance coordination with shared task list
Batch OrchestrationParallel worktree agents for large-scale changes
LLM GatesAI-powered verification before destructive operations
Permission TuningDenial-pattern analysis to reduce prompt fatigue
Token EfficiencyAnti-sycophancy + tool-call budgets + read-before-write
Multi-LLM CouncilProvider-agnostic 3-phase deliberation for high-stakes calls

Cross-agent support

Works across 32+ AI coding agents via skills add:

npx skills add rohitg00/pro-workflow

Supported: Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, OpenCode, Kiro, Amp, Goose, Roo, and 27 more.


Configuration

Settings

See settings.example.json for production-ready configuration: permission rules, output style, auto-compaction, custom spinner verbs.

MCP

See mcp-config.example.json:

  • context7 — live documentation lookup
  • playwright — browser automation (most token-efficient)
  • GitHub — PRs, issues, code search

Rule: start with three MCPs, add only for concrete needs.

Knowledge plane env

EnvWhen
WIKI_ROOTOverride default ~/.pro-workflow/wikis
OPENAI_API_KEY / VOYAGE_API_KEYEnable hybrid retrieval (embeddings)
ANTHROPIC_API_KEY / OPENAI_API_KEY / OPENROUTER_API_KEY / FIREWORKS_API_KEY / LLM_COUNCIL_BASE_URL+LLM_COUNCIL_API_KEYPick a council provider (first match wins)
WIKI_LOOP_BUDGET_USD / WIKI_LOOP_MAX_PAGES / WIKI_LOOP_MAX_DEPTHPer-run loop overrides
GH_TOKEN / GITHUB_TOKENLifts GitHub-fetcher rate limit

Structure

pro-workflow/
├── skills/           # 41 skills
├── agents/           # 8 agents
├── commands/         # 23 slash commands
├── scripts/          # 37 hook scripts (24 events)
├── references/       # workflow, model, and skill reference guides
├── docs/             # GitHub Pages infographic
├── rules/            # rule packs (Cursor + universal)
├── contexts/         # context modes
├── templates/        # split CLAUDE.md + AGENTS.md
├── src/              # TypeScript source (SQLite + embeddings)
└── config.json

Tips from the community

"80% of my code is written by AI, 20% is spent reviewing and correcting it." — Andrej Karpathy

"Use subagents to throw more compute at a problem — offload tasks to keep your main context clean." — Boris Cherny

"If you do something more than once a day, turn it into a skill or command." — Boris Cherny

"Write detailed specs and reduce ambiguity before handing work off." — Boris Cherny

"Skill description field is a trigger, not a summary — write it for the model." — Thariq Shihipar


Philosophy

  1. Compound improvements — small corrections lead to big gains.
  2. Trust but verify — let AI work, review at checkpoints.
  3. Zero dead time — parallel sessions keep momentum.
  4. Memory is precious — both yours and Claude's.
  5. Persistent over ephemeral — if you'll need it next session, write it down on disk.
  6. Orchestrate, don't micromanage — wire patterns together, let agents execute.

Related projects

ProjectDescription
everything-claude-code140+ skills, 36 agents — the comprehensive collection
claude-code-best-practiceCurated tips, comparisons, community best practices
skillsRegistry and CLI to add skills across 32+ agents
awesome-claude-code-toolkit850+ files, 135 agents, 176 plugins — curated directory

Star history

Star History Chart


If pro-workflow saves you time, star the repo so others can find it.

Stars

Documentation • Skills Registry • Report Issues • Reference Guides

Agent / MCP / Skill 创作开发与工程商业与运营

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 可能需要外部 token、网络权限或第三方服务。
  • 未检测到高风险命令。
  • 扫描发现:2 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/rohitg00/pro-workflow.git
  3. 将 "skills/pro-workflow" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/rohitg00/pro-workflow.git
  3. 将 "skills/pro-workflow" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/rohitg00/pro-workflow.git
  3. 将 "skills/pro-workflow" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/rohitg00/pro-workflow.git
  3. 将 "skills/pro-workflow" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/rohitg00/pro-workflow.git
  3. 将 "skills/pro-workflow" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: pro-workflow
description: Complete AI coding workflow system. Orchestration patterns, 18 hook events, 8 agents, cross-agent support, reference guides, and searchable learnings. Works with Claude Code, Cursor, and 32+ agents.

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 skills add. 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

## 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

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 name the upstream failures: silent assumptions, overcomplicated diffs, drive-by edits, vague success criteria. Four rules prevent each one.

RulePrevents
Surface, don't assumeWrong interpretation, hidden confusion, missing tradeoffs
Minimum viable code200-line diffs that should be 50, speculative abstractions
Stay in your laneDrive-by refactors, "improvements" to adjacent code
Verifiable goalsEndless 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

## 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:

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

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

ScenarioAction
Waiting on testsStart new feature in worktree
Long buildDebug issue in parallel
Exploring approachesTry 2-3 simultaneously

Add to CLAUDE.md

## 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:

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

.claude/
├── CLAUDE.md        # Entry point
├── AGENTS.md        # Workflow rules
├── SOUL.md          # Style preferences
└── LEARNED.md       # Auto-populated

AGENTS.md

# 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

# 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

## Review Checkpoints
Pause for review at: plan completion, >5 file edits, git operations, auth/security code.
Between: proceed with confidence.

6. Model Selection

Current lineup (2026): Fable 5, Opus 4.8, Sonnet 5, and Haiku 4.5. The flagship tiers carry a 1M-token context; Haiku 4.5 is 200K. Frontier models converged, so the harness and the effort setting decide output quality more than the model choice. See references/models-2026.md for strings, prices, and routing.

TaskModelEffort
Quick fixes, lookupsHaiku 4.5low
Features, balanced workSonnet 5high
Refactors, architecture, hard debugOpus 4.8xhigh
Long-horizon autonomous buildsFable 5high / xhigh

Effort and adaptive thinking

Fixed thinking budgets are retired on the current tiers. Control depth with effort (low through xhigh to max); xhigh is the default for coding and agentic work. Adaptive thinking lets the model calibrate reasoning per step with no fixed budget. Run grunt subagents at low effort on Haiku and keep the reasoning path on the capable tier.

Add to CLAUDE.md

## Model Hints
Route by task: Haiku 4.5 for lookups, Sonnet 5 for features, Opus 4.8 for
architecture and hard debugging, Fable 5 for long-horizon builds.
Effort is the lever, not thinking budgets: xhigh for coding, low for subagents.

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

## 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:

## 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

Full Setup

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/

Hooks (Claude Code)

Pro-workflow includes automated hooks to enforce the patterns. Cursor users get equivalent enforcement through .mdc rules in the rules/ directory.

PreToolUse Hooks

TriggerAction
Edit/WriteTrack edit count, remind at 5/10 edits
git commitRemind to run quality gates
git pushRemind about /wrap-up

PostToolUse Hooks

TriggerAction
Code edit (.ts/.js/.py/.go)Check for console.log, TODOs, secrets
Test commandsSuggest [LEARN] from failures

Session Hooks

HookAction
SessionStartLoad LEARNED patterns, show worktree count
StopContext-aware reminders using last_assistant_message
SessionEndCheck uncommitted changes, prompt for learnings
ConfigChangeDetect when quality gates or hooks are modified mid-session

Install Hooks

# Copy hooks to your settings
cp ~/skills/pro-workflow/hooks/hooks.json ~/.claude/settings.local.json

# Or merge with existing settings

Hook Philosophy

Based on Twitter thread insights:

  • Non-blocking - Hooks remind, don't block (except dangerous ops)
  • Checkpoint-based - Quality gates at intervals, not every edit
  • Learning-focused - Always prompt for pattern capture

Contexts

Switch modes based on what you're doing.

ContextTriggerBehavior
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.


Agents

Specialized subagents for focused tasks.

AgentPurposeTools
plannerBreak down complex tasksRead-only
reviewerCode review, security auditRead + test

When to Delegate

Use planner agent when:

  • Task touches >5 files
  • Architecture decision needed
  • Requirements unclear

Use reviewer agent when:

  • Before committing
  • PR reviews
  • Security concerns

Custom Subagents (Claude Code)

Create project-specific subagents in .claude/agents/ or user-wide in ~/.claude/agents/:

  • Define with YAML frontmatter + markdown system prompt
  • Control tools, model, permission mode, hooks, and persistent memory
  • Use /agents to create, edit, and manage interactively
  • Preload skills into subagents for domain knowledge

Agent Teams (Claude Code, Experimental)

Coordinate multiple Claude Code sessions as a team:

  • Enable: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  • Lead session coordinates, teammates work independently
  • Teammates message each other directly (not just report back)
  • Shared task list with dependency management
  • Display: in-process (Shift+Down to navigate, wraps around) or split panes (tmux/iTerm2)
  • Delegate mode (Shift+Tab): lead coordinates only, no code edits
  • Best for: parallel reviews, competing hypotheses, cross-layer changes
  • Docs: https://code.claude.com/docs/agent-teams

9. Orchestration: Command > Agent > Skill

The most powerful pattern for complex features. Three layers, each with a single job.

The Architecture

Command (user-facing entry point)
  └── Agent (execution, constrained tools, preloaded skills)
        └── Skill (domain knowledge, injected at startup)

Multi-Phase Development (/develop)

For features touching >5 files or needing architecture decisions:

  1. Research → orchestrator agent explores codebase, scores confidence (0-100)
  2. Plan → presents approach, files to change, risks. Waits for approval.
  3. Implement → executes plan step by step with quality gates every 5 edits
  4. Review → reviewer agent checks for security, logic, quality

All four phases run in order. Each phase requires explicit user approval before the next phase begins.

Agent Skills (Preloaded)

# Agent frontmatter
skills: ["api-conventions", "project-patterns"]

Full skill content injected at agent startup. Use for knowledge the agent always needs.

On-Demand Skills (Invoked)

Skills with user-invocable: true are called via /skill-name. Use context: fork for isolated execution that doesn't pollute main context.

When to Orchestrate

ScenarioPattern
Feature > 5 files/develop with orchestrator
Bug investigationdebugger agent
Quick explorationscout agent (background)
Code reviewreviewer agent
Simple taskJust do it directly

10. Daily Habits

Every Session

  • Run /doctor if things feel off
  • Manual /compact at 50% — don't wait for auto-compact
  • ultrathink in prompts for maximum reasoning
  • Name sessions with /rename for easy /resume
  • End with /wrap-up to capture learnings

Context Management

  • CLAUDE.md: < 60 lines root, < 150 max
  • Use CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 for proactive compaction
  • Delegate heavy exploration to subagents
  • Keep <10 MCPs, <80 tools

Cross-Agent Tips

  • Use Cursor for tab completions + Claude Code in terminal for hard problems
  • Same MCP servers work across both (share .mcp.json at project root)
  • skills add installs to any agent: npx skills add rohitg00/pro-workflow

MCP Config (Claude Code)

Start with 3 MCPs. Add only for concrete needs.

Essential:

  • context7 — Live documentation lookup
  • playwright — Browser automation (most token-efficient)
  • github — PRs, issues, code search

See mcp-config.example.json for setup and curated recommendations.


Commands (Claude Code)

CommandPurposeCursor Equivalent
/wrap-upEnd-of-session ritualwrap-up skill
/learn-ruleExtract correction to memorylearn-rule skill
/developMulti-phase feature buildorchestrate skill
/doctorHealth check—
/commitSmart commit with quality gatessmart-commit skill
/insightsSession analytics and patternsinsights skill
/replaySurface past learningsreplay-learnings skill
/handoffSession handoff documentsession-handoff skill
/searchSearch learnings by keyword—
/listList all stored learnings—
/learnTopic-by-topic Claude Code guide—

Reference Guides

Deep dives on configuration and features:

GuideTopics
references/settings-guide.mdAll settings keys, permission modes, hierarchy, sandbox, env vars
references/cli-cheatsheet.mdEvery CLI flag, keyboard shortcut, slash command
references/orchestration-patterns.mdCommand > Agent > Skill architecture, frontmatter reference
references/context-loading.mdCLAUDE.md monorepo loading, agent memory, skills discovery
references/cross-agent-workflows.mdClaude Code + Cursor config mapping, background agents
references/new-features.mdVoice mode, agent teams, checkpointing, new hook events
references/daily-habits.mdSession habits, debugging tips, terminal setup, anti-patterns

Philosophy

  1. Compound improvements - Small corrections lead to big gains
  2. Trust but verify - Let AI work, review at checkpoints
  3. Zero dead time - Parallel sessions keep momentum
  4. Memory is precious - Yours and the AI's
  5. Orchestrate, don't micromanage - Wire patterns together, let agents execute

Complete AI coding workflow system from production use across Claude Code, Cursor, and beyond.

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!