agentleFS
mhmzdevmhmzdev/hisab-whatsapp/.agents/skills/open-pr/SKILL.md

open-pr

Skill9 starsChanged 3 months agoMITView on GitHub

Open or update the PR for the current branch against main with the fixed body shape (Why in plain English, Change Summary, Major Impact, Linked Issue, Test Plan seeded from the feat-checklist). Rescues work stranded on main onto a branch. Confirms before any push; never force-pushes; never pushes to main. Use when the user says "open a PR", "ship this", "put this up for review".

  • Reads credentials
  • Commits and pushes

73 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use open-issue, implement-change and 10 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.
  • dlupiakSkill

    open-issue

    Analyze a change request, ask clarifying questions, and create a well-structured GitHub issue with acceptance criteria. Use this skill whenever the user wants to create an issue, write a ticket, log a bug, propose a feature request, or capture requirements — even if they say "let's track this" or "add this to the backlog".

    Also in 3 projects that use this

  • Codagent-AISkill

    implement-change

    Implements an approved change in one continuous session, with tiered test runs. Use when asked to implement a change from its approved definition, or to invoke codagent:implement-change.

    Also in 3 projects that use this

  • thlaureSkill

    review-change

    Use this skill when the user asks for a code review, a correctness pass, a check before PR, or asks whether a Signalist change follows project conventions.

    Also in 4 projects that use this

  • saffron-healthSkill

    address-review

    Address PR review comments systematically. Use when responding to code review feedback on a pull request.

    Also in 3 projects that use this

  • DataCoveySkill

    commit-push

    Commit and push the changes made on this chat session to the current branch. Use best practices from Conventional Commits.

    Also in 3 projects that use this

  • AnthropicSkill

    write-spec

    Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea or user request into a structured document, scoping a feature with goals and non-goals, defining success metrics and acceptance criteria, or breaking a big ask into a phased spec.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 72 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the body to a tempfile.

    line 48
  2. Distinctive:

    Only labels that exist and fit.

    line 51

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

Open PR

Honour .agents/skills/README.md. Last step: … → /review → **/open-pr**. Only on request; it is outward-facing. Never push, commit or gh pr create without the user's confirmation (Phase 5).

Facts from AGENTS.md: trunk = main, issues_repo = mhmzdev/hisab-whatsapp, labels = only what gh label list returns (none is fine), attribution = keep (the repo's commits carry the Claude trailer; the PR body ends with the standard line and the session link — copy the form from git log -3).

Phase 1 — State

In parallel: git status --short, git branch --show-current, git fetch origin --quiet, git log --oneline origin/main..HEAD, gh pr view <branch> --json number,state,url (existing PR?), gh auth status.

  • Feature branch, commits ahead, clean → Flow A.
  • Feature branch, dirty → ask: include these files or not? Stage only named files.
  • On main with commits ahead or a dirty tree → Flow B (rescue): branch off HEAD first (git checkout -b GH-<N>-<topic> or <topic>), then git branch -f main origin/main. Dirty tree: git stash push -u, checkout main, pull --ff-only, branch, stash pop. Never reset --hard; stop on conflict.
  • Existing open PR → update it (gh pr edit), never a duplicate.

Phase 2 — Linked issue

First match wins, never invented: numeric argument → the plan's frontmatter issue: for this branch → GH-<N> in the branch name → Closes #N in commit messages → gh issue list --search only if unambiguous (confirm). Verify with gh issue view N. Found → Closes #N; not found → _None._.

Phase 3 — Title and body

Title: conventional-commit shape, imperative, under ~70 chars, matching git log on main.

Body, headings verbatim, in this order; _None._ where honestly nothing, except Why, which is never empty:

## Why
<2–4 plain-English sentences for someone who has not seen the diff: what was wrong or missing, who it affected, what is true once this merges. Link the issue inline. No paths, no symbols.>

## Change Summary
<2–4 factual sentences for the reader who will open the diff: approach, files, what was chosen over the obvious alternative. Reference the plan path.>

## Major Impact
<One bullet per concrete breakage risk: a tool schema change, a store record shape, a ledger convention, a config key, a language string. Else _None._>

## Linked Issue
<Closes #N, or _None._>

## Test Plan
<Unchecked boxes seeded from docs/feat-checklist/<slug>.md: each [?] becomes a manual step verbatim; each [x] with a named test becomes "`<test>` passes"; a [!] means stop and say so. No checklist → one box per substantive change. Always end with: `- [ ] python3 tests/smoke.py — clean` (no CI runs it yet).>

## Deploy prerequisites
<Only when needed: a new config key (config.example.yaml), a new env var (.env.example), a Docker change that needs a rebuild. Omit otherwise.>

Write the body to a tempfile. End it with the attribution line and session link the repo's commits use.

Phase 4 — Labels

Only labels that exist and fit; none is the normal case.

Phase 5 — Confirm and wait

Branch: <branch> → main    (new PR | updating #N)
Title:  <title>      Labels: <list|none>
Commits: <n> — one line each
Flow B plan, if any
<rendered body>
Push and open/update the PR?

Any redirect → apply and re-present. Never proceed on silence.

Phase 6 — Execute and verify

git push -u origin <branch>; gh pr create --repo mhmzdev/hisab-whatsapp --base main --head <branch> --title … --body-file … (or gh pr edit). Then gh pr view --json number,title,url,baseRefName,body: every required heading present, else fix. gh issue develop <N> to link. Report: URL, title, base, created vs updated, every Deploy prerequisite bullet verbatim, the unchecked Test Plan items.

What NOT to do

  • Force push, push to main, reset --hard, stash without -u, auto-resolve a conflict, git add -A unasked. Open without confirmation. Duplicate a PR. Fabricate or omit Closes #N. Write the Why in code or as a restatement of the summary. Tick a Test Plan box. Move the board card.

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.