agentleFS
hpdrrhpdrr/make-commit/SKILL.md

make-commit

Skill0 starsChanged 19 days agoMITView on GitHub

Inspect current Git changes, auto-add detected AI artifacts to .gitignore, and draft a clean commit message matching repository conventions. Use when the user invokes make-commit or requests a commit message.

  • Reads credentials
  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. cypher0n3/dotagents★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the following non-destructive inspection commands:

    line 24
  2. Distinctive:

    Zero changes: If no modified or staged files exist, report "No changes detected" and stop.

    line 37
  3. Distinctive:

    Missing repo: If not inside a Git worktree, request repository access or the raw diff and commit history.

    line 38
  4. Distinctive:

    Before drafting commit messages, scan workspace for AI-generated artifacts:

    line 44
  5. Very specific:

    If .gitignore does not exist in project root, create it.

    line 51
  6. Very specific:

    If detected AI artifacts are untracked and not covered by .gitignore, append them under an # AI Assistant & Agent Artifacts section.

    line 52
  7. Very specific:

    If AI artifacts were already staged (git diff --cached), warn the user and recommend unstaging (git restore --staged <path> or git rm …

    line 53
  8. Distinctive:

    Before drafting, scan the diff and file paths:

    line 60
  9. Distinctive:

    Filter AI agent and assistant artifacts: Never include internal AI thoughts, agent system prompts, or scratch artifacts in commit messages.

    line 63
  10. Distinctive:

    Do not execute commits automatically: Never run git commit, git add, git push, or alter Git history unless explicitly commanded by the user.

    line 65
  11. Distinctive:

    If undocumented, infer the dominant pattern from recent human commits (discount automated merge commits and bump bot commits):

    line 73
  12. Very specific:

    Never invent ticket or issue numbers.

    line 81
  13. Distinctive:

    Avoid generic phrases like "update files", "fix bugs", "misc changes".

    line 99
  14. Distinctive:

    If the diff contains unrelated changes (e.g., refactoring auth + fixing UI CSS), recommend splitting into atomic commits and provide …

    line 109
  15. Distinctive:

    Add any scope explanations, split recommendations, or notes outside the block.

    line 121

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Make Commit

Purpose

Inspect current Git changes and repository commit history, ensure AI-generated artifacts are safely ignored in .gitignore, analyze the intent of the diff, and draft a high-quality commit message tailored to the project's established conventions.


Workflow

1. Inspect Changes and Context

Run the following non-destructive inspection commands:

git status --short
git log -15 --format='%h %s%n%b%n---'
git diff --cached --stat
git diff --stat

Scope Rules:

  • Staged changes present (git diff --cached): Focus strictly on staged changes.
  • No staged changes: Analyze unstaged changes (git diff) and untracked files. State clearly that the draft covers unstaged changes.
  • Deep inspect: Inspect relevant file diffs with git diff -U3 or read specific files when semantics are ambiguous.
  • Zero changes: If no modified or staged files exist, report "No changes detected" and stop.
  • Missing repo: If not inside a Git worktree, request repository access or the raw diff and commit history.

2. AI Artifact Detection & Auto-.gitignore Protection

Before drafting commit messages, scan workspace for AI-generated artifacts:

  1. Scan for AI files & folders in the workspace:
    • Tool & agent directories: .gemini/, .claude/, .cursor/, .cline/, .roo/, .windsurf/, .copilot/
    • Cache, memory & logs: brain/, scratch/, chat-transcripts/, .aider*
    • File patterns: *.chat, *.transcript, *.prompt.md
  2. Auto-update project .gitignore:
    • If .gitignore does not exist in project root, create it.
    • If detected AI artifacts are untracked and not covered by .gitignore, append them under an # AI Assistant & Agent Artifacts section.
    • If AI artifacts were already staged (git diff --cached), warn the user and recommend unstaging (git restore --staged <path> or git rm --cached -r <path>).
  3. Notify user: Inform the user if .gitignore was created or updated with AI artifact patterns before presenting the commit message.

3. Guardrails & Secret Prevention

Before drafting, scan the diff and file paths:

  • Never reference or expose secrets: Reject or warn on API keys, private tokens, passwords, .env entries, SSH keys, credentials, or certificates.
  • Filter AI agent and assistant artifacts: Never include internal AI thoughts, agent system prompts, or scratch artifacts in commit messages.
  • Never inspect or add ignored files: Respect .gitignore.
  • Do not execute commits automatically: Never run git commit, git add, git push, or alter Git history unless explicitly commanded by the user.

4. Identify Repository Commit Format

Prioritize documented project guidelines (e.g., CONTRIBUTING.md, AGENTS.md, .commitlintrc*, or commitlint.config.js).

If undocumented, infer the dominant pattern from recent human commits (discount automated merge commits and bump bot commits):

  1. Conventional Commits:
    • Pattern: <type>(<scope>): <subject>
    • Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
    • Breaking changes: <type>!: <subject> or BREAKING CHANGE: in body/footer.
  2. Issue / Ticket Prefixes:
    • Pattern: [PROJ-1234] <subject> or feat: [ABC-99] <subject> or #123: <subject>.
    • Never invent ticket or issue numbers. Only include if evident from branch name (feature/PROJ-123), staged files, or user prompt.
  3. Gitmoji:
    • Pattern: :emoji: <subject> or ✨ feat: <subject>.
    • Match existing emoji conventions if predominantly used.
  4. Standard Imperative (Default):
    • Pattern: <Verb in imperative mood> <concise summary>
    • Example: Add user authentication middleware

Match repository casing (lowercase vs capitalized subject), punctuation (no trailing period in subject line), and language.


5. Analyze Intent and Draft Content

  1. Subject Line:
    • Imperative mood ("Add", "Fix", "Refactor", not "Added", "Fixing").
    • Target <= 50-72 characters.
    • Accurately summarize the core change.
    • Avoid generic phrases like "update files", "fix bugs", "misc changes".
  2. Commit Body:
    • Separate subject and body with a blank line.
    • Focus on WHY the change was made, not just WHAT lines changed.
    • Explain context, trade-offs, before-and-after behavior, or potential side-effects.
    • Wrap body text at 72-80 characters for terminal readability.
    • For trivial changes (typo fix, small dependency bump), a subject line alone is sufficient.
  3. Multi-Concern Handling:
    • If the diff contains unrelated changes (e.g., refactoring auth + fixing UI CSS), recommend splitting into atomic commits and provide message drafts for each.

6. Output Format

Return the recommended message in a fenced text code block ready to copy:

<commit message here>

Add any scope explanations, split recommendations, or notes outside the block.


Examples

Example 1: Conventional Commit (Feature)

feat(auth): add refresh token rotation and revocation endpoint

Rotate refresh tokens upon each use to protect against replay attacks.
Revoke old tokens immediately and log invalid reuse attempts.

Closes #142

Example 2: Bug Fix (Standard Imperative)

Fix off-by-one error in pagination calculation

Page offset calculations previously resulted in an empty first page
when page size matched total record count. Correct zero-based index
handling in list_items query.

Example 3: Breaking Change

feat(api)!: migrate v1 response envelope to standard JSON:API format

BREAKING CHANGE: Response data is now nested under `data.attributes`.
Clients must update deserializer models before upgrading to v2.0.

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.