ワンクリックで
git-hygiene
Project-agnostic skill for git commit hygiene, linking tasks to commits, and maintaining clean repository state.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Project-agnostic skill for git commit hygiene, linking tasks to commits, and maintaining clean repository state.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Project-agnostic workflow guidance for Backlog.md MCP task management. Covers search-first protocol, scope assessment, task creation standards, lifecycle management, and cross-session coordination.
Backlog management with the bd (beads) utility for issue tracking. Use when creating issues, claiming work, updating task status, closing completed work, or syncing the backlog with git.
How to create new Agent Skills following the open standard. Use when authoring new skills, extending agent capabilities, or packaging specialized knowledge into reusable formats.
Git hygiene for multi-agent collaborative work. Use when performing version control operations, syncing with remote, committing changes, or ensuring work is properly shared with the team.
Project-agnostic guidance for continuing work across Claude sessions. Ensures context recovery, task resumption, and state reconciliation.
Execution skill for delegated tasks. Use this skill when you are a subagent that has been delegated a task by the tech lead. You must be diligent, hygienic, and deliver work that is "done" and "stable" according to the specification.
| name | git-hygiene |
| description | Project-agnostic skill for git commit hygiene, linking tasks to commits, and maintaining clean repository state. |
Never leave uncommitted files after task completion.
Standard Format:
[task-id] Brief description (imperative mood, <70 chars)
Optional longer explanation if needed:
- Why this change was made
- What problems it solves
- Any breaking changes or important context
Examples:
Good:
[task-38.1] Archive CLAUDE.md before refactoring
Preserving original documentation structure before migration to new format.
[task-12.3] Add user authentication middleware
Implements JWT-based auth for protected routes. Middleware validates tokens
and attaches user context to request object.
[task-5.2] Fix paragraph spacing in essay typography
Bad (avoid):
Updated files # No task reference, vague
[task-12.3] Added some auth stuff # Not imperative, unclear
Fixed bug # No task reference or specificity
Imperative Mood Guide:
After every commit, update the task with commit reference:
# 1. Make commit
git add [files]
git commit -m "[task-38.1] Archive CLAUDE.md before refactoring"
# 2. Get commit hash
git log -1 --format="%H %s"
# 3. Update task with commit reference
# Use task_edit with notesAppend field
Task Note Format:
✅ Committed: abc1234 - [task-38.1] Archive CLAUDE.md before refactoring
Why This Matters:
ALWAYS verify before committing:
# 1. Check what's staged
git status
git diff --staged
# 2. Verify only intended files
# Remove unintended files: git reset HEAD <file>
# 3. Verify CLAUDE.md updates (if subdirectory work)
# If you worked in a subdirectory with CLAUDE.md, include it
git add path/to/subdir/CLAUDE.md
# 4. Security check
# No .env files, no credentials.json, no API keys
# If secrets detected, warn user and abort
# 5. Run tests (if applicable)
# npm test, pytest, cargo test, etc.
# 6. Run linters (if applicable)
# eslint, black, rustfmt, etc.
# 7. Commit
git commit -m "[task-id] Description"
Files to INCLUDE in Commits:
Files to NEVER Commit:
.env, .env.local, .env.productioncredentials.json, secrets.yaml, config.private.*node_modules/, __pycache__/, build artifacts (should be in .gitignore)If User Requests Committing Secrets:
feature/task-38-refactor-claude-mdfeature/task-[id]-[brief-description]# Create feature branch
git checkout -b feature/task-38-refactor-claude-md
# Work and commit on branch
git add [files]
git commit -m "[task-38.1] Archive CLAUDE.md before refactoring"
# Push to remote
git push -u origin feature/task-38-refactor-claude-md
# Create PR (use gh cli or web interface)
gh pr create --title "[task-38] Refactor CLAUDE.md structure" --body "..."
git push --force (unless user explicitly requests and understands risk)git push --force to main/master (warn user even if requested)git reset --hard without confirming uncommitted work is backed upgit clean -fd without user confirmationgit commit --amend unless user explicitly requests (can cause confusion with remotes)# Option 1: Commit if work is complete
git add [files]
git commit -m "[task-X] Brief description"
# Option 2: Stash if work is incomplete
git stash save "WIP: task-X incomplete work"
# Resume later: git stash pop
# If commit NOT pushed yet:
git reset HEAD~1 # Undo commit, keep changes
git stash # Save changes
git checkout correct-branch
git stash pop
git commit -m "[task-id] Description"
# Remove from staging
git reset HEAD .env
# If already committed but NOT pushed:
git reset HEAD~1 # Undo commit
# Remove secrets from file
git add [files]
git commit -m "[task-id] Description"
# If already pushed - immediate action required
# Warn user: secrets are now public, must be rotated
Before Marking Task Complete:
git status shows clean working directorySession End Checklist:
# Verify clean state
git status # Should show "nothing to commit, working tree clean"
# Verify recent commits linked to tasks
git log --oneline -5 # Should see [task-id] references
# Verify remote is up to date (if pushing)
git push # Or confirm intentionally not pushing
Task Creation → Implementation → Commit → Link:
Example Workflow:
# 1. Task created in Backlog: task-42 "Add search functionality"
# 2. Mark in progress: task_edit(id='task-42', status='In Progress')
# 3. Implement
# [write code]
# 4. Commit
git add src/search.js tests/search.test.js
git commit -m "[task-42] Add search functionality
Implements full-text search with fuzzy matching and filtering."
# 5. Link commit to task
# task_edit(id='task-42', notesAppend=['✅ Committed: abc1234 - Add search functionality'])
# 6. Mark complete
# task_edit(id='task-42', status='Done')
This creates complete traceability: Task → Code → Commit → Verification.