agentleFS
JQ-WCodingJQ-WCoding/devkit/skills/pr-publish/SKILL.md

pr-publish

Skill1 starsChanged 11 days agoMITView on GitHub

Review the branch, draft a PR/MR title and body, then create or update it with gh or glab after confirmation. Use for "open a PR", "create an MR", "update the MR body".

  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. ku5ic/claude-kit★ 2same 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 repository14 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Read the full change list and diff at the pinned SHA, and read callers as of that SHA (git show <sha>:<path>).

    line 27
  2. Very specific:

    If checks are needed, suggest devkit:check (a user-invoked skill).

    line 30
  3. Very specific:

    If there is an issue key, follow the linking style in git.md (title prefix, Closes #45 or Refs ABC-123 in the body, etc.).

    line 36
  4. Very specific:

    Do not write checks that were not run as passed.

    line 39
  5. Distinctive:

    Check whether an open PR/MR exists and say whether you will create or update.

    line 40
  6. Distinctive:

    Ask once whether to publish as is.

    line 42
  7. Very specific:

    Check authentication (gh auth status / glab auth status).

    line 47
  8. Distinctive:

    After publishing, confirm source, target and head SHA match the reviewed values, and report the link.

    line 59
  9. Distinctive:

    If the authenticated account is not a personal one (bot token etc.), say the author will show as that account.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PR/MR review and publish

Invoking this skill does not by itself approve code changes, commits, pushes or merges. Follow the branch and PR rules in the repo's docs/rules/git.md if present.

1. Pin the targets

  • Source is the argument or the current branch. Target is the argument → the flow in git.md → the remote default branch (git symbolic-ref refs/remotes/origin/HEAD).
  • Query the remote and pin the SHAs. Do not change the working tree with ad-hoc stash, checkout or reset.
git fetch --no-tags origin <source> <target>
git rev-parse origin/<source> origin/<target>
git merge-base origin/<target> origin/<source>
  • What goes into the PR is the remote source. If there are local commits not yet pushed, say they are not included; push them with devkit:push when asked.
  • Choose the tool by remote host: gh if the host of git remote get-url origin is github.com or a host in gh auth status; glab if it is a gitlab domain or a host in glab auth status (including self-hosted GitLab). If neither (file-path remote, not authenticated), use draft mode.

2. Review

  • Read the full change list and diff at the pinned SHA, and read callers as of that SHA (git show <sha>:<path>). If local working files differ, do not treat them as PR code.
  • Focus on real failures, data errors and regressions, API and schema contracts, permissions, transactions, and whether secrets are included. Do not demand refactoring on taste or metrics alone.
  • For a large change, hand caller tracing to devkit:code-reader per group of files.
  • If checks are needed, suggest devkit:check (a user-invoked skill).

3. Draft and 🛑 confirmation

  • Show the review result (defects with file, trigger condition and impact) and the title and body draft. Title and body language and format follow git.md and the PR template; without them, use devkit:commit's format and language decision as is.
  • PR template locations. GitHub: pull_request_template.md (any case) in .github/, the repo root or docs/, or several in a PULL_REQUEST_TEMPLATE/ folder there. GitLab: .gitlab/merge_request_templates/*.md (Default.md is the default). Other hosts: the same file name under their folder (.gitea/, .bitbucket/ etc.). If several fit and none is the default, ask which one. Find them with git ls-files | grep -iE 'pull_request_template|merge_request_templates/' || true (not ls of a folder that may not exist).
  • If there is an issue key, follow the linking style in git.md (title prefix, Closes #45 or Refs ABC-123 in the body, etc.); without a rule, put only the source link in the body. Do not change tracker status.
  • If there is an analysis doc (an .devkit/work/*/analysis.md matching the branch name or issue key; otherwise the most recent one, after confirming), summarize the requirement items, impact, verification results and DB apply steps in the body. Analysis docs and work SQL are not committed to the repo, so write the SQL steps reviewers need in the body and state "not included in this PR".
  • If the branch changes docs/rules/, CLAUDE.md or .claude/ (skills, agents), add a "Rules / devkit changes" section: per changed rule row its evidence type (decision, agreement, observed), a one-line why for each prohibition, the result of applying it to the case that triggered it, and "human content approval needed before merge".
  • Do not write checks that were not run as passed; a PARTIAL record is written as PARTIAL. AI attribution follows the trailer rule in git.md; without a rule, leave it out.
  • Check whether an open PR/MR exists and say whether you will create or update.
  • In draft mode, skip the open-PR check and the publish confirmation; deliver the title and body as a scratchpad file and in the reply, tell the user to create it on the host, and stop.
  • Ask once whether to publish as is. If the user said from the start "review and publish right away" and no defects were confirmed, skip it. If there are defects, always ask again.

4. Publish

  • Query the remote SHA again right before publishing. If it differs from the reviewed SHA, do not publish; report the added commits.
  • Check authentication (gh auth status / glab auth status). If it fails, do not publish; deliver the draft so the user can create it. Do not publish by another route such as browser automation.
  • Pass the body through a scratchpad file.
ActionGitHub (gh)GitLab (glab)
Find opengh pr list --head <source> --base <target> --json number,urlglab mr list --source-branch <source> --target-branch <target> -F json
Creategh pr create --head <source> --base <target> --title "<title>" --body-file <file>glab mr create --source-branch <source> --target-branch <target> --title "<title>" --description-file <file> --remove-source-branch=false --push=false --yes
Updategh pr edit <number> --title "<title>" --body-file <file>glab mr update <iid> --title "<title>" --description-file <file>
Verify after publishgh pr view <number> --json headRefOid,baseRefName,headRefName,urlglab mr view <iid> -F json
  • --remove-source-branch and --squash-before-merge on glab mr update are toggles, so do not use them when updating.
  • On GitLab create, add --squash-before-merge=false if git.md says merge commits (no squash), or =true if it says squash. If git.md states no merge style, omit the flag so the project setting applies.
  • After publishing, confirm source, target and head SHA match the reviewed values, and report the link.
  • Merge, auto-merge, approval and reviewer/assignee changes only on request. If merging the branch leads to a deploy, say so.
  • If the authenticated account is not a personal one (bot token etc.), say the author will show as that account.

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.