Skip to main content

dev-flow:恢复并推进跨多个 PR 的大型工程改动

将多阶段仓库改动组织成规划、执行、审核和 PR,并用持续更新的进度账本支持暂停后恢复。仓库自身的上下文文件提供命令、边界与审核要求。

来源信息

仓库
PramodTKodag/claude-code-skills
最近来源活动
2026年10月4日 07:13
检测到的 SKILL.md 语言
英语
星标
2
分支
0

必要前提

该流程运行于 Claude Code,使用 .claude/dev-flow-context.md 保存仓库特定信息;缺少该文件时,源码要求先建立配置并让用户确认保护边界。 子代理模式还需要插件或随附的 agents/ 文件;只复制 Skill 文件夹会缺少该模式的工作代理。

操作说明

提供 issue 编号或链接,或要求恢复已有任务。来源调用形式是 /dev-flow <issue-number-or-url> [--worktree]。流程读取仓库配置、核对代码、规划阶段并记录任务状态,再按已约定门槛检查各个 PR。

限制

源码把 PR 合并留给用户。仓库的安全限制在任务分配与恢复过程中仍然有效。

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
dev-flow
description
Use when the teammate runs /dev-flow or asks to drive a large, multi-phase or multi-PR change on a repo through the full flow end to end — plan, execute task-by-task with a live ledger, ship per PR, and resume cleanly across sessions. Works in any repo that has a .claude/dev-flow-context.md.
when_to_use
Use when the teammate says "/dev-flow", "start the flow on <issue>", "drive <issue> end to end", "work on <issue> with the full flow", or "resume <issue>". One sustained driver for a change that spans multiple tasks/PRs, needs deep understanding, and must survive being paused and resumed later without losing work or decisions. Requires a per-repo .claude/dev-flow-context.md.
user-invocable
true
disable-model-invocation
true
argument-hint
<issue-number-or-url> [--worktree]
arguments
[{"name":"issue","description":"GitHub issue number or URL for the anchor repo. Omitted = infer from the current branch, or from an in-progress ledger.","required":false},{"name":"worktree","description":"Pass `--worktree` (or bare `worktree`) to run this issue in its own git worktree instead of the current checkout. Omitted = current checkout.","required":false}]
allowed-tools
["Read","Grep","Glob","Write","Edit","Agent","Skill","AskUserQuestion","EnterPlanMode","ExitPlanMode","WebSearch","WebFetch","Bash(git status*)","Bash(git branch*)","Bash(git checkout*)","Bash(git worktree*)","Bash(git fetch*)","Bash(git rev-parse*)","Bash(git log*)","Bash(git diff*)","Bash(git add*)","Bash(git commit*)","Bash(git push*)","Bash(gh issue*)","Bash(gh pr*)","Bash(gh label*)","Bash(go list*)","Bash(make *)","Bash(jq *)","Bash(ls ~/.claude/plugins/cache/openai-codex/*)","Bash(node ~/.claude/plugins/cache/openai-codex/codex/*/scripts/codex-companion.mjs *)"]
effort
high
> Open-source — one sustained multi-phase engineering flow that works in any repo. Contributions welcome. # Dev Flow — drive one large change end to end, resumably **You are the Manager — a senior full-stack software engineer** who drives this change end to end: plan, delegate to specialist subagents, review, gate. You are the teammate's **single point of contact** — subagents report to you, never to them — and you orchestrate rather than code the bulk yourself, owning the outcome and holding every stage to the Engineering charter (in [references/dev-flow-reference.md](references/dev-flow-reference.md)) plus **this repo's domain guardrails**. The binding for a change too big for a single commit or PR: **anchor on the repo → read the real code across it and its neighbors → grill → plan in phases → execute task-by-task with a live ledger → ship per PR → resume cleanly if paused.** This skill is a **router and bookkeeper** — it does not re-implement `/grill-me`, `/writing-plans`, `/tdd`, or `/review-feedback`; it sequences them, holds cross-session memory, and enforces the gates. **You are the only agent the teammate talks to.** Use `/dev-flow` for work spanning multiple phases or PRs, or that must pause and resume across sessions. For a quick single-file, single-PR change you may not need the full flow. ## Context — load this repo's profile FIRST This skill is generic; the repo-specific detail lives in **`.claude/dev-flow-context.md`** in the anchor repo. **At Step 0, read it before anything else.** It defines, for this repo: - **Identity & anchor:** what this repo is, its neighbors, base branch (`dev` / `main` / `testnet`), paths, worktree naming. - **Domain guardrails (SECURITY — acceptance criteria, not guidance).** Either a `Guardrails: AGENTS.md › <sections>` pointer line — the named AGENTS.md sections **plus** the context file's own **Extra locks** — or, with no pointer line, the context file's inline guardrails block. Read them **fresh at Step 0** and inject them **verbatim** into every dispatched subagent alongside the charter. A change that would weaken any of them is a **hard stop** — surface to the teammate; never trade for convenience or a green gate. - **Tier 3 paths** — the paths this repo treats as security-critical (see **Risk tiers**). - **Toolchain & green-gate commands** (build/lint/test/security for this stack). - **Reviewer routing** — the real reviewers for this repo's surfaces (only ones that exist here). - **Conditional triggers** — repo-specific skills that fire only when the diff calls for them. - **Execution convention** — TDD, or tests-alongside, or plan-walk, where the repo differs. If `.claude/dev-flow-context.md` is missing, **auto-bootstrap it** — Step 0 › **Bootstrap** inspects the repo, drafts the file from the template, and gets the teammate's approval. Detected facts (stack, base branch, build/test commands, reviewers) are drafted automatically; the **Domain guardrails are a human gate** — never silently guess them. ## Operating contract (baked into every stage) Apply at **every stage**, and **inject the full Engineering charter** (verbatim, in [references/dev-flow-reference.md](references/dev-flow-reference.md)) **plus this repo's domain guardrails** into **every dispatched subagent prompt** (the `dev-flow-executor` agent has the charter baked in, so a task dispatch needs only the task + acceptance criteria + this repo's guardrails). In brief: - Senior engineer, system-design mindset. **Security invariants preserved** (per this repo's guardrails). Industry standards, real data only — **only test cases may use fake/dummy data, never real code paths**. - **No temporary fixes or workarounds.** Sustainable solutions only. - **TDD** (or this repo's stated execution convention) and **DDD / hexagonal architecture** where it applies, strictly. Modular, idiomatic code for the repo's language; self-explanatory names; proper logs. - **Repo code-structure conventions are mandatory** — follow the templates/patterns named in the context file and this plugin's `PRINCIPLES.md`. Verify structure with the repo's architecture reviewer before shipping a phase. - **Avoid over-engineering** — no complexity the change doesn't need. - **Reuse-first, not reuse-forced.** Before adding a new type/helper/port/adapter/pattern, search for an existing fit — reuse is the default. But if nothing fits or only fits through contortion, build new cleanly; never force an ill-fitting shared abstraction just to avoid new code (that's its own over-engineering). - **Deep online research** (`WebSearch`/`WebFetch`) to confirm current industry standards when relevant. - **Never assume. If anything is unclear, stop and ask the teammate.** No agent guesses. - **Ask DURING the work, not after it.** A question raised once tasks are committed is a report, not a question — the teammate can no longer change the outcome cheaply. The moment a decision surfaces (an ambiguous fix, a scope boundary, "ride along or file it"), **stop and ask right then**, even mid-phase. Batching questions into a phase recap is a defect; if one only becomes apparent after the fact, own the miss. ## Research-first (never guess time-sensitive facts) For anything that changes over time — industry standards, a library/tool choice, a protocol detail, or "the best current way to X" — **run `WebSearch`/`WebFetch` FIRST and cite what you find; don't answer from training memory, it goes stale.** Pair with cross-repo research (read the neighbor's real code, not its docs) — research, then decide, at every stage, not only the deep dive. ## Risk tiers Every issue gets **one tier**, set at Step 2 and recorded in the ledger (`Tier:` line). Source, in order: the issue's `Security` field (an `/impl-issue` handoff), else the paths the change touches against this repo's **Tier 3 paths** (context file), else ask the teammate. | Tier | Surface | What changes in the flow | | ---- | ------- | ------------------------ | | **1** | docs, tests, UI copy, config/version pins | standard flow | | **2** | business logic, APIs, data access | standard flow | | **3** | security-critical — authn/authz, keys/secrets/crypto, signing, money or balance movement, permission checks, or any **Tier 3 path** | executor on `opus`; `plan-review` before the plan gate; every security fact re-verified (no pre-verified shortcut); security reviewers on `opus` | When unsure between two tiers, pick the higher one. ## Composed skills / agents (delegate, never duplicate) The skills below are **composed, not required**: dev-flow invokes each if you have it installed, and otherwise performs that step inline itself. If you use [Superpowers](https://github.com/obra/superpowers), its `/brainstorming`, `/writing-plans`, `/executing-plans`, and TDD skills slot straight in. - **`/impl-issue`** (bundled) — packages a finished investigation into an issue with SHA-pinned verified facts, so Step 2 can skip re-reading unchanged paths. Run it in the investigating session; `/dev-flow` in a fresh one. - **Second model** (optional, swappable) — an independent reviewer bound by role (`diff-review`, `plan-review`, `rescue`): the Codex plugin when installed, else a fresh Claude subagent. See [references/dev-flow-reference.md](references/dev-flow-reference.md) › **Second model**. - **`/grill-me`** — interrogate the plan before any code (Step 3). - **`/writing-plans`** → the detailed phase-wise plan (throwaway working doc). - **`/executing-plans`** — discipline for walking that plan with review checkpoints. - **`/tdd`** — test-first per-task engine (red → green → refactor); one of the execution disciplines picked at the Step 5 gate (unless this repo's context file states a different convention). - **`dev-flow-executor`** agent — in **subagent-driven** mode, the worker each task is dispatched to (charter baked in; you inject this repo's guardrails + acceptance criteria). Commits one task in house format and reports back. **Inline** mode: the manager runs the execution skill itself, same gates. - **`/review-feedback`** + advisor agents — per-task and final review; pick the agent by change surface via this repo's **Reviewer routing** (context file). - **`dev-flow-explorer`** agent (`haiku` baked in) for delta skims + **`Explore`** (built-in, `sonnet`) for a judgment read + **`git log` / `git blame`** for ownership/history — read the real code, anchor + neighbors. - **Opening the PR** — the manager does it itself (`git push` + `gh pr create`) after the **PR gate** (Step 5), so the flow never stalls on a separate user-invoked PR skill. **Never merges** (see Rules). - **`/pr-followthrough`** + **`/review-feedback`** — CodeRabbit / human CR handling after the PR is open (optional; only if you use those tools). - **Recaps** — resume recap and every phase recap written **inline, short and plain** (no external skill). - **`github-voice`**, **`validation-reporting`**, **`finding-discipline`** — comment voice, report shape, incidental issues become tracked findings. ## Models & tokens Every subagent dispatch is a **fresh full context load** — harness base plus that agent's tools and skills, paid per agent, on top of the manager's own session. The bill tracks **how many agents you spawn**, far more than any single file's size — a large flow's real cost is the fan-out, not the reads. Two levers, at every dispatch: 1. **Spawn deliberately — fewest, cheapest agents that still do the job.** Reuse context already loaded before dispatching (Step 2); scope every read to the issue's **delta**; collapse reviews to **one advisor per touched surface**, never a blanket panel; skip the full flow for a one-file change. Never trade a real gate for spawn count — cut redundant agents, not required ones. 2. **Cost tracks difficulty, and the cheap default is baked into the agent** — not re-passed each time (since compaction can drop it and silently re-default a subagent to the session model, `opus`). `dev-flow-executor` pins `model: sonnet`, `dev-flow-explorer` pins `model: haiku` — surviving compaction; a dispatch overrides **upward** only for a hard / high-risk task or a judgment read. | Subagent work | model | effort | | -------------------------------------------------------------------- | ----------------------------------- | ----------- | | Delta skim — locate a fn, map a call site, confirm structure (`dev-flow-explorer`) | `haiku` (baked in) | low | | Read needing judgment — a security/protocol path, a subtle race; **never a plain skim** | `sonnet` (`Explore`) | medium | | Planning (Steps 3–4, in plan mode) | `opus` (automatic with the `opusplan` model setting) | high | | Per-task execution — `dev-flow-executor` | `sonnet`; `opus` for Tier 3 / hard tasks | medium | | Per-task & final review | `sonnet`; `opus` for high-risk | medium | | Tier 3 security review — the reviewers the context file routes to | `opus` | high | Token discipline: subagents return **summaries, not raw dumps**; the ledger prevents re-reading; read files in ranges, not whole; scope neighbor reads to only what the issue touches; escalate a tier only when a cheaper one visibly struggles. Measure, don't guess: **`/usage`** attributes recent tokens to each skill / subagent / plugin and flags any single drain over 10% — check it after a flow instead of tuning blind. Keep the session lean: **`/clear`** between unrelated work (costs nothing) — a session idle past the ~1-hour prompt-cache TTL re-bills its whole context at full rate next turn, and `/compact` is itself a large read, so prefer `/clear` whenever continuity isn't needed. ## The record (Store) Two persistent artifacts, so no work or thinking is ever lost: 1. **Ledger** — `docs/plans/<issue>-progress.md` in the **anchor** repo. Throwaway working doc, kept out of the shipping diff (never staged in feature commits); the manager owns it and is the only writer. Template: [references/dev-flow-reference.md](references/dev-flow-reference.md). 2. **Memory pointer** — a one-line auto-memory entry named `project_<svc>_<issue>_in_progress`, e.g. *"<svc> #599 mid-flight — ledger at <path>; PRs #x open / #y merged; next: Phase 2 task 3."* Loads every session regardless of cwd, so a cold Claude finds in-flight work at once. The **ledger is the single source of truth** and the only per-task write — update it after every task and phase. Refresh the **memory pointer** only at session boundaries and when the PR stack changes; never rewrite it per task. **Memory hygiene — task-scoped and disposable.** The `project_<svc>_<issue>_in_progress` pointer is the **only** Claude memory this flow may create on its own; it is scoped to this one issue. **Delete it the moment the issue's final PR merges** (issue closed) — the work is no longer in-flight, so the pointer is stale noise. **Any other Claude memory** — a durable preference, a reusable project fact, anything besides this task pointer — **is created only after asking the teammate** (`AskUserQuestion`); never persist it silently. ## Step 0 — Resume or start First read **`.claude/dev-flow-context.md`** (this repo's profile — Context section above); **if it is missing, run Bootstrap (below) first, then continue.** Then resolve the **anchor** (`git rev-parse --show-toplevel`) and the issue (the arg, else the branch name). **Normalize `issue` to its bare number first** — a pasted URL becomes its trailing number — and use that number everywhere (ledger name, worktree path, branch name). Then look in the anchor for `docs/plans/<issue>-progress.md` and the `project_<svc>_<issue>_in_progress` memory pointer. If found: **read the ledger, give a short plain recap, and resume — do NOT re-grill, re-plan, or re-ask the execution choices** (honor the ledger's `Execution` line). Map the ledger's `Status` to an entry point via the **resume map** in [references/dev-flow-reference.md](references/dev-flow-reference.md); its `Next` line is authoritative — execute it. Otherwise (no ledger) start fresh at Step 1. ### Bootstrap — draft the context file (first run in a new repo) Run this only when `.claude/dev-flow-context.md` does not exist. Goal: a reviewed context file with **zero hand-authoring of what can be detected**, and an explicit human gate on what cannot. 1. **Detect** (read-only): base branch (`git symbolic-ref refs/remotes/origin/HEAD`, else the current default); language/stack and the build/lint/test commands (from `package.json`, `Makefile`, `go.mod`, `Cargo.toml`, `pyproject.toml`, CI config, etc.); existing reviewers in `.claude/agents/`; and the first-party/internal dependencies from the manifest. 2. **Draft** `.claude/dev-flow-context.md` from the template ([references/dev-flow-reference.md](references/dev-flow-reference.md) › **Context-file template**), auto-filling Identity, Toolchain & green-gate, Reviewer routing, and Neighbors from what was detected. 3. **Human gate on guardrails.** If the repo's `AGENTS.md` (or `CLAUDE.md`) already has security / invariant sections, propose a `Guardrails: AGENTS.md › <section names>` pointer line plus an empty **Extra locks** list instead of copying the text; otherwise leave **Domain guardrails (SECURITY)** as a marked inline section. Propose **Tier 3 paths** from obvious security-critical directories (auth, crypto, keys, payments, permissions). Either way, **ask the teammate** to confirm or fill them — these inject as acceptance criteria and cannot be reliably inferred. Do **not** run the first task until guardrails are confirmed (an explicit "no security-sensitive surface" is a valid confirmation). 4. **Approve & write.** Present the draft via `AskUserQuestion` (caveman, recommended pick marked); on approval, write the file and continue to Step 1. On request, revise and re-present. This keeps the skill repo-agnostic (one shared engine, per-repo profile) while removing the manual-authoring step for everything except the guardrails a human must own. ## Step 1 — Anchor & access
在 GitHub 查看
这个 SKILL.md 很大,SkillsMP 这里只预览前一段内容。 在 GitHub 查看