kn-commit

A commit workflow using Conventional Commits, a shared format for describing code changes in Git.

In plain words
What is it for?
Checking staged changes, writing messages such as `fix(auth): refresh tokens`, asking for approval, and creating the commit.
Why use it?
It reduces the risk of committing unrelated files and ensures changes are reviewed and verified before being saved to the project history.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/knowns-dev/knowns/kn-commit
Any agent
npx skills add knowns-dev/knowns --skill kn-commit
Clone the repo
git clone --depth 1 https://github.com/knowns-dev/knowns

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00727
Opus 5 $0.00008 $0.00364
Sonnet 5 $0.00003 $0.00145
Haiku 4.5 $0.00002 $0.00073

Measured yesterday against content hash b91dffcf7eac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kn-commit 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.

internal/instructions/skills/kn-commit/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Committing Changes

Announce: "Using kn-commit to commit changes."

Core principle: VERIFY BEFORE COMMITTING - check staged changes, ask for confirmation.

Inputs

  • Current staged changes
  • Relevant task IDs, scope, and reason for the change

Preflight

  • Confirm the correct files are staged
  • Check whether the commit should reference a task or feature area
  • Refuse to commit if the staged diff looks unrelated or mixed across multiple concerns

Step 1: Review Staged Changes

git status
git diff --staged

Step 2: Generate Commit Message

Format:

<type>(<scope>): <message>

- Bullet point summarizing change

Types: feat, fix, docs, style, refactor, perf, test, chore

Rules:

  • Title lowercase, no period, max 50 chars
  • Body explains why, not just what

Step 3: Ask for Confirmation

Ready to commit:

feat(auth): add JWT token refresh

- Added refresh token endpoint

Proceed? (yes/no/edit)

Wait for user approval.

Step 4: Commit

git commit -m "feat(auth): add JWT token refresh

- Added refresh token endpoint"

Final Response Contract

All built-in skills in scope must end with the same user-facing information order: kn-init, kn-spec, kn-flow, kn-go, kn-plan, kn-research, kn-handoff, kn-implement, kn-test, kn-review, kn-debug, kn-decision, kn-verify, kn-doc, kn-template, kn-extract, and kn-commit.

Required order for the final user-facing response:

  1. Goal/result - state whether a commit was proposed, blocked, or created.
  2. Key details - include the proposed or final commit message, relevant diff concerns, and approval status.
  3. Next action - recommend a concrete follow-up command only when a natural handoff exists.

Keep this concise for CLI use. Skill-specific content may extend the key-details section, but must not replace or reorder the shared structure.

Do not manage platform-synced skill copies; this source defines the built-in workflow contract.

Read the full file on GitHub · 115 lines

Changes

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.

  1. yesterday First seen · 115 lines · 16 tokens per session scan A b91dffcf7eac

Subscribe to this mod's changes

kn-commit is a skill published in the GitHub repository knowns-dev/knowns (241 stars, last pushed 5d ago), licensed MIT. It adds 16 tokens to every session and 727 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

agent-session-monitor

Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage. Supports web interface for viewing complete conversation history and costs. Use when users ask about current session token consumption, conversation history, or cost statistics.

higress-group/higress · 53 tokens

clinpgx-database

Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.

foryourhealth111-pixel/Vibe-Skills · 45 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens

docx-comment-reply

Reply to comments (批注) in Word .docx/.doc files: extract comment context, draft replies, write threaded replies back, and validate OOXML.

foryourhealth111-pixel/Vibe-Skills · 39 tokens

flow-next-resolve-pr

Resolve PR review feedback. Fetches unresolved threads, triages, fixes, replies and resolves via GraphQL. Use when asked to address review comments.

gmickel/flow-next · 36 tokens

flow-next-tracker-sync

Project a flow-next spec to a tracker issue (Linear, GitHub, GitLab, Jira) and reconcile two-way. Use when asked to sync to a tracker. NOT plan-sync.

gmickel/flow-next · 44 tokens