taw-commit
taw-kit's unified commit skill: stages files, scans for secrets/env/build-artefact leaks, generates a conventional commit message by READING the actual diff…
от nghiahsgs★ 31 звезда на GitHub
Установить taw-commit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
taw-commit — Conventional Commits, taw-Branded
Every commit in a taw-kit project goes through THIS skill. Strict format + security scrub + diff-aware subject generation.
Purpose
Every commit must be traceable to:
- the phase in
.taw/plan.md(taw orchestrator BUILD branch, CONTEXT mode), OR - the feature added (taw add-feature flow), OR
- the error fixed (taw FIX branch), OR
- raw user intent when called directly (SMART mode — reads diff).
Result: git log --grep "(auth)" or git log --grep "\[P2\]" returns exactly what you want, years later.
Commit format (strict)
<type>(<scope>): <subject>
<optional body: 1-3 bullets of what changed and why>
<optional trailer: [P<n>] or Refs: <feature-id>>
- type —
feat | fix | chore | refactor | style | docs | test | perf | build | ci | revert - scope — kebab-case:
auth | shop | checkout | seo | env | db | ui | deploy | deps - subject — imperative, lowercase, ≤ 72 chars (soft limit 50), no trailing period, describes WHY not WHAT
- phase tag —
[P<n>]only in CONTEXT mode (n = phase number from.taw/plan.md)
Examples
feat(auth): add magic-link sign-in [P2]
- app/login/page.tsx: email form + Supabase signInWithOtp
- middleware.ts: protect /dashboard
- wired to SUPABASE_URL + SUPABASE_ANON_KEY
Refs: phase-2-authentication.md
fix(checkout): reject negative amount before Stripe call
chore(deps): bump next 14.2.3 → 15.0.1 with async cookies codemod
Mode detection
if [ -f .taw/checkpoint.json ] && jq -e '.phase' .taw/checkpoint.json >/dev/null 2>&1; then
MODE="context"
else
MODE="smart"
fi
CONTEXT mode (called by /taw orchestrator)
Read .taw/checkpoint.json:
{ "phase": 2, "phase_file": "phase-2-authentication.md", "scope": "auth" }
Map phase_file → scope via first noun after phase number:
phase-2-authentication.md→authphase-3-product-catalog.md→shopphase-4-checkout-stripe.md→checkout
Append [P<n>] to subject.
SMART mode (ad-hoc — no phase context)
Detect project's existing commit style first:
git log -20 --pretty=format:'%s'
| Pattern in history | Output style |
|---|---|
feat(scope): ... / fix(scope): ... |
Conventional Commits (full) |
feat: ... / fix: ... |
Conventional Commits (no scope) |
Add X, Fix Y, Update Z |
Imperative title-case |
| chaos | Default to Conventional — nudge team |
Use the detected style.
Workflow
Step 1 — Derive context + scope
CONTEXT mode: phase + scope from checkpoint. SMART mode: infer scope from the largest diff directory:
app/shop/**→shopapp/api/auth/**→authcomponents/ui/**→ui*.env*,next.config.*,tailwind.config.*→envorbuild- Multiple unrelated dirs → omit scope
Step 2 — Pre-commit sanity (MANDATORY)
git add -A
git diff --cached --name-only > /tmp/taw-staged.txt
Auto-unstage local-state paths (these are NEVER meant for git):
for pat in '.claude/' '.claudebk/' '.taw/' '.expo/' '.expo-shared/' '.eas/' '.DS_Store' 'Thumbs.db' '*.log' '*.tsbuildinfo' 'node_modules/' '.next/' 'dist/' 'build/' 'ios/build/' 'android/build/' 'android/.gradle/' 'android/app/build/'; do
files=$(git diff --cached --name-only | command grep -E "^${pat}" || true)
if [ -n "$files" ]; then
git reset HEAD -- $files >/dev/null 2>&1
echo "taw: ↩ unstaged $pat (local-state, never commit)"
fi
done
If 0 staged files left after unstage → abort: "taw: nothing to commit (all local state). Skipping." Exit 0.
Filename blockers — always unstage:
| Pattern | What it is |
|---|---|
.env, .env.local, .env.*.local |
Secrets |
*.key, *.pem, *.p12, *.pfx |
Private keys |
id_rsa, id_ed25519, id_ecdsa |
SSH keys |
credentials.json, service-account*.json |
Cloud IAM |
node_modules/**, .next/**, dist/**, out/**, build/**, .expo/**, ios/build/**, android/build/** |
Build artefacts |
.claude/**, .claudebk/** |
Claude Code local state |
.taw/** |
taw-kit local state (intent, checkpoint, deploy) |
.DS_Store, Thumbs.db |
OS cruft |
*.log, *.tsbuildinfo |
Generated |
Content blockers — scan staged diff for secret patterns:
git diff --cached | command grep -InE "$CONTENT_PATTERN"
where $CONTENT_PATTERN combines these well-known tokens:
| Source | Pattern |
|---|---|
| AWS access key | AKIA[0-9A-Z]{16} |
| AWS secret assignment | aws_secret_access_key:space:*=:space:*[A-Za-z0-9/+=]{40} |
| GitHub PAT | `(ghp |
| OpenAI / Anthropic | sk-[A-Za-z0-9]{20,} |
| Google API key | AIza[0-9A-Za-z\-_]{35} |
| Slack token | xox[abpr]-[0-9A-Za-z-]{10,} |
| Stripe live key | sk_live_[0-9A-Za-z]{24,} |
| JWT | eyJ[A-Za-z0-9_=-]{10,}\.eyJ[A-Za-z0-9_=-]{10,}\.[A-Za-z0-9_=\-]+ |
| PEM private key header | `-----BEGIN (RSA |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Bash - 03
Edit - 04
Grep
FAQ
Что делает скилл taw-commit?
taw-kit's unified commit skill: stages files, scans for secrets/env/build-artefact leaks, generates a conventional commit message by READING the actual diff (not guessing), then commits. Two modes: CONTEXT mode (called by taw orchestrator — uses .taw/checkpoint.json phase info, writes strict [P<n>] format) and SMART mode (ad-hoc — infers type+scope+subject from diff content). Replaces the old git-auto-commit + commit-message-smart skills (merged). User never types git commands. Always prefixes output with "taw:" so you know which tool did it.
Как установить скилл taw-commit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл taw-commit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop 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…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…