pr-prepare
Skill1 starsChanged 7 months agoMITView on GitHub
Prepare a pull-request body from the current branch — runs /code-review pr, /test-coverage diff, /diff-deploy --validate, /security-scan, and assembles a Markdown PR body with summary, test plan, and gate results. Optionally posts via `gh pr create` if confirmed.
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- duncanmorris/agent-skillstheir own version, first seen Nov 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- duncanmorris/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- adrSkill
- agent-deploySkill
- agent-discoverSkill
- agent-eval-trendSkill
- agent-exchange-listSkill
- agent-specSkill
- agent-testSkill
- agent-vs-flow-vs-apexSkill
- before-vs-after-triggerSkill
- code-reviewSkill
- complexitySkill
- coverage-trendSkill
- dead-codeSkill
- dependency-graphSkill
- deploySkill
- destructive-changesSkill
- diff-deploySkill
- erdSkill
- field-impactSkill
- flaky-test-finderSkill
- flow-auditSkill
- flow-vs-apexSkill
- fls-auditSkill
- gateway-configSkill
- generate-docsSkill
- limit-usageSkill
- lwc-vs-reactSkill
- mcp-tool-vs-restSkill
- notifySkill
- onboardSkill
- org-diffSkill
- org-exploreSkill
- package-versionSkill
- pattern-packSkill
- perf-reviewSkill
- permset-auditSkill
- queueable-vs-batchSkill
- quick-deploySkill
- react-initSkill
- release-notesSkill
- scratch-orgSkill
- security-scanSkill
- sequence-diagramSkill
- sf-initSkill
- sharing-reviewSkill
- slack-agentSkill
- soql-analyzerSkill
- test-coverageSkill
- test-dataSkill
- test-planSkill
- trust-evalSkill
- trust-layer-auditSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
If there are no changes vs the base, exit 2 with a clear message.
- Very specific: line 132
Cite sub-skill outputs: If /code-review flagged a critical, the PR body shows it in Summary so the reviewer doesn't have to dig
- Distinctive: line 134
Skip "ADRs" section if none added: Don't pad the body with empty sections
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are preparing a pull-request body. The body is assembled from the outputs of several argo skills and presented as a single Markdown ready to paste (or push via gh).
Read Project Config First
source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/config.sh"
PROJECT_NAME="$(sf_config_get '.project.name' "$ENV")"
DEFAULT_ORG="$(sf_config_get '.platform.defaultTargetOrg' "$ENV")"Input
$ARGUMENTS:
- (empty) — generate PR body from current branch vs
main --vs <ref>— base ref (defaultmain)--out <path>— write to file (default stdout)--push— after generating, rungh pr createwith the body (only ifghCLI is installed and authed)--target-org <alias>/--env <name>— for the deploy validation step--no-validate— skip the deploy validation step (useful when prod can't be hit)
Steps
1. Compute git context
BASE="${VS:-main}"
HEAD_REF=$("$GIT" rev-parse --abbrev-ref HEAD)
CHANGED_FILES=$("$GIT" diff --name-only "$BASE...HEAD")
COMMIT_COUNT=$("$GIT" rev-list --count "$BASE...HEAD")If there are no changes vs the base, exit 2 with a clear message.
2. Run the skill chain in parallel (where possible)
/argo:code-review pr --ci --format json --out /tmp/pr-review.json
/argo:coverage-trend diff --vs "$BASE" --ci > /tmp/pr-coverage.json
/argo:diff-deploy --vs "$BASE" --validate --target-org "$DEFAULT_ORG" --ci > /tmp/pr-deploy.json
/argo:security-scan --ci --format json --out /tmp/pr-security.jsonCapture exit codes — they become PR-body badges.
3. Synthesize summary from commits
"$GIT" log "$BASE...HEAD" --pretty='format:%s' | grep -E '^(feat|fix|perf|refactor)' | head -5Map prefixes to bullet labels:
feat:→ "Adds"fix:→ "Fixes"perf:→ "Speeds up"refactor:→ "Refactors"
4. Assemble the body
## Summary
- Adds: paginated organizations table with status filter (acmeOrgList LWC, OrgController Apex)
- Fixes: Order_Item__c master-detail cascade delete bug (OrderTriggerHandler)
- Refactors: extracted shared retry policy into RetryPolicy.cls
(Drawn from <COMMIT_COUNT> commits since `<BASE>`.)
## Test plan
- [x] LWC unit tests pass (Jest, 47 tests, 0 failures)
- [x] Apex unit tests pass (run via /argo:test-coverage)
- [x] Apex coverage at or above target (87.7% overall, target 85%)
- [x] /argo:code-review pr — no critical findings
- [x] /argo:diff-deploy --validate against DevSandbox succeeded
- [x] /argo:security-scan — no critical findings
- [ ] Manual smoke (browser) — _reviewer to verify the LWC renders against acmeOrgList page_
## Gates
| Gate | Status |
|------|--------|
| Code review (PR scope) | ✅ no critical |
| Coverage trend | ✅ +0.2% overall, OrderApiClient regressed -8.7% (still > target) |
| Deploy validation | ✅ 12 components, tests passed |
| Security scan | ⚠️ 1 medium (SEC-USE-NAMED-CRED in legacy file — pre-existing) |
## Components changed
- LightningComponentBundle: acmeOrgList (new), acmeOrgRow (new)
- ApexClass: OrgController (new), OrgService (new), OrderTriggerHandler (modified)
- CustomObject (field-only changes): Order_Item__c.Discount_Pct__c (new)
## ADRs
(no new ADRs in this PR)
## Risk
- **Risk level**: Medium (master-detail relationship change on Order_Item__c)
- **Reversibility**: Backfill query + destructive change available; documented in ADR-0011
- **Mitigation**: validate against sandbox first, deploy off-hours
🤖 Body generated by /argo:pr-prepare. Re-run after pushing changes.If --push:
gh pr create --title "$(git log -1 --format=%s)" --body "$(cat /tmp/pr-body.md)"The title comes from the latest commit subject by default; user can override.
5. Output
Stdout (or --out file): the assembled Markdown.
CI mode: same body, plus exit 1 if any gate failed.
Exit codes
- 0 — body generated, all gates pass
- 1 — body generated, at least one gate failed (caller decides whether to push anyway)
- 2 — invocation error (no diff vs base, sub-skill failures)
Rules
- Always include the Test plan as an unchecked list for the reviewer's manual smoke step. Automation can check most rows; the reviewer keeps the last one
- Don't auto-push without
--push. Generating ≠ pushing; the user reviews first - Cite sub-skill outputs. If
/code-reviewflagged a critical, the PR body shows it in Summary so the reviewer doesn't have to dig - Don't include the AI co-author footer in the PR body. Strip lines matching
^Co-Authored-By:from the synthesized commit-subject summary - Skip "ADRs" section if none added. Don't pad the body with empty sections
Consumers
- Devs run before opening a PR
- CI runs to gate PR merges (looks for the body to be present and gates to pass)
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
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.

