Skip to content

hancrafted/markdown-harness / .agents/skills/commit

Author a commit message and commit it — Conventional Commits header, Keep a Changelog body, Source trailer, enforced by a commit-time husky gate if setup (--setup-husky). Use before every `git commit`, whether a human or an agent initiates it, including a run split across commits.

FileKindSize
SKILL.mdskill md9.2 KB
assets/research.mdmarkdown13.1 KB
assets/setup-husky.mdmarkdown6.7 KB
scripts/commit-msgexecutablescript3.9 KB
scripts/lib/git.shscript2.3 KB
scripts/lib/hook.shscript1.9 KB
scripts/lib/report.shscript2.6 KB
scripts/lib/rules.shscript6.0 KB
scripts/setup-huskyexecutablescript5.0 KB

scripts/lib/git.sh

View on GitHub
# The gate's only impure surface: everything that asks git a question. Isolated
# here so ../commit-msg reads as orchestration and so each probe can be
# substituted in a test.
#
# Sourced by ../commit-msg. Not executable on its own.

# git_comment_string — what git will treat as a comment when it cleans the
# message up *after* this hook returns. `core.commentString` (git 2.45+) wins
# over `core.commentChar`; unset means `#`.
# Locals are not POSIX, so everything a sourced function keeps is prefixed to
# stay out of the entrypoint's namespace.
git_comment_string() {
  _git_value=$(git config --get core.commentString 2>/dev/null) || _git_value=''
  if [ -z "$_git_value" ]; then
    _git_value=$(git config --get core.commentChar 2>/dev/null) || _git_value=''
  fi
  if [ -z "$_git_value" ]; then
    _git_value='#'
  fi
  printf '%s' "$_git_value"
}

# git_source_values <message-file> — the `Source:` values git itself will expose
# to `git log --format='%(trailers:key=Source,valueonly)'`, one per line.
#
# Handing the raw file to git's own parser is the whole point, and is deliberate
# in two ways. First, a text search cannot tell a real trailer from a line that
# merely looks like one: git recognises trailers only in the final paragraph, so
# a message with prose after `Source:` passes a search and yields nothing to
# `git log`. Second, git's parser already ignores comment lines and truncates at
# the scissors cut line, so pre-processing the file here would only introduce a
# way for the gate and `git log` to disagree.
git_source_values() {
  git interpret-trailers --parse <"$1" 2>/dev/null |
    grep -i '^source:' |
    sed 's/^[^:]*:[[:space:]]*//'
}

# git_merge_in_progress — whether a merge is being concluded right now. Probed
# semantically rather than by matching a message beginning with "Merge", so
# `feat: merge two resolvers` is still judged.
#
# COMMIT_MSG_GATE_MERGE_HEAD overrides the probed path, which is what lets a test
# drive both branches without manufacturing a real conflict.
git_merge_in_progress() {
  if [ -n "${COMMIT_MSG_GATE_MERGE_HEAD-}" ]; then
    [ -e "$COMMIT_MSG_GATE_MERGE_HEAD" ]
    return $?
  fi
  _git_merge_head=$(git rev-parse --git-path MERGE_HEAD 2>/dev/null) || return 1
  [ -n "$_git_merge_head" ] && [ -e "$_git_merge_head" ]
}
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 464kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 196kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 196kUpdated Claude CodeCodexVerifiedInstall