agentleFS
gspencergooggspencergoog/skills/skills/ship-it/SKILL.md

ship-it

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Codifies the end-to-end code preparation, quality audit, and PR shipping workflow. Use when preparing code to ship out for review, including: (1) PR segmentation & stacking analysis, (2) Unit test creation, test quality auditing, and 90%+ coverage enforcement, (3) Iterative subagent API and code review homeostasis loops, (4) Code documentation, CHANGELOG, and README synchronization, and (5) Post-PR draft creation, CI tracking, and feedback handling.

  • Commits and pushes

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-it, modern-go and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jidechaoSkill

    review-it

    Code review closeout for Claude Code, Codex, OpenCode, DeepSeek TUI, and Antigravity CLI: local dirty changes, branch vs main, parallel tests.

    Also in 4 projects that use this

  • jidechaoSkill

    modern-go

    Modernize Go code by applying version-appropriate idioms and APIs (gofix-style transformations). Scans go.mod for the Go version, then transforms Go source files to use modern patterns—from Go 1.0 through 1.26+. Use when the user says "现代化","现代Go语言", "地道的", "idiomatic", "modernize", "modern-go", "update Go code", "gofix", or wants to upgrade Go idioms.

    Also in 3 projects that use this

  • MicrosoftSkill

    launch

    Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test UI features, take screenshots, set breakpoints in the renderer / extension host / main process, or combine UI driving with debugging.

    Also in 3 projects that use this

  • ninehillsSkill

    to-issues

    Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.

    Also in 3 projects that use this

  • GitHubSkill

    prd

    Generate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.

    Also in 3 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 3 projects that use this

  • +2 more from jidechao

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 9 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run git status --porcelain to inspect untracked files and uncommitted working tree changes.

    line 27
  2. Distinctive:

    Run static analyzer / linter before executing tests to catch syntax or type errors early:

    line 50
  3. Distinctive:

    Add missing unit tests for uncovered lines or branch conditions until all modified/new files achieve >= 90% line and branch coverage.

    line 60
  4. Distinctive:

    Ensure every bug fix introduced during the conversation has a dedicated, failing-before-fix regression test.

    line 63
  5. Distinctive:

    Run the cognitive-complexity analyzer on all modified or newly added source files to check for maintainability hotspots:

    line 65
  6. Distinctive:

    If any new or modified functions exceed the threshold (score > 15), refactor them (e.g., using Extract Method or Guard Clauses) to reduce …

    line 67
  7. Very specific:

    Commit clean state: git commit -m "refactor(api): apply API review mitigations".

    line 81
  8. Very specific:

    Oscillation Detection: If a finding touches lines previously modified in a prior review iteration, use ask_question to ask the user how to …

    line 87
  9. Distinctive:

    Homeostasis Reached: Stop looping when a review pass yields zero findings across all severity levels (or after max 5 iterations).

    line 88
  10. Very specific:

    Ensure comprehensive, high-quality inline documentation (docstrings / dartdocs / JSDoc / type hints) is written for all public APIs …

    line 103
  11. Distinctive:

    Check if CLI flags, configuration schemas, installation procedures, breaking changes, or public API usage changed.

    line 105
  12. Very specific:

    Missing README.md Detection: If no README.md exists in the component/package root and creating one would benefit the project, explicitly …

    line 107
  13. Distinctive:

    Run the full test suite one final time to verify all tests pass.

    line 109
  14. Very specific:

    Commit documentation updates (git commit -m "docs: sync inline documentation, README, and CHANGELOG").

    line 110
  15. Very specific:

    Feedback Resolution Selection: If CI fails or review comments exist, prompt the user via ask_question:

    line 124

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ship-It: End-to-End Code Preparation & PR Shipping Workflow

This skill guides agents through a rigorous, multi-step checklist before code is shipped out for peer review. It ensures high quality, high test coverage, clean public APIs, well-structured PR segmentation, comprehensive code documentation, up-to-date project documentation (README/CHANGELOG/design docs), and post-PR creation draft tracking.


Procedural Workflow Summary

Execute these 5 phases sequentially:

  1. Phase 1: PR Segmentation & Stacking Analysis (Pre-flight git status check, diff scope analysis, and stacked worktree proposals)
  2. Phase 2: Per-Branch Static Analysis & Test Audit (Linter/analyzer gate, 90%+ coverage enforcement, and test quality audit)
  3. Phase 3: Per-Branch Review Homeostasis Loop (Iterative subagent API & code reviews until clean)
  4. Phase 4: Per-Branch Documentation Sync & PR Description (Code docs via code-documentation skill, README/CHANGELOG/design doc updates via write-prose skill, and PR description)
  5. Phase 5: Post-PR Creation Draft Tracking & Feedback Handling (Prompt user to submit Draft PR, schedule CI/comment checks, handle feedback, and mark ready for review)

Phase 1: PR Segmentation & Stacking Analysis

  1. Pre-flight Working Tree Check:
    • Run git status --porcelain to inspect untracked files and uncommitted working tree changes.
    • If uncommitted or untracked changes are found: Explicitly prompt the user via ask_question asking what to do with them (e.g. stage and commit them into the current branch, stash them, or include them in the diff scope calculation).
  2. Evaluate Diff Scope:
    • Inspect git branch diff stat against base branch (e.g. git diff --stat main...HEAD), and then inspect the individual diffs in groups or per-file (git diff main...HEAD -- <files...>) for large changesets rather than pulling large raw diffs all at once, but do look at all the diffs.
    • Evaluate if the change should remain a single PR or be split into stacked PRs:
      • Total diff > 500 lines of code (excluding lockfiles/generated files)?
      • Contains distinct logical layers (e.g. refactoring vs. new feature vs. API extension)?
      • Touches unrelated modules requiring different domain reviewers?
  3. If segmentation is needed:
    • Refer to pr_segmentation.md for criteria and stacking plan rules.
    • Generate a PR Stacking Plan Proposal artifact (pr_stacking_plan.md) outlining stacked branches, dedicated git worktree locations, and commands.
    • Present the proposed stacking plan to the user using the grill-me skill for alignment before executing worktree creation.
  4. If single PR is sufficient: Proceed directly to Phase 2 on the current branch.

Phase 2: Per-Branch Static Analysis & Test Audit

Execute on each branch/worktree in the stack:

  1. Project & Language Auto-Detection:
    • Identify project type via manifest files (pubspec.yaml -> Dart/Flutter, pyproject.toml/setup.py -> Python, package.json -> Node/TS, Cargo.toml -> Rust, go.mod -> Go).
  2. Pre-Test Linter & Analyzer Gate:
    • Run static analyzer / linter before executing tests to catch syntax or type errors early:
      • For Dart/Flutter: Use Dart MCP analyze_files tool.
      • For Python: Run ruff check / flake8 / mypy.
      • For TypeScript/Node: Run tsc --noEmit / npm run lint.
    • Fix all analyzer errors before proceeding to test execution.
  3. Run Test Suite with Coverage:
    • For Python: pytest --cov
    • For Dart/Flutter: Dart MCP run_tests or flutter test --coverage
    • For TypeScript/Node: jest --coverage / npm test
  4. Enforce 90%+ Coverage Target:
    • Add missing unit tests for uncovered lines or branch conditions until all modified/new files achieve >= 90% line and branch coverage.
  5. Audit Test Quality:
    • Refer to test_quality_audit.md for quality dimensions (hermaticity, false positives, assertion precision, timing hygiene).
    • Ensure every bug fix introduced during the conversation has a dedicated, failing-before-fix regression test.
  6. Cognitive Complexity Audit:
    • Run the cognitive-complexity analyzer on all modified or newly added source files to check for maintainability hotspots: python3 <skillsDir>/cognitive-complexity/scripts/cognitive_complexity.py <modified_files> --threshold 15 --verbose
    • If any new or modified functions exceed the threshold (score > 15), refactor them (e.g., using Extract Method or Guard Clauses) to reduce cognitive complexity before proceeding to review.

Phase 3: Per-Branch Review Homeostasis Loop

[!NOTE] ORDER DEPENDENCY: Execute the API Review Pass BEFORE deep Code Review. Settle public method signatures, class hierarchies, naming conventions, and parameter types first so internal code review is not wasted on implementation details that change during API refactoring.

Execute iterative review passes on the current branch/worktree:

  1. API Review Pass:
    • Launch an isolated subagent (Workspace: "inherit") to perform a review following the api-review skill on modified public interfaces.
    • Implement recommended mitigations for findings across all severity levels (HIGH, MEDIUM, and objective LOW).
    • Commit clean state: git commit -m "refactor(api): apply API review mitigations".
  2. Code Review Iterative Loop:
    • Refer to review_homeostasis.md for subagent prompt templates, oscillation handling rules, and homeostasis criteria.
    • Launch a subagent (Workspace: "inherit") following the code-review skill on the working directory diff.
    • Parse findings (HIGH, MEDIUM, and LOW).
    • Apply fixes, run unit tests, and commit changes (git commit -m "fix(review): address review comments").
    • Oscillation Detection: If a finding touches lines previously modified in a prior review iteration, use ask_question to ask the user how to resolve the conflicting recommendations.
    • Homeostasis Reached: Stop looping when a review pass yields zero findings across all severity levels (or after max 5 iterations). Terminate all active subagents using manage_subagents with Action 'kill_all' before proceeding to Phase 4 (Documentation Sync).

Phase 4: Per-Branch Documentation Sync & PR Description

[!NOTE] ORDER DEPENDENCY: Phase 4 MUST be executed AFTER Phase 3 Homeostasis is reached. Inline docstrings, README updates, and CHANGELOG entries must document finalized, refactored API signatures rather than intermediate or obsolete code.

[!IMPORTANT] PROSE WRITING STANDARDS All written prose (inline docstrings, README updates, CHANGELOG entries, design docs, commit messages, PR descriptions, and user reports) MUST strictly follow the plain language and anti-AI-ism guidelines in the write-prose skill.

  1. Comprehensive Code-Level Documentation:
    • Audit 100% of newly added or modified public symbols (classes, methods, functions, types, constants, parameters).
    • Ensure comprehensive, high-quality inline documentation (docstrings / dartdocs / JSDoc / type hints) is written for all public APIs following the code-documentation skill guidelines.
  2. Project, README, CHANGELOG & Design Documentation:
    • Check if CLI flags, configuration schemas, installation procedures, breaking changes, or public API usage changed.
    • Audit and update existing project documentation files (README.md, CHANGELOG.md, proposal/design RFC documents, package guides) using write-prose skill standards.
    • Missing README.md Detection: If no README.md exists in the component/package root and creating one would benefit the project, explicitly prompt the user via ask_question asking if they would like a new README.md generated.
  3. Final Verification:
    • Run the full test suite one final time to verify all tests pass.
    • Commit documentation updates (git commit -m "docs: sync inline documentation, README, and CHANGELOG").
  4. Summary & PR Description:
    • Output a concise summary to the user outlining coverage stats, review loop iterations completed, and stacking structure.
    • Automatically run the write-pr-description skill (which orchestrates with the write-prose skill) to generate the PR title and description artifact for submission.

Phase 5: Post-PR Creation Draft Tracking & Feedback Handling

Refer to post_pr_creation.md for detailed execution steps:

  1. Prompt User for Draft Submission Approval: Present the generated PR description and prompt the user via ask_question for explicit permission to create the Draft PR on GitHub.
  2. Submit Draft PR: Upon approval, push branch and run gh pr create --draft (following gh-cli skill).
  3. 5-Minute CI & Feedback Schedule: Set a 5-minute schedule timer (schedule tool) to monitor CI status (gh pr checks) and review comments (analyze-github-pr script).
  4. Feedback Resolution Selection: If CI fails or review comments exist, prompt the user via ask_question:
    • Interactive Dashboard: Delegate to pr-feedback-handler skill (launch_dashboard.py).
    • Direct Fix & Respond: Fix findings directly, verify with unit tests, commit, push, and submit thread replies via pr-feedback-handler scripts (update_thread.py).
  5. Mark Ready for Review: Once CI passes and feedback is clean, prompt the user via ask_question and run gh pr ready to publish out of draft state.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.