agentleFS
ethosagentethosagent/ethos/skills/github/github-pr-workflow/SKILL.md

github-pr-workflow

Skill22 starsChanged 8 days agoMITView on GitHub

End-to-end PR lifecycle — branch, commit, push, open PR, watch CI, merge. Each step structured; user can interrupt anywhere. Uses `gh` CLI; pairs with the process tool for non-blocking CI watch.

  • Installs packages
  • Commits and pushes

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use find-nearby, webhook-subscriptions and 6 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.
  • math-incSkill

    find-nearby

    Find nearby places (restaurants, cafes, bars, pharmacies, etc.) using OpenStreetMap. Works with coordinates, addresses, cities, zip codes, or Telegram location pins. No API keys needed.

    Also in 3 projects that use this

  • Tommy-ywSkill

    webhook-subscriptions

    Create and manage webhook subscriptions for event-driven agent activation, or for direct push notifications (zero LLM cost). Use when the user wants external services to trigger agent runs OR push notifications to chats.

    Also in 3 projects that use this

  • math-incSkill

    minecraft-modpack-server

    Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.

    Also in 3 projects that use this

  • +5 more from math-inc

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When changes are not yet test-clean, do not invoke this skill — finish the change first.

    line 36
  2. Distinctive:

    Run these checks before the first git command.

    line 40
  3. Very specific:

    If gh is not installed: stop and print the install command (npm i -g @anthropic-ai/claude-code is the wrong one.

    line 46
  4. Very specific:

    start with the imperative verb of the change: add-rate-limit, fix-stale-cache

    line 62
  5. Very specific:

    if there's a tracking issue, prefix with the number: 1234-add-rate-limit

    line 63
  6. Very specific:

    Never use --force or --force-with-lease here.

    line 83
  7. Very specific:

    With process tool: start gh pr checks --watch as a background process.

    line 110
  8. Very specific:

    Without process tool: run gh pr checks --watch synchronously, but warn the user this will block the chat until CI finishes.

    line 111
  9. Very specific:

    Read the failed checks: gh pr checks <number> --json name,state,conclusion

    line 118
  10. Very specific:

    Never use --no-verify to skip hooks: If a pre-commit hook fails, fix the underlying issue.

    line 126
  11. Very specific:

    Verify: gh auth status should print "Logged in to github.com as ...".

    line 132

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

GitHub PR Workflow

Linear, structured walk through branch → commit → push → PR → CI → merge. Every step prints what it did so the user can interrupt.

When to use this skill

  • User said "open a PR", "submit this for review", "let's PR this".
  • A feature is complete, tests pass, and the next natural action is publishing.

When changes are not yet test-clean, do not invoke this skill — finish the change first.

Step 0 — preflight

Run these checks before the first git command. Each one prints its result and only proceeds when the user has not interrupted.

  • gh auth status — must succeed. If not, stop and tell the user: "run gh auth login and retry".
  • git remote -v — at least one remote configured.
  • git status --porcelain — capture the dirty state for step 1.

If gh is not installed: stop and print the install command (npm i -g @anthropic-ai/claude-code is the wrong one; use the platform-specific install per cli.github.com).

Step 1 — clean working tree

Either commit/stash existing changes, or fold them into the PR you are about to open. Ask the user when ambiguous; do not silently stash.

Step 2 — create the branch

Branch off main (or the repo's default branch — read it from gh repo view --json defaultBranchRef).

git switch -c <branch-name>

Branch name conventions:

  • kebab-case
  • start with the imperative verb of the change: add-rate-limit, fix-stale-cache
  • if there's a tracking issue, prefix with the number: 1234-add-rate-limit

Step 3 — commit

One commit per coherent change. Commit message format:

<scope>: <imperative summary>

<optional body explaining why, not what>

For large changes, prefer multiple focused commits over one monster commit. The PR is the unit of review; the commits inside it tell the story of how the change was constructed.

Step 4 — push

git push -u origin <branch-name>

Never use --force or --force-with-lease here. This is a fresh branch with no upstream history to overwrite.

Step 5 — open the PR

gh pr create --title "<title>" --body "<body>"

Body shape:

## Summary
<1-3 sentences>

## Test plan
- <bulleted checklist of what to verify>

## Related
<links to issues / docs / prior PRs>

Title is a single line, sentence-case, under 70 characters.

Step 6 — watch CI

Two paths depending on tool availability:

  • With process tool: start gh pr checks --watch as a background process. The chat is not blocked; the user can keep working. Poll status with process_logs when the user asks.
  • Without process tool: run gh pr checks --watch synchronously, but warn the user this will block the chat until CI finishes.

Step 7 — handle the result

On green: print the PR URL. Ask the user whether to merge. Do not auto-merge.

On red:

  1. Read the failed checks: gh pr checks <number> --json name,state,conclusion
  2. For the first failure, fetch logs and propose a fix.
  3. Apply the fix on the branch, push, return to Step 6.

Hard rules

  • Never auto-merge. Merge is a deliberate action by the user, even when CI is green.
  • Do not push to main directly. This skill is PR-only.
  • Never use --no-verify to skip hooks. If a pre-commit hook fails, fix the underlying issue.

Setup the user needs to do once

  1. Install gh: brew install gh (macOS), per cli.github.com for other OSes.
  2. Authenticate: gh auth login. Follow the browser flow.
  3. Verify: gh auth status should print "Logged in to github.com as ...".

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.