agentleFS
lgtm-hqlgtm-hq/ai-skills/skills/commit/SKILL.md

commit

Skill1 starsChanged 8 days agoMITView on GitHub

Pre-commit workflow and commit guidelines. Use when asked to commit changes. Requires passing lint and tests, signed commits, semantic prefixes, imperative mood.

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 9 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

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 13 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 13

    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:

    Before making ANY commit:

    line 12
  2. Very specific:

    Run the lint skill's workflow — all checks must pass with zero issues (abort if any issues remain).

    line 14
  3. Very specific:

    All tests must pass (uv run lintro tst)

    line 16
  4. Distinctive:

    Every commit MUST be signed/verified

    line 21
  5. Very specific:

    Use semantic commit prefixes: fix:, feat:, chore:, docs:, refactor:, test:, build:, ci:, perf:, style:

    line 22
  6. Distinctive:

    Commit messages MUST be in imperative mood ("Add feature" not "Added feature")

    line 24
  7. Distinctive:

    Use judgment: 1 commit per file is too granular, 1 commit for everything is too coarse

    line 33
  8. Distinctive:

    When working on a new extension or feature branch where all files are new:

    line 48
  9. Distinctive:

    Every file should show as "A" (added), never "M" (modified)

    line 50
  10. Distinctive:

    If you see "M" on files that should be new, the commit history needs fixing

    line 51
  11. Distinctive:

    When modifying an existing codebase:

    line 54
  12. Distinctive:

    If commits are poorly structured (too large, wrong groupings, or showing modified when should be added):

    line 61
  13. Distinctive:

    Verify with git status that file statuses (A/M) are correct

    line 68
  14. Distinctive:

    When asked to commit:

    line 72
  15. Very specific:

    Run the lint skill's workflow — abort if any issues remain (follow the lint skill — full check, no --tools filtering)

    line 74
  16. Distinctive:

    Run tests - abort if any failures:

    line 80
  17. Very specific:

    When authoring or modifying a Raycast extension, use the raycast skill for toolchain-specific guidance

    line 86
  18. Distinctive:

    Check Docker if applicable

    line 88

“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

Pre-commit workflow and commit guidelines.

Pre-commit Checklist

Before making ANY commit:

  1. Run the lint skill's workflow — all checks must pass with zero issues (abort if any issues remain). Follow the lint skill — full check, no --tools filtering.
  2. All tests must pass (uv run lintro tst)
  3. Where applicable, Docker builds pass

Commit Requirements

  • Every commit MUST be signed/verified
  • Use semantic commit prefixes: fix:, feat:, chore:, docs:, refactor:, test:, build:, ci:, perf:, style:
  • Commit messages MUST be in imperative mood ("Add feature" not "Added feature")

Commit Granularity

Make incremental, logical commits rather than one large commit:

  • Group related changes (e.g., all logging for one subsystem)
  • Separate concerns (e.g., bug fixes vs features vs docs)
  • Each commit should be independently reviewable and revertable
  • Use judgment: 1 commit per file is too granular, 1 commit for everything is too coarse

Good groupings:

  • feat(logging): add subprocess execution logging (one component)
  • feat(logging): add config parsing logging (related files)
  • docs: add debugging guide (documentation separate from code)

Bad groupings:

  • One commit with 11 files touching 4 different concerns
  • 11 separate commits for a cohesive feature

Branch Context Awareness

When working on a new extension or feature branch where all files are new:

  • Every file should show as "A" (added), never "M" (modified)
  • If you see "M" on files that should be new, the commit history needs fixing
  • This indicates commits were made in the wrong order or need restructuring

When modifying an existing codebase:

  • "M" (modified) is expected and correct
  • Focus on logical grouping of related changes

Restructuring Commits

If commits are poorly structured (too large, wrong groupings, or showing modified when should be added):

  1. Find the commit before the problematic ones: git log --oneline
  2. Soft reset to that point: git reset --soft <good-commit>
  3. Unstage all changes: git reset HEAD
  4. Re-add and commit in logical groups with proper messages
  5. Verify with git status that file statuses (A/M) are correct

Usage

When asked to commit:

  1. Run the lint skill's workflow — abort if any issues remain (follow the lint skill — full check, no --tools filtering)
    • Raycast extensions: run uv run lintro fmt/chk first, then npm run lint per the raycast skill (Raycast rules take precedence)
    • Other projects without lintro: use the appropriate lint command from the lint skill
  2. Run tests - abort if any failures:
    • Projects with lintro: uv run lintro tst
    • Raycast extensions: run Vitest if the extension has tests configured (bun test or the extension's test script); otherwise manual smoke test via bun run dev (see the raycast skill)
    • Other projects: use appropriate test command
    • When authoring or modifying a Raycast extension, use the raycast skill for toolchain-specific guidance
  3. Check Docker if applicable
  4. Review changes with git status to plan logical groupings
  5. Stage and commit in logical groups with signed, semantic, imperative messages:

    git add <related-files>
    git commit -S -m "feat: add user authentication"
  6. Repeat steps 4-5 for each logical group of changes

Examples

Good commit messages:

  • fix: resolve null pointer in user service
  • feat: add dark mode toggle
  • chore: update dependencies
  • docs: improve API documentation
  • refactor: simplify authentication flow

Bad commit messages:

  • fixed bug (not semantic, past tense)
  • WIP (not descriptive)
  • updates (not semantic, not specific)

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.