Official agent skill

Writing PRs And Commits

by sourcegraph in sourcegraph/src-cli

Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages.

OfficialApache-2.0Auto-check passedDevelopment

Install Writing PRs And Commits

skills CLI
$ npx skills add sourcegraph/src-cli --skill writing-prs-and-commits -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sourcegraph/src-cli writing-prs-and-commits --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sourcegraph/src-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/writing-prs-and-commits .claude/skills/writing-prs-and-commits && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
writing-prs-and-commits
GitHub stars
359
Token cost
~991 tokens
SKILL.md length
575 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages.

  • Works in 3 steps: Why this change is needed. → What changed. → Any important tradeoffs, rollout notes,…
  • Updating a pull request
  • SKILL.md covers Resolve the target, Core writing rules, PR titles and PR descriptions, plus 2 more sections
  • Calls gh and git

What it does

Writing PRs And Commits is an agent skill from sourcegraph/src-cli, published by the product's own GitHub organization. Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages. Use when creating or updating a pull request, or when preparing a commit that should stand on its own as the eventual PR.

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Commit messages and Pull requests. It works with GraphQL. The licence is Apache-2.0.

When your agent uses it

  • Updating a pull request
  • Preparing a commit that should stand on its own as the eventual PR

Example prompts

  • “Use the writing-prs-and-commits skill to write and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages”
  • “/writing-prs-and-commits”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Why this change is needed.
  2. What changed.
  3. Any important tradeoffs, rollout notes, or follow-up context.

What it can do on your machine

Read from SKILL.md and the folder at commit 2fc111e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Writing PRs And Commits loads about 991 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 575 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~991

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sourcegraph/src-cli at commit 2fc111e, republished under its Apache-2.0 licence (© sourcegraph). 575 words, ~991 tokens.

Download SKILL.mdSave it as .claude/skills/writing-prs-and-commits/SKILL.md (or your agent's skills folder).
name
writing-prs-and-commits
description
Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages. Use when creating or updating a pull request, or when preparing a commit that should stand on its own as the eventual PR.

Writing PRs and commits

Use this skill when the user asks to create a PR, update an existing PR title or body, or write a commit message for a change that maps cleanly to one PR.

Resolve the target

  • If the user names a PR number or URL, use that.
  • Otherwise, inspect the current branch and use gh pr view --json number,title,body,baseRefName,headRefName,url to find the associated PR.
  • If no PR exists and the user wants one created, use gh pr create, then immediately verify or adjust the title and body.
  • If the user wants text only, provide the draft without mutating GitHub.
  • When a PR is part of a stack, describe only the net change between the PR head and its base branch. Do not describe the full stack relative to main.

Core writing rules

  • Lead with why. The first paragraph or sentence should explain the problem, motivation, or user impact.
  • Follow with what changed. Once the reader understands why the change exists, describe the solution and any important constraints or tradeoffs.
  • Write the net change only. Do not document abandoned experiments, reverted approaches, or temporary dead ends.
  • Prefer natural prose over rigid Summary / Problem / Solution headings unless the user explicitly asks for that format.
  • Keep references repo-relative. Do not mention absolute local filesystem paths.
  • Preserve valuable existing PR content such as screenshots, images, rollout notes, and manually written context unless the user asks to remove it.
  • Use Markdown cleanly: inline code in backticks, fenced blocks when needed, and GitHub permalinks when citing specific code.

PR titles

  • Keep titles short, specific, and verb-first.
  • Prefer Sourcegraph's changelog-friendly shape when it fits the change: type/domain: title.
  • Use conventional prefixes like feat, fix, remove, and chore when they match the change.
  • Make the title describe the improvement or behavior change, not just the bug report.
  • If the PR is user-visible and likely to feed the changelog, choose a domain that reflects the product or feature area rather than an implementation detail.
Show full SKILL.md (247 more words)Show less

PR descriptions

  • Write the opening prose in this order:
    1. Why this change is needed.
    2. What changed.
    3. Any important tradeoffs, rollout notes, or follow-up context.
  • When relevant, reference linked Linear issues or related Slack threads.
  • If docs or handbook follow-up is needed, mention it in the prose before the verification section.
  • Include ## Test Plan near the end when there is meaningful validation to report.
  • The test plan should mention intentional verification such as focused tests, manual flows, or reproduction steps. Do not pad it with routine formatting or CI work the repository already expects.
  • Include ## Changelog only for end-user-visible changes worth communicating outside the PR. Keep it as the last section. Omit it for refactors, tooling, internal cleanup, or other changes with no user-facing impact.

Commit messages for single-PR changes

Treat a single commit that is intended to become one PR as a PR. GitHub by default will use the title and body from the commit.

Workflow

  1. Inspect the diff, linked context, and any existing PR title, body, or commit message.
  2. Decide whether you are creating a new PR, editing an existing PR, or writing a stand-alone commit message.
  3. Draft the title and body so the motivation is clear before the implementation details.
  4. Check that the text matches the net change, preserves important existing content, and follows Sourcegraph conventions for Test Plan and Changelog.
  5. Apply the final text with gh pr create, gh pr edit, or git commit as requested.

© sourcegraph, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/writing-prs-and-commits of sourcegraph/src-cli.

Open the folder on GitHubat commit 2fc111e

Compare with similar skills

Writing PRs And Commits next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Writing PRs And Commits compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Writing PRs And Commits this skillsourcegraph/src-cli359—~991Automated safety check: PassApache-2.0
PR Finalize Reviewmicrosoft/garnet12k—~3.1kAutomated safety check: PassMIT
Git Workflow and Versioningaddyosmani/agent-skills103k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Verdaccio Pull Request Workflowverdaccio/verdaccio18k—~1.9kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause

Similar skills

  • PR Finalize Review

    microsoft/garnet

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

    12k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Create a CUDA Python pull request from an approved personal or organization-owned fork, including the GitHub CLI GraphQL fallback for renamed organization-owned forks.

    3.4k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from sourcegraph/src-cli

  • Release

    sourcegraph/src-cli

    Official

    Guides Sourcegraph CLI patch, minor, and major releases. An agent skill from sourcegraph/src-cli.

    359 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed

Works with

Categories

Questions about Writing PRs And Commits

What does Writing PRs And Commits do?

Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages. Writing PRs And Commits is an agent skill from sourcegraph/src-cli, published by the product's own GitHub organization. Writes and revises Sourcegraph pull request titles, descriptions, and single-PR commit messages.

When should I use Writing PRs And Commits?

Writing PRs And Commits fits situations like: updating a pull request; preparing a commit that should stand on its own as the eventual PR.

How do I install Writing PRs And Commits in Claude Code?

Run `npx skills add sourcegraph/src-cli --skill writing-prs-and-commits -a claude-code`. Or copy the skill folder (.agents/skills/writing-prs-and-commits in sourcegraph/src-cli) into .claude/skills/writing-prs-and-commits in your project. Claude Code loads it when a task matches its description.

How do I install Writing PRs And Commits in Codex?

Run `npx skills add sourcegraph/src-cli --skill writing-prs-and-commits -a codex`. Or copy the skill folder (.agents/skills/writing-prs-and-commits in sourcegraph/src-cli) into .agents/skills/writing-prs-and-commits in your project. Codex loads it when a task matches its description.

Can I use Writing PRs And Commits in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sourcegraph/src-cli --skill writing-prs-and-commits -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-prs-and-commits, .gemini/skills/writing-prs-and-commits, .github/skills/writing-prs-and-commits and .opencode/skills/writing-prs-and-commits in your project.

What does Writing PRs And Commits need to run?

Going by SKILL.md and its folder, Writing PRs And Commits needs the command-line tools its instructions call (gh and git).

Does Writing PRs And Commits access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Writing PRs And Commits safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Writing PRs And Commits use?

Writing PRs And Commits is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Writing PRs And Commits use?

About 991 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Writing PRs And Commits?

Skills that share tags, products or a category with Writing PRs And Commits: PR Finalize Review (microsoft/garnet, 12k stars), Git Workflow and Versioning (addyosmani/agent-skills, 103k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Verdaccio Pull Request Workflow (verdaccio/verdaccio, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing PRs And Commits?

sourcegraph (a GitHub organization, an official publisher) maintains it in sourcegraph/src-cli, which has 359 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 28, 2026.

Source: sourcegraph/src-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.