agentleFS
DGouronDGouron/review-flow/.claude/skills/commit/SKILL.md

commit

Skill42 starsChanged 6 months agoMITView on GitHub

Safe commit and push workflow. Creates a commit following conventions and pushes. Husky handles verifications (TypeScript, Biome, tests).

  • Commits and pushes

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback 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.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 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

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    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

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Read .claude/roles/senior-dev.md — adopt this profile and follow all its rules.

    line 10
  2. Distinctive:

    When the user asks to commit/push code

    line 16
  3. Very specific:

    If staged files include src/ code:

    line 53
  4. Very specific:

    Check docs/feature-tracker.md — any feature in implementing status should be updated to implemented

    line 54
  5. Very specific:

    Check corresponding spec — should have ## Status: implemented if feature is complete

    line 55
  6. Distinctive:

    If missing, WARN the user (the hook will also catch this)

    line 56
  7. Distinctive:

    If nothing is staged, suggest:

    line 64
  8. Very specific:

    NEVER: use --force without explicit request

    line 127
  9. Very specific:

    NEVER: use --no-verify unless explicitly requested by the user

    line 129
  10. Distinctive:

    ALWAYS: verify you are on a feature branch

    line 130

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

Commit - Safe Git Workflow

Persona

Read .claude/roles/senior-dev.md — adopt this profile and follow all its rules.

Activation

This skill activates:

  • On explicit request (/commit)
  • When the user asks to commit/push code

Husky Hooks (automatic)

The project uses Husky which automatically runs:

HookAction
pre-commitTypeScript check + Biome lint (modified files)
commit-msgcommitlint (message format)
pre-pushVitest tests (modified files since test)

Claude Code Hooks (automatic)

The project also has PreToolUse hooks that run BEFORE git commands:

HookAction
protect-main-branch.shBlocks commit on master
pre-commit-gate.shRuns tests before commit
verify-spec-updated.shChecks spec has ## Status: implemented
protect-main-push.shBlocks push to master and force push

Workflow

Step 0: Quality Gates (BLOCKING)

BEFORE any commit, run:

yarn verify

If it fails: display errors and STOP. Do not commit until quality gates pass.

Step 0b: Spec & Tracker Verification

If staged files include src/ code:

  1. Check docs/feature-tracker.md — any feature in implementing status should be updated to implemented
  2. Check corresponding spec — should have ## Status: implemented if feature is complete
  3. If missing, WARN the user (the hook will also catch this)

Step 1: Analyze Changes

git status --short

If nothing is staged, suggest:

git add <files>

Step 2: Create the Commit

Message Format (Conventional Commits)

<type>(<scope>): <description>

Allowed types:

TypeUsage
featNew feature
fixBug fix
docsDocumentation only
styleFormatting (no code change)
refactorRefactoring (no new feature or fix)
perfPerformance improvement
testAdding or fixing tests
buildBuild system changes
ciCI/CD changes
choreMaintenance, dependencies
revertRevert a previous commit

Rules:

  • Header max 72 characters
  • Description in lowercase, no trailing period
  • Scope optional in parentheses

Examples

feat(webhook): add GitHub signature validation
fix(review): resolve score calculation overflow
refactor(gateway): extract GitLab API client
test(usecase): add unit tests for track assignment

Step 3: Commit

git commit -m "<type>(<scope>): <description>"

Husky will automatically run:

  1. TypeScript check
  2. Biome lint
  3. commitlint

Step 4: Push (optional)

git push origin <current-branch>

Husky will automatically run tests before pushing.

Security Rules

  • NEVER use --force without explicit request
  • NEVER push to main or master directly
  • NEVER use --no-verify unless explicitly requested by the user
  • ALWAYS verify you are on a feature branch
  • NEVER mention Claude, Anthropic, or Co-Authored-By in commits

If Husky Fails

ErrorSolution
TypeScriptFix type errors
Biomeyarn lint:fix to auto-correct
commitlintReword the commit message
Tests (push)Fix failing tests

Output Template

COMMIT

Branch: <branch>
Staged files:
  - <file 1>
  - <file 2>

Message: <type>(<scope>): <description>

Verifications:
  - Husky: TypeScript / Biome / commitlint

Confirm commit? (yes/no)

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.