agentleFS
niyaznurbhashaniyaznurbhasha/claude-skills/safe-commit/SKILL.md

safe-commit

Skill0 starsChanged 7 months agoMITView on GitHub

Methodical commit workflow with security checks and change classification. Use when user says "commit this", "safe commit", "commit and log", or after completing a significant code change.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If any security issue is found, fix it before proceeding.

    line 44
  2. Distinctive:

    Write a descriptive commit message using the type prefix:

    line 53

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

Safe Commit

A disciplined commit workflow that ensures every code change has: a security check, well-classified commit message, and verification.

Instructions

Step 1: Review changes

git status
git diff --staged
git diff

Understand what changed. Classify the change type:

  • feat: New feature or capability
  • fix: Bug fix
  • refactor: Code restructuring without behavior change
  • config: Configuration, environment, or dependency change
  • ui: Frontend, rendering, or display change
  • lm: LLM prompt, template, or AI-related change
  • docs: Documentation update

Step 2: Security check

Before committing, verify:

  • No secrets in staged files (.env, API keys, tokens, passwords)
  • No hardcoded credentials
  • No SQL injection vectors in new database queries
  • No XSS vectors in new HTML rendering
  • No command injection in new shell calls
  • Dependencies being added are from trusted sources

If any security issue is found, fix it before proceeding. Do not commit insecure code.

Step 3: Stage and commit

Stage specific files (never git add -A or git add .):

git add <specific-files>

Write a descriptive commit message using the type prefix:

git commit -m "$(cat <<'EOF'
<type>: <concise description>

<optional body explaining why, not what>
EOF
)"

Step 4: Verify

git status
git log --oneline -3

Confirm the commit succeeded and looks correct.

Examples

Example 1: Feature commit

feat: add research gap scanning for any domain

Searches arxiv + Semantic Scholar, extracts future work sections,
validates gaps are confirmed unsolved.

Example 2: Fix commit

fix: advice response logging when user only asked a question

Was triggering journal capture on every advice request instead of
only when user explicitly asked to log something.

Example 3: LLM change

lm: tighten advice word budgets in ADVICE_TMPL

Simple: 60-100 words, Medium: 100-150, Complex: 150-200.
Hard cap 200. No filler openers.

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.