agentleFS
alabenkhlifaalabenkhlifa/dayjob/skills/ship-pr/SKILL.md

ship-pr

Skill1 starsChanged 30 days agoMITView on GitHub

Use when the user wants to commit their work, write commit messages, ship a branch, push, or open or prepare a pull request (PR/MR) and its description.

  • Reads credentials
  • Commits and pushes

26 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ideate, triage 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.
  • 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 4 projects that use this

  • Google CloudSkill

    triage

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

    Also in 4 projects that use this

  • GoogleSkill

    diagnosing-bugs

    Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

    Also in 3 projects that use this

  • GoogleSkill

    domain-modeling

    Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.

    Also in 3 projects that use this

  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

  • +3 more from google

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 5

    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
  • could be automatic: a setting could enforce it
  1. Very specific:

    If <base> comes back empty (no origin/HEAD and no main or master), ask the user which branch is the base before going on.

    line 26
  2. Very specific:

    On the base branch with changes: create a branch first, git switch -c <type>/<short-slug>, named after the change.

    line 30
  3. Very specific:

    Incident notes stay out: leave incident-*.md and postmortem-*.md unstaged unless the user asks to commit them.

    line 32
  4. Distinctive:

    Stage by explicit path: Never git add -A, git add ., git add --all, or git commit -a.

    line 33
  5. Distinctive:

    Run the project's tests or lint if it has them.

    line 34
  6. Distinctive:

    Use the repo's template if there is one.

    line 42
  7. Very specific:

    If the remote is not GitHub (e.g.

    line 69
  8. Very specific:

    If git push fails with "Repository not found" or a 403, retry it with that account's token: git -c credential.helper= -c …

    line 76
  9. Distinctive:

    Never push or open a PR without an explicit yes.

    line 80
  10. Distinctive:

    Never commit to the base branch unless the user explicitly asks to.

    line 81
  11. Very specific:

    Never stage secrets; never use add -A, add ., or commit -a.

    line 82

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

Turn the working tree into clean commits and a PR description a reviewer can read in a minute.

1. Look

base=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')
[ -n "$base" ] || base=$(git branch --list main master | head -1 | tr -d ' *')
git status --short --branch
git diff --stat; git diff --cached --stat; git diff --cached --name-only
git log --oneline <base>..HEAD
git log -10 --format=%s <base>

<base> is the remote's default branch (snippet above), falling back to main or master. Also look for a PR template: .github/pull_request_template.md or .github/PULL_REQUEST_TEMPLATE/.

If <base> comes back empty (no origin/HEAD and no main or master), ask the user which branch is the base before going on.

2. Guard

  • On the base branch with changes: create a branch first, git switch -c <type>/<short-slug>, named after the change. Never commit to the base branch unless the user explicitly asks to commit to it.
  • Never stage secrets or junk: .env*, *.pem, *.key, credential files, node_modules/, build output, large binaries. If any are untracked, leave them out, tell the user, and suggest a .gitignore line. If one is already staged (check git diff --cached --name-only), unstage it with git restore --staged <file>, tell the user, and suggest .gitignore.
  • Incident notes stay out: leave incident-*.md and postmortem-*.md unstaged unless the user asks to commit them.
  • Stage by explicit path. Never git add -A, git add ., git add --all, or git commit -a.
  • Run the project's tests or lint if it has them; report failures before committing.

3. Commit

One concern per commit. Follow the repo's message style from step 1; default to conventional commits: type(scope): imperative summary, max 72 characters, with a body explaining why when it is not obvious.

4. PR description

Use the repo's template if there is one. Otherwise:

## What
- <what changes for users or callers>

## Why
<the problem, or the ticket link>

## How to test
<steps or commands>

## Risk
<what could break: migrations, flags, config>

The title follows the commit style.

5. Hand off

Show the commits made and the PR draft, then ask: "Push and open the PR?" Only after a yes:

git push -u origin <branch>
gh pr create --title "<title>" --body-file <file>

If the remote is not GitHub (e.g. GitLab) or gh is missing, give the push command and the compare/MR URL or paste-ready text instead of gh pr create.

gh account: the user may have several gh accounts, and the active one may not see this repo. Before the first gh call, list each account's access:

for u in $(gh auth status 2>&1 | sed -n 's/.*account \([^ ]*\).*/\1/p'); do echo "$u $(GH_TOKEN=$(gh auth token --user "$u") gh repo view --json viewerPermission -q .viewerPermission 2>/dev/null)"; done; true

Pick the first account with ADMIN, MAINTAIN or WRITE, else one with READ or TRIAGE. If none shows a permission, skip every gh call. Run every gh call as that account, GH_TOKEN=$(gh auth token --user <account>) gh ..., with 2>/dev/null. Never run gh auth switch. If git push fails with "Repository not found" or a 403, retry it with that account's token: git -c credential.helper= -c 'credential.helper=!f(){ echo username=<account>; echo "password=$(gh auth token --user <account>)"; }; f' push -u origin <branch>.

Rules

  • Never push or open a PR without an explicit yes.
  • Never commit to the base branch unless the user explicitly asks to.
  • Never stage secrets; never use add -A, add ., or commit -a.

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.