agentleFS
Upsolve-LabsUpsolve-Labs/upstack/skills/ship-pr/SKILL.md

ship-pr

Skill17 starsChanged 8 months agoMITView on GitHub

Ship a feature branch: write docs, bump version, create PR with screenshots and evidence. Links Linear tickets if available. Use when ready to merge.

  • Commits and pushes

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ideate, orchestrate and 1 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.
  • OpenAISkill

    ideate

    Generate image-based alternatives, remixes, or new design directions from a Product Design brief. Use when the user asks for design variants, visual exploration, remixes, or image-generated approaches from provided context.

    Also in 3 projects that use this

  • blas0Skill

    orchestrate

    Also in 3 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/upstack/skills/upgrade/SKILL.md and follow the "Inline upgrade flow" …

    line 16
  2. Distinctive:

    All commits are pushed (or will be pushed).

    line 25
  3. Distinctive:

    If any check fails (other than #2, which is auto-resolved): report and stop.

    line 29
  4. Distinctive:

    Keep docs close to the code — update existing doc files rather than creating new ones where possible.

    line 38
  5. Very specific:

    Update VERSION, package.json, or pyproject.toml (whichever exists).

    line 48
  6. Very specific:

    If the diff includes files in UI/frontend packages AND evidence/screenshots/ is empty or missing: STOP and warn the user.

    line 53
  7. Distinctive:

    If screenshots exist: continue and embed them in the PR body using absolute GitHub blob URLs.

    line 56
  8. Very specific:

    Commit version + changelog + docs: chore: bump to vX.Y.Z

    line 59
  9. Very specific:

    Check for existing PR: gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number'

    line 61
  10. Very specific:

    If no PR exists: Create PR via gh pr create.

    line 63
  11. Distinctive:

    If none exist, write "No existing tickets or TODOs addressed."

    line 71
  12. Distinctive:

    When embedding screenshots in the PR body, use ABSOLUTE GitHub blob URLs, not relative paths.

    line 75
  13. Very specific:

    Do NOT use relative paths like !name — these are BROKEN in PR descriptions.

    line 88
  14. Distinctive:

    If authenticated, for each ticket referenced in TODOS.md:

    line 107
  15. Distinctive:

    If the CLI command fails: warn but do not block.

    line 112

“Common” is measured: kept by at least 6 in 10 of the 13 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

Update Check (run first)

_UPD=$(~/.claude/skills/upstack/bin/upstack-update-check 2>/dev/null || .claude/skills/upstack/bin/upstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true

If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/upstack/skills/upgrade/SKILL.md and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If JUST_UPGRADED <from> <to>: tell user "Running upstack v{to} (just updated!)" and continue.

Ship PR

Three-in-one: documentation, versioning, and PR creation. No confirmation pauses once the version is decided.

Pre-flight (abort if any fail)

  1. Working tree is clean.
  2. On a feature branch (not main/master). If on main/master, auto-create a branch named after the work (e.g., feat/short-description or fix/short-description based on the changes) and switch to it before continuing.
  3. All commits are pushed (or will be pushed).
  4. gh CLI is available and authenticated.
  5. Tests pass.

If any check fails (other than #2, which is auto-resolved): report and stop. Do not ask to continue.

Step 1: Documentation (do not skip)

Review and update these. Report each as UPDATED or NO CHANGE NEEDED (with reason):

  1. README.md — does it reflect the new feature/fix?
  2. CHANGELOG.md — will be updated in Step 2, but note the entry now.
  3. Any docs/ folder or inline doc comments in changed files.
  4. CLAUDE.md — if conventions or workflow changed.

Keep docs close to the code — update existing doc files rather than creating new ones where possible. At minimum, review each item above and report your finding.

Step 2: Version + Changelog

AskUserQuestion — the ONLY interactive step: "Current version: [X.Y.Z]. Changes suggest [type]. Which version?

  1. Patch (X.Y.Z+1) — bug fixes
  2. Minor (X.Y+1.0) — new features, backward compatible
  3. Major (X+1.0.0) — breaking changes
  4. Skip version bump"

Update VERSION, package.json, or pyproject.toml (whichever exists). Update CHANGELOG.md.

Step 3: PR Creation (no pauses from here)

Screenshot Check (run before creating or updating the PR)

  • If the diff includes files in UI/frontend packages AND evidence/screenshots/ is empty or missing: STOP and warn the user. Recommend running /validate or capturing screenshots now.
  • If screenshots exist: continue and embed them in the PR body using absolute GitHub blob URLs.
  • Organize screenshots by feature or mode (e.g., "Docker mode" vs "Sprites mode").
  1. Commit version + changelog + docs: chore: bump to vX.Y.Z
  2. Push branch to remote.
  3. Check for existing PR: gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number'
    • If PR exists: Skip gh pr create — the push already updated the PR. Optionally run gh pr comment <number> --body "..." summarizing the new changes.
    • If no PR exists: Create PR via gh pr create. PR description includes:
      • Feature summary
      • Screenshots (see Screenshot Embedding below)
      • API examples from evidence/api/ or link to collection
      • Closes / Addresses section (MANDATORY — always include, even if empty):
        • TODOS.md items addressed by this PR (e.g., "Completes P1-2: Fix auth token refresh")
        • Linear ticket references using Closes ENG-xxx keyword format so Linear's GitHub integration auto-tracks PR completion
        • Codebase TODO/FIXME comments resolved (file:line references)
        • If none exist, write "No existing tickets or TODOs addressed."
  4. Mark completed items in TODOS.md as done (change - [ ] to - [x]).

Screenshot Embedding

When embedding screenshots in the PR body, use ABSOLUTE GitHub blob URLs, not relative paths. Relative paths do not render in PR descriptions.

Format:

![description](https://github.com/{owner}/{repo}/blob/{branch}/evidence/screenshots/{filename}.png?raw=true)

Construct the URL from:

  • gh repo view --json nameWithOwner --jq '.nameWithOwner' → owner/repo
  • git branch --show-current → branch name
  • The screenshot filename in evidence/screenshots/

Do NOT use relative paths like ![name](evidence/screenshots/name.png?raw=true) — these are BROKEN in PR descriptions.

On Failure

Report which step completed and which failed. Do NOT attempt to rollback.

Linear Integration

Scan TODOS.md for Linear ticket references (patterns: [ENG-xxx](url), LINEAR: ENG-xxx, or bare ENG-xxx identifiers).

PR body keywords (primary mechanism)

Include Closes ENG-xxx in the PR description for each relevant ticket. Linear's GitHub integration detects these keywords and:

  • Links the PR to the Linear issue automatically
  • Moves the issue to "Done" when the PR merges

CLI fallback (when Linear CLI is authenticated)

# Check if linear CLI is available and authenticated
which linear 2>/dev/null && linear me 2>/dev/null

If authenticated, for each ticket referenced in TODOS.md:

linear issue update <issue-id> --add-link "<pr-url>"

If the CLI command fails: warn but do not block. The PR body keywords are the primary tracking mechanism.

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.