ajhahn.de
← eeco
JSON 62 lines
{
  "name": "commit",
  "description": "Inspect the staged changes and propose a Conventional-Commits message (subject and body) for the operator to use. Reads and proposes only — never stages, never commits, never tags, never touches git history.",
  "intent": {
    "guarantee": "This skill only inspects the working tree and prints a proposed commit message — the operator runs the commit",
    "forbidden": [
      "git add",
      "git commit",
      "git push",
      "git tag",
      "git reset",
      "git rebase",
      "stage anything",
      "amend a commit"
    ]
  },
  "capabilities": [
    { "kind": "tool", "name": "Read" },
    { "kind": "tool", "name": "Grep" },
    { "kind": "tool", "name": "Glob" },
    { "kind": "tool", "name": "AskUserQuestion" },
    { "kind": "bash", "verb": "git status", "scope": "*" },
    { "kind": "bash", "verb": "git diff", "scope": "*" },
    { "kind": "bash", "verb": "git log", "scope": "*" },
    { "kind": "bash", "verb": "git describe", "scope": "*" }
  ],
  "steps": [
    {
      "index": 0,
      "title": "Inspect the staged set",
      "body": "Read the staged changes with the read-only commands below. Note which files changed, the nature of each change, and whether anything is staged at all. If nothing is staged, say so and stop — there is nothing to commit a message for. Never run a write subcommand; this step only reads.",
      "runs": [
        "git status --short",
        "git diff --staged",
        "git log --oneline -10"
      ]
    },
    {
      "index": 1,
      "title": "Classify the change",
      "body": "Pick the Conventional-Commits type from the staged diff: feat (new behaviour), fix (bug fix), docs, refactor, test, chore, build, ci, perf, style. Derive an optional scope from the dominant area of the change (a package or subsystem name). When the change spans several types, pick the one that describes the primary intent and mention the rest in the body."
    },
    {
      "index": 2,
      "title": "Hygiene scan (advise only)",
      "body": "Scan the staged diff for things that should not ship in a commit: secrets or credentials, leftover debug prints, commented-out code, and AI-attribution trailers or fingerprints. Report anything found as advice for the operator to address before committing. Do not edit any file and do not block — this step only warns."
    },
    {
      "index": 3,
      "title": "Draft the message",
      "body": "Write a Conventional-Commits subject of the form `type(scope): summary`, in the imperative mood, with the summary line at most 50 characters. Add a body only when the why is not obvious from the subject: wrap it at ~72 columns and explain the motivation, not the mechanics. Keep technical terms and file paths verbatim. Never add an AI-attribution trailer."
    },
    {
      "index": 4,
      "title": "Print, never commit",
      "body": "Print the proposed message in a fenced block the operator can copy, plus a one-line reminder that nothing was staged or committed. If the staged set looks like it should be split into more than one logical commit, say so and propose the split. Never run git add, git commit, git tag, or any other write subcommand."
    }
  ],
  "output_format": "Print the proposed Conventional-Commits message in a fenced block, followed by a one-line note that nothing was staged or committed (the operator runs the commit).",
  "maps_to_workflow": "commit-msg"
}