Index of every page on this site: llms.txt
All skills
Run it yourself

Use when writing or updating a pull or merge request title or body, adding screenshots or a diagram to one, or drafting replies to review comments. Not for pushing or opening the PR - use ship; not for reviewing someone else's PR - use `review`.

  • 2 files
  • 7.3 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/avik-creator/agent-skills/writing-pr

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈64 tokens for metadata: the name and description. ≈1k when used: this file. ≈755 more on demand in 1 file.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈258 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Writing a PR or MR

Scope

The title, the body, keeping the body current, and drafts of replies to review threads. Creating the PR or MR is ship step 5. Editing a body that is already up runs when the user asks, or after a yes to the shown text.

Replies to review threads are drafts. Never post a comment, a reply, or a reaction as the user unless they say so for that thread or that routine.

Before writing

Read the whole diff against the target branch, the commits, and the request. Ask every blocking question in one turn. Never invent a fact. A number, a payload, or a screenshot comes from this change, not from memory.

If the diff mixes unrelated changes or is too big to review in one sitting, propose splitting it into separate or stacked MRs before writing anything.

Title

Short. It says what changes, in the repo's existing title style; read recent merged titles first.

Body

Diagrams and code come first, then bullets around them. No essays: any prose is a bullet.

  1. One line: what changes, and for whom.
  2. Flow: a simplified mermaid diagram of the path that changed. Stop at the zoom that answers "what does this change do", as the design-docs skill's flows-and-diagrams.md says. Leave it out only for a change with no flow, such as a typo or a version bump.
  3. Code: a short snippet of the internals that matter, or sample usage. For an API change, the request a client sends and the response it gets, built from the real types.
  4. Changes: bullets, each with a code reference where it helps.
  5. Before and after:
    • Visual changes, direct or indirect: a table with before and after images or videos.
    • Benchmarks: a table with the baseline from the target branch and the candidate from this branch, with units and the command.
  6. Before merge and deploy: only when there is something to do. The exact commands, environment variables, migrations, and their order, plus the undo for each one that changes data.
  7. Kept on purpose: a suppression, skip, or lowered bar the user agreed to, with its reason (ship's bar-guard).

For a change that is hard, high-risk, or wide in scope, write the body like a short technical blog post: the context, the problem, the approach, code samples, before and after, diagrams, images.

Never in the body

  • "Validation", "I ran tests", test counts, or a list of commands run. Why: CI shows it, and the body is about the change.
  • How the PR got here: earlier sizes, refactors between commits, rebases, review rounds. Why: only the final squash commit is read later.
  • AI attribution: no "Generated with", no co-author trailer.
  • Secrets, tokens, connection strings, internal URLs with credentials, or personal data in screenshots.
  • Anything a reviewer wouldn't miss. When the body is long, cut sections before shortening sentences.

Images

Upload them and embed the returned Markdown. Uploading is outward-facing, so show the files first and upload after a yes.

  • GitLab: glab api projects/:id/uploads --form "file=@<path>". The response's markdown field is the embed.
  • GitHub: gh has no image upload. Ask the user to drop the image into the PR in the browser, then reference it.

Updating the body

  • After a push that changes behaviour, or after review feedback is addressed, rewrite the body so it describes the final state. Do not append an "update" section.
  • Show the new text, then run:
    • GitLab: glab mr update <iid> --description "$(cat <file>)"
    • GitHub: gh pr edit <number> --body-file <file>
  • Read it back after the update.

Review replies

Per thread: the file and line, the reviewer's point in one line, and the drafted reply. A reply says what changed and where, or why not, with the evidence. The user posts it.

Replies

Talk to the user in simple English: short sentences, everyday words, and a technical term only where it is needed, explained the first time it appears.

Before showing anything, check it against plain-words.md, the patterns that make text read as machine-written. Then show the title and body as they will appear. Say what was left out and why.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at a0324a3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 3 weeks ago

README badge

README badge for avik-creator/agent-skills/writing-pr