Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/stephansama/packages/ai-commit-msgnpx skills add stephansama/packages --skill ai-commit-msggit clone --depth 1 https://github.com/stephansama/packagesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00100 | $0.01390 |
| Opus 5 | $0.00050 | $0.00695 |
| Sonnet 5 | $0.00020 | $0.00278 |
| Haiku 4.5 | $0.00010 | $0.00139 |
Grade A, and why
ai-commit-msg scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ai-commit-msg
Writes an AI-generated conventional commit message to the COMMIT_EDITMSG file via the prepare-commit-msg Git hook. Reads the staged diff and passes it to your configured AI provider.
Setup
- Install and initialise husky:
npm install --save-dev husky && npx husky init
- Create
.husky/prepare-commit-msg:
#!/bin/sh
ai-commit-msg -o "$1"
- Create a config file at
ai-commit-msg.config.ts(orpackage.jsonkeyai-commit-msg):
// ai-commit-msg.config.ts
export default {
provider: "google",
model: "gemini-2.5-flash",
};
- Set the required environment variable:
export GOOGLE_GENERATIVE_AI_API_KEY=your-key
Core Patterns
Google provider
export default {
provider: "google",
model: "gemini-2.5-flash",
};
Requires GOOGLE_GENERATIVE_AI_API_KEY in the environment.
OpenAI provider
export default {
provider: "openai",
model: "gpt-4o-mini",
};
Requires OPENAI_API_KEY in the environment.
Ollama provider (local, no API key)
export default {
provider: "ollama",
model: "llama3.2",
};
Requires the Ollama server running locally (ollama serve).
Custom prompt
export default {
provider: "google",
model: "gemini-2.5-flash",
prompt:
"Write a short conventional commit message in lowercase for this diff:\n\n{{diff}}",
};
The {{diff}} placeholder is replaced with the staged diff (truncated at 8000 characters). The prompt must include {{diff}} or the model receives no diff context.
Skip the hook for one commit
export default {
provider: "google",
model: "gemini-2.5-flash",
skipNextRun: true,
};
When skipNextRun is true, the hook logs a warning and exits immediately. Remove it from the config after the manual commit.
Common Mistakes
CRITICAL Default config uses ollama/llama2 — fails if Ollama not running
Wrong:
# No config file — hooks use default: provider: 'ollama', model: 'llama2'
# Works locally if ollama is running, fails in CI
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 209 lines · 100 tokens per session scan A 5698e8132a75
ai-commit-msg is a skill published in the GitHub repository stephansama/packages (5 stars, last pushed 1mo ago), licensed MIT. It adds 100 tokens to every session and 1,390 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
opendia-harness
Install, configure, and troubleshoot OpenDia for Grok Build (and other MCP harnesses). Use when setting up the plugin, config.toml MCP entry, ports, extension disconnects, tool timeouts, or tunnel mode.
opendia
Drive the user's real browser through OpenDia MCP (logged-in sessions, cookies, wallets, bookmarks, history). Use when automating Chrome/Firefox for social posts, form fills, multi-tab research, local webapp testing, or any task that needs the user's existing browser profile — not a disposable cloud browser.
npm-security
Prevent JavaScript/TypeScript projects from supply-chain attacks across package managers like npm, pnpm, yarn, bun, and deno. Use whenever planning, installing, updating packages or configuring package managers.
frontmcp-extensibility
Use when extending FrontMCP beyond the core SDK by integrating external npm packages, libraries, or third-party services into providers and tools. Covers VectoriaDB for in-memory semantic and vector search (ML-based embeddings or TF-IDF keyword engines, with persistence) and the tamper-evident, hash-chained skill…
huly-cli
Operate Huly through the @firfi/huly-cli executable. Use when a coding agent needs to authenticate, switch Huly workspaces or projects, discover commands, query structured Huly data, or perform confirmed Huly mutations from a shell or automation workflow.
censor_message
Automatically censor profanity in messages by replacing with asterisks.