Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true.

MITAuto-check: notesDevelopment

Install Commit

skills CLI
$ npx skills add pedrohcgs/claude-code-my-workflow --skill commit -a claude-code

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

GitHub CLI
$ gh skill install pedrohcgs/claude-code-my-workflow commit --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/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/commit .claude/skills/commit && 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
commit
GitHub stars
1.6k
Token cost
~2.3k tokens
SKILL.md length
1,168 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true.

  • Works in 7 steps: Quality Gate (Pre-Commit) → Check current state → Create a branch (when on main) → …
  • Never merges — a merge happens only when the user explicitly says to merge
  • SKILL.md covers Steps, Merging — only when the user…, Important and Flags
  • Calls git, gh and python3; reaches claude.com

What it does

Commit is an agent skill from pedrohcgs/claude-code-my-workflow. Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true. Pushes and opens a pull request only with --pr or when the user asks; never merges — a merge happens only when the user explicitly says to merge. Use ONLY on explicit commit intent — user says "commit", "let's commit this", "open a PR", or prefixes with /commit. Do NOT auto-invoke on vague end-of-task phrases ("we're done", "wrap…

Its SKILL.md is about 2.3k 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 Pull requests and Quality gates. The repository describes itself as: A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols. The licence is MIT.

When your agent uses it

  • Never merges — a merge happens only when the user explicitly says to merge
  • Tasks that involve Pull requests
  • Tasks that involve Quality gates

Example prompts

  • “commit”
  • “s commit this”
  • “open a PR”
  • “/commit”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Glob, Agent, Task

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Quality Gate (Pre-Commit)
  2. Check current state
  3. Create a branch (when on main)
  4. Stage files
  5. Commit with a descriptive message
  6. Push and open a pull request — only with --pr or when the user asks
  7. Report

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob
    • Agent
    • Task

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • python3

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • claude.com

    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

Commit loads about 2.3k tokens when it runs. Until then it costs about 153 tokens; SKILL.md has 1,168 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob, Agent, Task

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 pedrohcgs/claude-code-my-workflow at commit ae72617, republished under its MIT licence (© pedrohcgs). 1,168 words, ~2,264 tokens.

Download SKILL.mdSave it as .claude/skills/commit/SKILL.md (or your agent's skills folder).
name
commit
description
Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true. Pushes and opens a pull request only with --pr or when the user asks; never merges — a merge happens only when the user explicitly says to merge. Use ONLY on explicit commit intent — user says "commit", "let's commit this", "open a PR", or prefixes with `/commit`. Do NOT auto-invoke on vague end-of-task phrases ("we're done", "wrap up") — those require explicit confirmation first. Never force-pushes or skips hooks.
allowed-tools
Bash, Read, Glob, Agent, Task
argument-hint
[optional: commit message] [--pr]

Commit

Verify the gates, then commit. A commit is not a pull request, and a pull request is not a merge. This skill stops after the commit. It pushes and opens a pull request only with --pr or when the user asks, and it never merges — a merge happens only when the user explicitly says to merge that pull request (see "Merging" below). Reviewers such as Codex and Copilot comment after a pull request opens; merging before they report skips their review.

Steps

Step 0: Quality Gate (Pre-Commit)

Run before branching. For every changed .qmd, .tex, or .R file that has quality rubrics, run:

bash
python3 scripts/quality_score.py <changed-file-paths>
  • If any file scores below 80, halt and report the findings. The user must either fix the issues or explicitly override with phrases like "commit anyway" or "skip quality gate". Once ./scripts/install-hooks.sh has been run, .githooks/pre-commit re-runs the same ≥80 gate on the staged .qmd/.tex/.R files, so carry an approved override into Step 4 as SKIP_QUALITY_GATE=1 git commit ... and record the override reason in the commit message. That variable skips only the quality score; the backtest still runs. Never fall back to git commit --no-verify.
  • If all files score 80+, continue.

Spawn the verifier agent (via the Agent tool with subagent_type=verifier) to run compilation/render checks on the changed files. Report pass/fail before committing.

Step 0b: Consistency Gate (Pre-Commit)

Runs unconditionally. The full backtest suite — all ten gates (surface-sync count claims like "18 agents, 61 skills, 37 rules, 11 hooks" and marked tables, skill integrity, model currency, links, spec conformance, staleness, repo hygiene, derived counts, ledger coverage, hook battery):

bash
./scripts/backtest.sh
  • Exit 0: all gates green — continue.
  • Nonzero: at least one gate is red — print its output and halt. Fix, then re-run. Do not proceed past this gate on a red result, even with "commit anyway": a red gate is drift that the next reader inherits, and small count drift has repeatedly cost follow-up PRs.
Step 0c: Passport Check (Pre-Commit)

If the diff touches a manuscript (.tex/.qmd) that has a passport in quality_reports/passports/, any source_file a passport lists, or any file a claim declares as a display (its location:, or an appears_in path:), read that passport: a load-bearing claim with status: FAIL or STALE is a must-fix — halt, name the claim, and point at /audit-reproducibility (or the stale script) before committing. A touched display triggers the check for the same reason a touched script does: editing one artifact's copy of a number desynchronizes it from that number's other displays — the supplement or deck holding the same value was not necessarily updated in the same commit. Skip silently when no passport exists.

Step 1: Check current state
bash
git status
git diff --stat
git log --oneline -5
Step 2: Create a branch (when on main)

Never commit directly to main. If the current branch is main, create one; if you are already on a feature branch, commit there.

bash
git checkout -b <short-descriptive-branch-name>
Step 3: Stage files

Add specific files (never use git add -A):

bash
git add <file1> <file2> ...

Do NOT stage .claude/settings.local.json or any files containing secrets.

Step 4: Commit with a descriptive message

If $ARGUMENTS is provided, use it as the commit message. Otherwise, analyze the staged changes and write a message that explains why, not just what.

The subject line states what is TRUE AFTER the commit — a plain sentence about behavior that a reader could go and test. "Fixed review feedback" and "Updated the checker" narrate your afternoon and tell a reader nothing; "The parity gate refuses a fixture whose hash is unregistered" is a claim they can check against the code. Process narration — which review round it came from, who asked, how many attempts it took — belongs in the body if it belongs anywhere. The body still carries the why; the subject carries the claim.

bash
git commit -m "$(cat <<'EOF'
<commit message here>
EOF
)"
Step 5: Push and open a pull request — only with --pr or when the user asks

Without --pr, and without the user asking for a pull request, skip this step: the commit stays local and the report says so.

bash
git push -u origin <branch-name>
gh pr create --title "<short title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>

## Changed defaults
<"None", or each default a forker will notice changing: a setting, a threshold, a hook that now fires, a path that moved>

## Test plan
<checklist>

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Step 6: Report

Report the commit (hash and subject), the branch, and — if a pull request was opened — its URL. Say plainly that nothing was merged.

Show full SKILL.md (492 more words)Show less

Merging — only when the user says so

A merge is never a step of this skill. Merge only when the user explicitly asks to merge a specific pull request ("merge #155"); "ship it", "done" or "commit" are not a merge instruction. Before merging, check that the pull request's CI is green and that its reviews (human, Codex, Copilot) have been read and answered.

bash
gh pr merge <pr-number> --merge --delete-branch
git checkout main
git status --porcelain          # must print nothing before the next line runs
git pull

Expect the tree to be dirty here — that is what Step 3 is for. Staging specific files means everything the session touched but did not stage, plus every untracked artifact, is still in the tree when you arrive at this step. The git-guardrails hook this template ships denies git pull (and merge, and rebase) whenever git status --porcelain is non-empty, because a pull that resolves on top of uncommitted work cannot be reviewed afterwards — you can no longer tell which hunk came from the remote. Chaining a stash into the same command line does not help: the hook reads the tree, it does not predict what the line will do to it.

Clear the tree deliberately, then pull:

bash
git stash push -u -m "post-merge: unstaged leftovers"   # -u, or untracked files stay behind
git pull
git stash pop

git pull --autostash is the one-command alternative, but only on a tree whose dirt is entirely tracked. git stash does not stash untracked files, so an autostash over a ?? entry starts the pull on the same dirty tree the check exists to refuse — the hook therefore reads porcelain and denies --autostash whenever any ?? entry is present. At this step that is the usual state, so the explicit -u stash above is the default route and --autostash is the shortcut for the case where git status --porcelain shows no ?? lines at all. Git agrees independently: if the incoming commits add a file at a path you are holding untracked, it aborts the merge ("untracked working tree files would be overwritten") after the autostash has already been taken. Either route must be its own command — chaining the stash and the pull onto one line is denied outright, because an identified history op reaches the tree reading only as a standalone simple command.

ALLOW_DIRTY_MERGE=1 is the hatch for a dirty state you have looked at and can justify out loud. It is not the routine remedy, and reaching for it because the block is inconvenient is the behavior the check exists to prevent.

Important

  • Never skip Step 0. Quality gates catch broken compilation, bad citations, and hardcoded paths before they reach main. If the user insists on skipping, record their override reason in the commit message.
  • Never commit directly to main; branch off it first.
  • Never push, open a pull request, or merge unless asked — see Step 5 and "Merging".
  • Exclude settings.local.json and sensitive files from staging.
  • When the user does ask to merge, use --merge (not --squash or --rebase) unless they say otherwise.
  • If the commit message from $ARGUMENTS is provided, use it exactly.

Flags

FlagEffect
--prAfter the commit, push the branch and open a pull request (Step 5). Never merges.

© pedrohcgs, MIT. 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 .claude/skills/commit of pedrohcgs/claude-code-my-workflow.

Open the folder on GitHubat commit ae72617

Compare with similar skills

Commit 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.

Commit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commit this skillpedrohcgs/claude-code-my-workflow1.6k—~2.3kAutomated safety check: NotesMIT
PlotJuggler Ship CheckPlotJuggler/PlotJuggler6.2k—~1.3kAutomated safety check: PassMPL-2.0
Pull Requestnoh-rs/nohrs156—~4.1kAutomated safety check: PassMIT
Compound Engineering Code ReviewEveryInc/compound-engineering-plugin25k—~2kAutomated safety check: PassMIT
Pre-PR Reviewyuga-hashimoto/and-code123—~710Automated safety check: PassMIT
trace-mcp Pre-Commit Checksnikolai-vysotskyi/trace-mcp186—~565Automated safety check: PassMIT

Similar skills

  • PlotJuggler Ship Check

    PlotJuggler/PlotJuggler

    Runs a gated finish-line checklist before committing a PlotJuggler PJ4 change: build proof, red-test triage, hooks, docs freshness and a diff self-review.

    6.2k GitHub stars~1.3k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Pull Request

    noh-rs/nohrs

    Take a change from working tree to a merge-ready pull request, then keep iterating until the CI checks and AI reviewers (CodeRabbit, cubic) all pass.

    156 GitHub stars~4.1k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Compound Engineering Code Review

    EveryInc/compound-engineering-plugin

    Runs a staged pull request or diff review using selected reviewer personas, checking the change against its stated intent and project standards before producing findings.

    25k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-PR Review

    yuga-hashimoto/and-code

    Runs local checks and a repo-reviewer subagent over the whole branch diff before a pull request is opened, then records the approval in the PR description.

    123 GitHub stars~710 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • trace-mcp Pre-Commit Checks

    nikolai-vysotskyi/trace-mcp

    Runs trace-mcp security, quality-gate and antipattern checks before a commit or pull request, and builds a symbol-level diff for the PR description.

    186 GitHub stars~565 tokensUpdated today
    DevelopmentAuto-check passed
  • Sonarcloud Review

    lucasvieirasilva/nx-plugins

    Fetches and triages SonarCloud findings (issues, security hotspots, quality gate) for the current pull request or branch of this repository via the SonarCloud Web API, summarizes them in a markdown…

    153 GitHub stars~2.7k tokensUpdated 9 days ago
    DevelopmentAuto-check: notes

More from pedrohcgs/claude-code-my-workflow

All 59 skills in this repo
  • Devils Advocate

    pedrohcgs/claude-code-my-workflow

    Adversarial 5-7 question challenge to a deck's pedagogical choices — ordering, prerequisites, cognitive load, motivation.

    1.6k GitHub starsUsed in 2 repos~641 tokens
    Auto-check passed
  • Vaccinate

    pedrohcgs/claude-code-my-workflow

    Qualify a check before it is allowed to clear anything — prove it can detect the failure it is meant to catch.

    1.6k GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check: notes
  • Compile Latex

    pedrohcgs/claude-code-my-workflow

    Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex).

    1.6k GitHub starsUsed in 1 repo~492 tokens
    Auto-check: notes
  • Context Status

    pedrohcgs/claude-code-my-workflow

    Show current context status and session health. An agent skill from pedrohcgs/claude-code-my-workflow.

    1.6k GitHub starsUsed in 1 repo~613 tokens
    Auto-check: notes
  • Disclosure Check

    pedrohcgs/claude-code-my-workflow

    Pre-screen analysis outputs (tables, figures, logs) built on restricted or confidential data for statistical-disclosure-limitation problems before any release.

    1.6k GitHub starsUsed in 1 repo~2.6k tokens
    Auto-check: notes
  • Stata Replication

    pedrohcgs/claude-code-my-workflow

    End-to-end Stata replication pipeline — scaffolds numbered .do files in scripts/stata/, executes them via the stata-mcp MCP server, captures logs and outputs to output/, and produces…

    1.6k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check: notes

Categories

Questions about Commit

What does Commit do?

Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true. Commit is an agent skill from pedrohcgs/claude-code-my-workflow. Commit the current work — runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true.

When should I use Commit?

Commit fits situations like: never merges — a merge happens only when the user explicitly says to merge; tasks that involve Pull requests; tasks that involve Quality gates.

How do I install Commit in Claude Code?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill commit -a claude-code`. Or copy the skill folder (.claude/skills/commit in pedrohcgs/claude-code-my-workflow) into .claude/skills/commit in your project. Claude Code loads it when a task matches its description.

How do I install Commit in Codex?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill commit -a codex`. Or copy the skill folder (.claude/skills/commit in pedrohcgs/claude-code-my-workflow) into .agents/skills/commit in your project. Codex loads it when a task matches its description.

Can I use Commit 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 pedrohcgs/claude-code-my-workflow --skill commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commit, .gemini/skills/commit, .github/skills/commit and .opencode/skills/commit in your project.

What does Commit need to run?

Going by SKILL.md and its folder, Commit needs the command-line tools its instructions call (git, gh and python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Glob, Agent, Task.

Does Commit access the network?

SKILL.md names 1 domain. In commands or code: claude.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Commit safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Commit use?

Commit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commit use?

About 2.3k tokens (SKILL.md is roughly 9.1k 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 Commit?

Skills that share tags, products or a category with Commit: PlotJuggler Ship Check (PlotJuggler/PlotJuggler, 6.2k stars), Pull Request (noh-rs/nohrs, 156 stars), Compound Engineering Code Review (EveryInc/compound-engineering-plugin, 25k stars) and Pre-PR Review (yuga-hashimoto/and-code, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commit?

pedrohcgs (a GitHub user) maintains it in pedrohcgs/claude-code-my-workflow, which has 1,645 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on September 27, 2026.

Source: pedrohcgs/claude-code-my-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.