agentsclimarketplace

Draft commit msg

Skill avanrossum/claude-local-llm-skills/skills/draft-commit-msg

Draft a commit message from staged changes using the local LLM — quick conventional commit without Claude tokensFrom its SKILL.md

Install
npx -y skills add avanrossum/claude-local-llm-skills --skill draft-commit-msg

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.1 KB, as published. Nobody here has run it

/draft-commit-msg — Draft Commit Message via Local LLM

You are drafting a commit message from the current staged changes using the local/remote LLM.

Arguments: $ARGUMENTS


Step 1 — Get the Diff

Run git diff --cached to get staged changes. If nothing is staged, tell the user and stop.


Step 2 — Send to Local LLM

DIFF=$(git diff --cached)
LLM_API_TOKEN=$(security find-generic-password -a "$USER" -s "lm-studio-token" -w 2>/dev/null)
curl -s "${LLM_BASE_URL:-https://lm.mipyip.com}/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLM_API_TOKEN" \
  -d '{
    "model": "'"${LLM_MODEL:-qwen/qwen3.5-35b-a3b}"'",
    "messages": [
      {"role": "system", "content": "You are writing a git commit message. Follow conventional commit format:\n\n<type>: <short description>\n\n<optional body explaining why>\n\nTypes: feat, fix, refactor, docs, style, test, chore\n\nRules:\n- Title under 70 characters\n- Focus on WHY, not WHAT (the diff shows what)\n- Be concise\n- Return ONLY the commit message, no explanation"},
      {"role": "user", "content": "Write a commit message for this diff:\n\n'"$DIFF"'"}
    ],
    "stream": false,
    "temperature": 0.3
  }'

Environment variables:

  • LLM_BASE_URL — override endpoint (default: https://lm.mipyip.com)
  • LLM_MODEL — override model (default: qwen/qwen3.5-35b-a3b)
  • Bearer token from macOS Keychain (lm-studio-token) or LLM_API_TOKEN env var

Step 3 — Present and Offer to Commit

Show the draft message to the user. Ask:

Want me to commit with this message, or would you like to adjust it?

If they approve, run the commit. If they want changes, adjust the message yourself — don't re-call the local model for minor edits.


Error Handling

  • If the LLM is unreachable, draft the commit message yourself
  • If the diff is too large, summarize the changed files and generate a message from the summary

Keep looking

Skills are one crate of 627,559. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.