agentleFS
hhopkehhopke/intervals-icu-mcp/.claude/skills/commit/SKILL.md

commit

Skill87 starsChanged 3 months agoMITView on GitHub

Analyze changes, write a conventional commit, and (when shipping) open a PR with closing keywords so referenced issues auto-close on merge. Use when the user asks to commit, push, or open a PR.

  • Commits and pushes

193 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-branch, review-r 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.
  • SentrySkill

    create-branch

    Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

    Also in 4 projects that use this

  • luischanciSkill

    review-r

    Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.

    Also in 3 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • AWSSkill

    issue

    Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.

    Also in 9 projects that use this

  • luischanciSkill

    validate-bib

    Validate bibliography entries against citations in all manuscript files. Find missing entries and unused references.

    Also in 3 projects that use this

  • +2 more from luischanci

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 7

    Distinctive

    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. Distinctive:

    Never commit on main: Before staging or committing:

    line 21
  2. Distinctive:

    If the result is main:

    line 24
  3. Distinctive:

    Only then proceed to stage + commit.

    line 27
  4. Distinctive:

    If on any other branch, commit there as-is — do not create a new branch.

    line 28
  5. Distinctive:

    No exceptions: trivial fixes, doc tweaks, one-liners — all go through a non-main branch.

    line 30
  6. Very specific:

    Do not put issue refs (Closes #N) in the commit message — those live in the PR body so GitHub auto-closes correctly on merge (and squash …

    line 38
  7. Very specific:

    Before any gh pr create, run the full release check:

    line 55
  8. Very specific:

    When opening a PR (gh pr create or user asks for one), put a closing keyword in the PR body for every issue this PR resolves.

    line 72
  9. Distinctive:

    Check the branch guard. If on main, propose a branch and switch.

    line 84
  10. Very specific:

    Commit with git commit -m "type(scope): description" — single line.

    line 87
  11. Very specific:

    If shipping: run the pre-PR gate, then gh pr create with closing keywords in the body, then verify closingIssuesReferences.

    line 88
  12. Distinctive:

    If there are unrelated changes in the working tree, suggest splitting into separate commits.

    line 89

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

Context

Gather the following before composing the commit message:

  • Current branch: git branch --show-current
  • Working tree status: git status --short --branch
  • Diff (staged + unstaged): git diff $(git rev-parse --verify HEAD 2>/dev/null || echo --cached)
  • Recent history: git log --oneline -10

Branch guard — MANDATORY first step

Never commit on main. Before staging or committing:

  1. Run git branch --show-current.
  2. If the result is main:
    • Propose a branch name derived from the commit type/scope (e.g. fix/hr-histogram-list-shape, feat/event-tags).
    • Confirm the name with the user, then git switch -c <branch>.
    • Only then proceed to stage + commit.
  3. If on any other branch, commit there as-is — do not create a new branch.

No exceptions: trivial fixes, doc tweaks, one-liners — all go through a non-main branch.

Commit message rules

  • Single line. No body. No Co-Authored-By / Claude attribution. This applies to every commit in this repo, regardless of size.
  • Format: type(scope): description — Conventional Commits.
  • Types: feat, fix, docs, style, refactor, test, chore, ci, build, perf.
  • Scope is optional but encouraged. Conventional scopes here: tools, client, middleware, models, wellness, events, ci, release, or a specific tool module name.
  • Do not put issue refs (Closes #N) in the commit message — those live in the PR body so GitHub auto-closes correctly on merge (and squash merges use a blank commit body, so commit-message refs would be dropped anyway).

Doc + count sync

For feat, fix, or anything user-visible, check whether docs need updating in the same commit:

  • CHANGELOG.md — add a bullet under ## [Unreleased]. CHANGELOG is manual in this repo; nothing generates it. Group bullets under ### Added / ### Changed / ### Fixed matching the existing style.
  • Tool / resource / prompt counts — if tools were added or removed, update the counts that appear in:
    • README.md (header/intro line and any tool tables)
    • CLAUDE.md (project overview line stating tool counts)
    • docs/tools.md if the registered set changed
  • README discipline — keep README.md under 300 lines. If a new section would push past ~30 lines and isn't core onboarding, extract it to docs/ and link from the README.
  • SemVer flag — if the change removes or renames a tool/parameter, changes config env var semantics, changes default tool registration (e.g. INTERVALS_ICU_DELETE_MODE), or removes information from a response, call it out in the PR body — this requires a major version bump per CLAUDE.md. Response-shape changes that preserve the information (key renames, restructuring, added fields) are minor, not breaking.
  • Do not reference upstream/comparison repos in commit messages, PR bodies, CHANGELOG, or README.

Pre-PR gate — MANDATORY before opening a PR

Before any gh pr create, run the full release check:

make can-release

This runs ruff (lint + format check), pyright (type check), the pytest suite, and the coverage gate from .github/workflows/test.yml. CI runs the same thing on push — failing it locally means failing CI.

If it fails:

  • Lint: make format auto-fixes most issues.
  • Tests: make test/verbose for full output; make test/<keyword> to narrow.
  • Fix, re-run make can-release, do not proceed to PR until it's green.

Tool-behavior changes (anything in src/intervals_icu_mcp/tools/ that changes inputs, outputs, or side-effects): make can-release proves the unit tests pass against mocked HTTP — it does not prove the tool behaves correctly against the real Intervals.icu API. For non-trivial tool changes, flag this in the PR body and note whether manual verification (via Claude Desktop / MCP Inspector against make run) was performed. Don't claim end-to-end verification you didn't do.

Pull request — closing keywords

When opening a PR (gh pr create or user asks for one), put a closing keyword in the PR body for every issue this PR resolves. The PR body is the only place GitHub auto-closes from on merge.

  • Auto-closes: Closes #N / Fixes #N / Resolves #N (one per line, in the body)
  • Does NOT auto-close: Implements, Addresses, Refs, Related to — use these for issues the PR touches but doesn't fully resolve (e.g. ratchet/running-log issues like #4 that should stay open across multiple PRs)

Find the issue # in the user's prompt, branch name, or recent conversation. If unclear, ask — don't guess. After creating, verify with gh pr view <n> --json closingIssuesReferences; if empty, fix with gh pr edit <n> --body-file -.

The PR title becomes the main commit. The repo is squash-only (settings: commit title from PR_TITLE, body BLANK): on merge, main gets exactly one commit whose subject is the PR title plus an appended (#N), and the branch's individual commits fold away. So write the PR title as you would a commit subject — single line, conventional format, ideally ≤ 70 chars to leave room for the (#N) suffix — and edit non-conforming community PR titles before merging. Body uses the existing .github/PULL_REQUEST_TEMPLATE.md structure (Summary / Changes / Checklist / Test plan).

Instructions

  1. Summarize the intent of the changes — what problem they solve or what they add.
  2. Check the branch guard. If on main, propose a branch and switch.
  3. Decide whether the doc + count sync applies and update those files in the same staging set.
  4. Stage with git add (specific paths, not -A).
  5. Commit with git commit -m "type(scope): description" — single line.
  6. If shipping: run the pre-PR gate, then gh pr create with closing keywords in the body, then verify closingIssuesReferences.
  7. If there are unrelated changes in the working tree, suggest splitting into separate commits.

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.