Agent skill

Leanspec PR Lifecycle

by codervisor in codervisor/leanspec

Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on…

MITAuto-check passedDevelopment

Install Leanspec PR Lifecycle

skills CLI
$ npx skills add codervisor/leanspec --skill leanspec-pr-lifecycle -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codervisor/leanspec leanspec-pr-lifecycle --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codervisor/leanspec.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/leanspec-pr-lifecycle .claude/skills/leanspec-pr-lifecycle && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
leanspec-pr-lifecycle
GitHub stars
296
Token cost
~3.3k tokens
SKILL.md length
1,535 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on…

  • Works in 2 steps: Link to a spec issue in its body via… → Carry the trivial label (typo, doc-only,…
  • Include CI is failing
  • SKILL.md covers Tool discipline, Spec-issue linking (mandatory), Issue progress and Tracker refresh, plus 6 more sections
  • Calls git, gh and pnpm

What it does

Leanspec PR Lifecycle is an agent skill from codervisor/leanspec. Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on merge. Triggers include "CI is failing", "check is red", "link this issue", "Closes vs Part of", "respond to review", "subscribe to PR", "triage PR", "the PR is ready", "PR has conflicts", "branch has conflicts with main", "merge conflict on the PR", or when a github-webhook-activity event arrives on a lean-spec PR…

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow, Webhooks and Changelog and release notes. It works with GitHub. The repository describes itself as: Lightweight, flexible Spec-Driven Development (SDD) for modern AI-powered development. The licence is MIT.

When your agent uses it

  • Include CI is failing
  • Link this issue
  • Closes vs Part of
  • Respond to review

Example prompts

  • “CI is failing”
  • “check is red”
  • “link this issue”
  • “/leanspec-pr-lifecycle”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Link to a spec issue in its body via Closes #N / Fixes #N / Resolves #N (slice complete) or Part of #N / Refs #N (scaffolding), OR
  2. Carry the trivial label (typo, doc-only, one-line obvious fix).

What it can do on your machine

Read from SKILL.md and the folder at commit ee122d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • pnpm
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Leanspec PR Lifecycle loads about 3.3k tokens when it runs. Until then it costs about 172 tokens; SKILL.md has 1,535 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~172
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codervisor/leanspec at commit ee122d6, republished under its MIT licence (© codervisor). 1,535 words, ~3,317 tokens.

Download SKILL.mdSave it as .claude/skills/leanspec-pr-lifecycle/SKILL.md (or your agent's skills folder).
name
leanspec-pr-lifecycle
description
Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on merge. Triggers include "CI is failing", "check is red", "link this issue", "Closes vs Part of", "respond to review", "subscribe to PR", "triage PR", "the PR is ready", "PR has conflicts", "branch has conflicts with main", "merge conflict on the PR", or when a github-webhook-activity event arrives on a lean-spec PR. Paired with `leanspec-dev-process` (overall loop), `issue-spec` (spec creation), and `leanspec-pre-push` (which owns the pre-push conflict walkthrough).
metadata.internal
true

leanspec-pr-lifecycle

Everything that happens after git push on a lean-spec PR. Covers spec-issue linking, CI triage, review-comment discipline, webhook subscription, and the manual ticking of Plan items / CHANGELOG entries on merge.

This is lean-spec's analogue of onsager-pr-lifecycle / duhem-pr-lifecycle. The discipline is the same.

Tool discipline

  • No gh CLI for issue/PR manipulation, no hub, no direct GitHub API. Always use mcp__github__*. The gh CLI is fine for CI workflow inspection (gh run list, gh run view) — see leanspec-development "CI/CD"; it's just not the tool for spec-label updates or PR body edits.
  • Scope is restricted to codervisor/leanspec for this skill.
  • Don't open PRs unless the user explicitly asks. Creating one is a one-way door in this project's workflow.

Spec-issue linking (mandatory)

Every PR must either:

  1. Link to a spec issue in its body via Closes #N / Fixes #N / Resolves #N (slice complete) or Part of #N / Refs #N (scaffolding), OR
  2. Carry the trivial label (typo, doc-only, one-line obvious fix).

If neither, the PR is out of process. Comment on the PR asking the author to add a spec link — creating one via issue-spec if none exists — or apply the trivial label.

Which keyword to use

GitHub closes issues on merge when the PR body contains one of: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved — followed by #N.

Pick the keyword based on what this PR actually delivers:

PR deliversUse
The acceptance test / vertical slice the spec asks forCloses #N
A bug fix for a specific defectFixes #N
Scaffolding / one phase of a multi-phase specPart of #N
Related work that shouldn't close the specRefs #N

Part of / Refs are not auto-close keywords — they just cross-link in the UI. Use them for scaffolding so the spec stays open for the real slice.

Edit the PR body via mcp__github__update_pull_request (don't open a new PR just to fix the link). Put the linking line at the top of the body.

Multi-issue PRs — enumerate every closure

If a single PR delivers acceptance for more than one issue, write one Closes keyword per issue:

markdown
Closes #27, Closes #30, Closes #33

GitHub only honors auto-close on each #N individually; Closes #27, #30, #33 closes #27 and leaves #30/#33 open.

The ## Delivers subsection

For Part of #N PRs (and ideally all PRs), include a ## Delivers subsection in the body listing the exact Plan items this PR ticks. Copy the item text verbatim from the spec's ## Plan, but mark each as - [x]. Use this list to tick the parent spec's checkboxes after merge — see "Issue progress" below.

Example PR body:

markdown
Closes #142

## Delivers
- [x] Implement `GithubProvider::list_specs` in `rust/leanspec-core/src/providers/github.rs`
- [x] Add `--provider=github` flag to `leanspec init`
- [x] Update `locales/en.json` and `locales/zh-CN.json` with provider-picker copy

## Provider impact
- Types added: `ProviderKind::Github`, `GithubProviderConfig`
- Trait changes: none (implements existing `Provider` trait)
- Breaking change? no

## Summary
First slice of the github provider. List-only; CRUD lands in a follow-up.
## Provider impact in the PR body

If the linked spec is labeled provider-impact, the PR body must include a ## Provider impact subsection (it's fine to copy the spec's own subsection verbatim). This makes provider changes visible in the PR diff itself, not just on the linked issue, so reviewers don't have to context-switch.

If Breaking change? yes, the PR must also touch CHANGELOG.md under the next [Unreleased] heading. Comment on the PR if either is missing.

Issue progress

Spec issues use only their open/closed state — no status labels. Lifecycle moves:

  • PR merged with Closes #N → issue auto-closes (GitHub).
  • PR merged with Part of #N → spec stays open; tick the delivered Plan items on the parent manually (see below).
  • PR closed unmerged → spec issue stays open as-is.

When a PR is merged with Part of #N (parent stays open):

  1. Read the merged PR's ## Delivers subsection.
  2. For each item, find the matching - [ ] line in the parent spec's ## Plan section and flip it to - [x].
  3. Edit the spec body via mcp__github__issue_write.

When a PR is merged with Closes #N:

  1. GitHub auto-closes the spec.
  2. If the spec is part of a tracker (umbrella) issue, see the "Tracker refresh" section below.
  3. If the spec was labeled provider-impact with Breaking change? yes, confirm a CHANGELOG entry landed; if not, file a follow-up PR adding it.

Tracker refresh

Some issues are umbrella trackers that reference several sub-issues as a checklist — identified by a [Tracking] title prefix, a tracking label, or a ## Progress section whose items are - [ ] #N lines. When a PR closes a sub-issue, the tracker does not update itself.

After merge, for each auto-closed or explicitly-closed issue:

  1. Search for umbrella trackers that reference it: mcp__github__search_issues with repo:codervisor/leanspec #N in:body is:issue is:open.
  2. For each match, read the tracker body. If there's a matching - [ ] ... #N ... line in a Progress / Plan section, flip it to - [x].
  3. Post one tracker comment summarizing the delta, not one per issue: "PR #<pr> landed #N1, #N2, #N3; ticked in Progress."
  4. If after the tick every sub-issue is closed, note that the tracker itself is now a candidate for closure — don't close it unilaterally, just flag it.

CI triage

CI on this repo runs from .github/workflows/. The relevant workflows are listed in leanspec-development "CI/CD"; the patterns below are what fails most often:

SymptomUsual cause
pnpm typecheck fails on CI, passes locallyCI built the merge preview; main has drifted. git fetch origin main && git merge origin/main on the branch, re-run typecheck, push.
cargo clippy -- -D warnings failsA warning slipped in (often unused_imports or dead_code). Fix the root cause; never #[allow] past it.
i18n parity check failsA key was added to en.json but not zh-CN.json (or vice versa). Add the missing key, even as a placeholder + // TODO(i18n) comment.
Test suite times out on Rust integration testsUsually a tokio runtime blocking issue. Check for block_on inside an async context.
Workspace protocol validation failsscripts/validate-no-workspace-protocol.ts flagged a workspace:* in a published package. Run pnpm sync-versions to resolve.
Platform binary validation failsRust binaries weren't copied for all 5 platforms. See NPM-DISTRIBUTION.md.
Desktop build failsTauri toolchain difference; rarely a code bug. See CI-TROUBLESHOOTING.md.
Show full SKILL.md (583 more words)Show less
Accessing logs

WebFetch cannot read authenticated GitHub Actions logs — both the run pages and the API logs endpoint return 403. Don't waste time on them. Work instead from:

  1. mcp__github__pull_request_read with method: get_check_runs — gives step name, status, timings.
  2. The gh CLI in this repo's sessions (when available): gh run view <run-id> --log-failed. See CI-COMMANDS.md.
  3. Local reproduction after syncing main. Re-run the failing step with the exact flags from the workflow yaml.

Merge conflicts on an open PR

When GitHub shows "This branch has conflicts that must be resolved" or mcp__github__pull_request_read reports mergeable: false, resolve locally — the GitHub web editor bypasses any local validation and routinely lands broken merges.

  1. Don't use mcp__github__update_pull_request_branch to auto-merge main in via GitHub. That surfaces the same conflicts without giving you the resolution workspace, then commits a broken merge if you accept the default.

  2. Check out the branch locally and run the full conflict walkthrough in leanspec-pre-push (step 1, "Resolving conflicts").

  3. After the merge commit lands, continue with the rest of leanspec-pre-push (typecheck, test, clippy, spec-link, provider/i18n evidence) before pushing.

  4. Push the merge commit to the same branch with git push (no --force). The existing PR updates in place; the conflict banner clears when GitHub re-evaluates.

  5. If the PR is tied to a Closes #N / Part of #N line and the merge touched the spec's surface area (provider types, i18n keys), comment on the spec flagging what drifted, so the parent stays accurate.

If the branch is so far behind main that the conflict set is large (>10 files), close the PR, rebase the work into a fresh branch from origin/main, and open a new PR with the same linking line. Note the close reason on the old PR.

Review comments

Fix the code. Don't reply per comment. Multiple reviewers (Copilot + human) often flag the same defect; a single commit that fixes it resolves all of them at once.

Reply only when:

  • Declining a suggestion (explain why, briefly).
  • The comment is a question, not a bug report.
  • Asking for clarification before acting.

Use mcp__github__add_reply_to_pull_request_comment for threaded replies, never top-level comments unless summarizing multiple responses at once.

If a review comment raises a design concern that the spec didn't address, pause and update the linked spec issue (add an open question under ## Alignment, comment on the spec, let a human decide). Don't silently expand scope in the PR.

Webhook subscription

Events from CI and reviewers arrive wrapped in <github-webhook-activity> tags. The harness forwards them as user messages.

  • Subscribe once per PR with mcp__github__subscribe_pr_activity after the PR is created (or the user asks you to watch it).
  • Unsubscribe with mcp__github__unsubscribe_pr_activity when done — not strictly necessary but cleaner.
  • Events are already filtered to CI failures + reviews. Treat each as actionable; skip only if it's a duplicate of one you just addressed.

Reporting back to the user

After handling a webhook event, end with one or two sentences: what the failure was, what you changed, whether CI is re-running. Don't dump the full commit message in chat — the user can see it on the PR.

Relationship to other skills

Related surfaceRole
leanspec-dev-processTop-level SDD loop; points here for the post-push stage.
issue-specCreates the spec issue this PR links to. Installed globally from onsager-ai/dev-skills.
leanspec-pre-pushRuns before git push; enforces the spec-link check locally and owns the conflict walkthrough.
leanspec-developmentCommands, CI workflows, publishing, changelog format, runner research.
github-integrationgh CLI in cloud sessions (CI inspection only — not for issue/PR mutation). Installed globally from onsager-ai/dev-skills.

© codervisor, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/leanspec-pr-lifecycle of codervisor/leanspec.

Open the folder on GitHubat commit ee122d6

Compare with similar skills

Leanspec PR Lifecycle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Leanspec PR Lifecycle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Leanspec PR Lifecycle this skillcodervisor/leanspec296—~3.3kAutomated safety check: PassMIT
Release Bumpjamiepine/voicebox57k—~1.1kAutomated safety check: PassMIT
Go-Redis Release Preparationredis/go-redis22k—~1.1kAutomated safety check: PassBSD-2-Clause
Hunk Release Workflowmodem-dev/hunk9.5k—~3.8kAutomated safety check: PassMIT
Worktrunk Release Workflowmax-sixty/worktrunk9k—~6.9kAutomated safety check: PassCustom licence
pybind11 Release Publicationpybind/pybind1118k—~2.5kAutomated safety check: PassCustom licence

Similar skills

  • Release Bump

    jamiepine/voicebox

    Ends a release cycle by moving the Unreleased changelog notes under a dated version heading, bumping version files with bumpversion and tagging the commit.

    57k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Prepares a go-redis release locally: picks the next semver, gathers merged PRs, writes the RELEASE-NOTES entry and bumps versions, without publishing.

    22k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Hunk Release Workflow

    modem-dev/hunk

    Maintainer workflow for preparing, publishing, verifying and curating Hunk releases, with confirmation gates before tags, publishes and public edits.

    9.5k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Worktrunk Release Workflow

    max-sixty/worktrunk

    Walks a maintainer through cutting a Worktrunk release: sync the release branch, pass two test gates, review the changes, then publish.

    9k GitHub stars~6.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks a maintainer through publishing a pybind11 release after the preparation PR merges, with preflight checks, confirmations before each push and a GitHub release.

    18k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Obot Release Notes Drafter

    obot-platform/obot

    Drafts release notes for an upcoming Obot minor release and saves them as an unpublished GitHub draft release, never tagging or publishing.

    1.1k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed

More from codervisor/leanspec

  • Leanspec

    codervisor/leanspec

    The spec-coding methodology for AI-assisted development. An agent skill from codervisor/leanspec.

    296 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Leanspec Development

    codervisor/leanspec

    Development workflows, commands, publishing, CI/CD, changelog management, and contribution guidelines for LeanSpec.

    296 GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Leanspec Dev Process

    codervisor/leanspec

    The end-to-end spec-issue-driven dev loop for lean-spec — spec → branch → implement → PR → merge → closure.

    296 GitHub stars~3.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Leanspec Pre Push

    codervisor/leanspec

    Run before pushing code to the lean-spec repo to catch what reviewers and CI will catch later, and confirm the branch has a linked spec issue in a valid state.

    296 GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Watch CI

    codervisor/leanspec

    Watch GitHub Actions CI status for the current commit until completion.

    296 GitHub stars~724 tokensUpdated 4 mo ago
    Auto-check: notes

Works with

Categories

Questions about Leanspec PR Lifecycle

What does Leanspec PR Lifecycle do?

Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on…. Leanspec PR Lifecycle is an agent skill from codervisor/leanspec. Manage a lean-spec PR after it's been pushed — spec-issue linking, CI triage, review-comment discipline, merge-conflict recovery on open PRs, webhook subscription, and CHANGELOG follow-through on merge.

When should I use Leanspec PR Lifecycle?

Leanspec PR Lifecycle fits situations like: include CI is failing; link this issue; closes vs Part of; respond to review.

How do I install Leanspec PR Lifecycle in Claude Code?

Run `npx skills add codervisor/leanspec --skill leanspec-pr-lifecycle -a claude-code`. Or copy the skill folder (.agents/skills/leanspec-pr-lifecycle in codervisor/leanspec) into .claude/skills/leanspec-pr-lifecycle in your project. Claude Code loads it when a task matches its description.

How do I install Leanspec PR Lifecycle in Codex?

Run `npx skills add codervisor/leanspec --skill leanspec-pr-lifecycle -a codex`. Or copy the skill folder (.agents/skills/leanspec-pr-lifecycle in codervisor/leanspec) into .agents/skills/leanspec-pr-lifecycle in your project. Codex loads it when a task matches its description.

Can I use Leanspec PR Lifecycle in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codervisor/leanspec --skill leanspec-pr-lifecycle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/leanspec-pr-lifecycle, .gemini/skills/leanspec-pr-lifecycle, .github/skills/leanspec-pr-lifecycle and .opencode/skills/leanspec-pr-lifecycle in your project.

What does Leanspec PR Lifecycle need to run?

Going by SKILL.md and its folder, Leanspec PR Lifecycle needs the command-line tools its instructions call (git, gh, pnpm and cargo).

Does Leanspec PR Lifecycle access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Leanspec PR Lifecycle safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Leanspec PR Lifecycle use?

Leanspec PR Lifecycle is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Leanspec PR Lifecycle use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Leanspec PR Lifecycle?

Skills that share tags, products or a category with Leanspec PR Lifecycle: Release Bump (jamiepine/voicebox, 57k stars), Go-Redis Release Preparation (redis/go-redis, 22k stars), Hunk Release Workflow (modem-dev/hunk, 9.5k stars) and Worktrunk Release Workflow (max-sixty/worktrunk, 9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Leanspec PR Lifecycle?

codervisor (a GitHub organization) maintains it in codervisor/leanspec, which has 296 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on May 20, 2026.

Source: codervisor/leanspec on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.