feat(commands): add AI git commit message generator
Add comprehensive slash command for generating conventional commit
messages using AI. The command analyzes staged git changes and creates
well-structured commit messages following best practices.
Features:
- Conventional commit format (type, scope, description)
- Interactive message editing and regeneration
- Context-aware analysis of git diffs
- Learning from existing commit history style
- Support for custom type and scope hints
- Multi-step workflow with user confirmation
Command supports multiple usage patterns:
- Basic: /git-commit-msg
- With hints: /git-commit-msg fix
- With context: /git-commit-msg "feat(api)"
Also updates command README with documentation for the new command.
🤖 Generated with Claude Code
This commit is contained in:
@@ -284,6 +284,108 @@
|
||||
"pattern": "06_Metadata/Obsidian-Plugins-Manual.md",
|
||||
"approvedAt": 1767608585967,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "git remote remove origin 2>&1 || echo \"no origin to remove\"",
|
||||
"approvedAt": 1767616810536,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "pnpm install",
|
||||
"approvedAt": 1767616837185,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "mkdir -p 00_Inbox 01_Projects 02_Areas 03_Resources 04_Archive 05_Attachments/Organized 06_Metadata/Reference 06_Metadata/Plans 06_Metadata/Templates && echo \"Folders created successfully\"",
|
||||
"approvedAt": 1767617713953,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "cat > \"01_Projects/README.md\" << 'EOF'\n# Projects\n\n**Purpose:** Time-bound initiatives with clear completion criteria.\n\n## What is a Project?\n\nA project has:\n- A specific goal or deliverable\n- A clear end date or completion criteria\n- Multiple tasks or actions\n\nExamples: Writing a paper, launching a product, planning an event, learning a new skill\n\n## Recommended Structure\n\nFor each project folder, create:\n- `Research/` - Source materials and references\n- `Drafts/` - Work in progress\n- `Output/` - Final deliverables\n- `README.md` - Project objectives, timeline, and status\n\n## Project Lifecycle\n\n1. **Start:** Create folder with subfolders and README\n2. **During:** Keep all related materials in the project folder\n3. **Complete:** Create summary note, then move to `04_Archive/`\n\n## Tips\n\n- Link to relevant Areas and Resources\n- Commit regularly to track progress with git\n- Review weekly to check status and next actions\nEOF\necho \"Created 01_Projects/README.md\"",
|
||||
"approvedAt": 1767618086311,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "cat > \"04_Archive/README.md\" << 'EOF'\n# Archive\n\n**Purpose:** Completed or inactive items from Projects and Areas.\n\n## What Gets Archived\n\n- **Completed projects** - Move entire project folder here\n- **Inactive areas** - Areas you're no longer maintaining\n- **Old resources** - Outdated reference materials (use sparingly)\n\n## Archive Structure\n\nMaintain the same folder structure:\n- `Projects/` - Completed project folders\n- `Areas/` - Inactive areas\n- `Resources/` - Outdated resources (if needed)\n\n## Before Archiving a Project\n\n1. Create a project summary note with:\n - What was accomplished\n - Key learnings\n - Links to important outputs\n2. Update related Area notes\n3. Move the entire project folder here\n\n## Maintenance\n\n- Review quarterly to see what can be deleted\n- Some archived items may be reactivated\n- Keep the archive organized (mirror active structure)\n\n## Tips\n\n- Don't archive too aggressively - keep valuable reference material\n- Use git history to track when things were archived\n- Archived doesn't mean forgotten - you can still search and reference\nEOF\necho \"Created 04_Archive/README.md\"",
|
||||
"approvedAt": 1767618088747,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "cat > \"05_Attachments/README.md\" << 'EOF'\n# Attachments\n\n**Purpose:** Storage for all non-text files (images, PDFs, videos, audio).\n\n## Organization\n\n- **Root (05_Attachments/)** - Unprocessed attachments\n- **Organized/** - Files that have been properly named and referenced\n\n## Naming Convention\n\nUse descriptive names that indicate the related note:\n- `[RelatedNote]_[Description].[ext]`\n- Example: `ProjectAlpha_Architecture_Diagram.png`\n- Example: `BookNotes_Thinking_Fast_Slow_Cover.jpg`\n\n## Helper Scripts\n\n```bash\npnpm attachments:list # List unprocessed files\npnpm attachments:organized # Count organized files\npnpm attachments:orphans # Find unreferenced files\npnpm attachments:update-links # Update links after moving\n```\n\n## Processing Workflow\n\n1. Files initially land in `05_Attachments/`\n2. Rename with descriptive names\n3. Reference in notes using `![[filename.ext]]`\n4. Move to `Organized/` subfolder\n5. Update any links if paths change\n\n## Tips\n\n- Process attachments regularly (don't let them pile up)\n- Use consistent naming patterns\n- Delete duplicates and unused files\n- Consider using Gemini Vision to analyze images\nEOF\necho \"Created 05_Attachments/README.md\"",
|
||||
"approvedAt": 1767618090058,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "cat package.json | grep -A 30 '\"scripts\"'",
|
||||
"approvedAt": 1767618132102,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "mkdir -p .claude && echo '{\"user\":{\"name\":\"\",\"publicProfile\":false},\"organizationMethod\":\"PARA\",\"primaryUses\":[\"research\",\"writing\",\"project-management\",\"daily-notes\"],\"tools\":{\"geminiVision\":false,\"firecrawl\":true},\"weeklyReview\":true,\"importedAt\":\"2026-01-05\",\"lastUpdated\":\"2026-01-05\"}' > .claude/vault-config.json && cat .claude/vault-config.json",
|
||||
"approvedAt": 1767618135787,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Write",
|
||||
"pattern": "D:\\tmp\\vault\\my-vault\\CLAUDE.md",
|
||||
"approvedAt": 1767618385844,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Write",
|
||||
"pattern": "D:\\tmp\\vault\\my-vault\\WEEKLY_REVIEW.md",
|
||||
"approvedAt": 1767618388814,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "test -f \"D:\\tmp\\vault\\my-vault\\.gitignore\" && echo \"exists\" || echo \"not found\"",
|
||||
"approvedAt": 1767618406650,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Edit",
|
||||
"pattern": "D:\\tmp\\vault\\my-vault\\.gitignore",
|
||||
"approvedAt": 1767618439421,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "pnpm vault:stats",
|
||||
"approvedAt": 1767618580628,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "git add CLAUDE.md WEEKLY_REVIEW.md .gitignore .claude/vault-config.json 01_Projects/README.md 02_Areas/README.md 03_Resources/README.md 04_Archive/README.md 05_Attachments/README.md pnpm-lock.yaml",
|
||||
"approvedAt": 1767618604305,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Bash",
|
||||
"pattern": "git commit -m \"$(cat <<'EOF'\nInitial vault setup with PARA structure\n\n- Created CLAUDE.md configuration file\n- Created WEEKLY_REVIEW.md template\n- Set up PARA folder structure (Projects, Areas, Resources, Archive)\n- Created README files for each main folder\n- Configured .gitignore for vault files\n- Saved vault configuration to .claude/vault-config.json\n\nGenerated with Claude Code\nCo-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>\nEOF\n)\"",
|
||||
"approvedAt": 1767618611184,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Write",
|
||||
"pattern": ".claude/commands/git-commit-msg.md",
|
||||
"approvedAt": 1767619909039,
|
||||
"scope": "always"
|
||||
},
|
||||
{
|
||||
"toolName": "Edit",
|
||||
"pattern": ".claude/commands/README.md",
|
||||
"approvedAt": 1767619920589,
|
||||
"scope": "always"
|
||||
}
|
||||
],
|
||||
"excludedTags": [],
|
||||
|
||||
Reference in New Issue
Block a user