一键导入
git-directory-management
Manage git-tracked directories correctly - never create .gitkeep files in directories that will immediately contain tracked files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage git-tracked directories correctly - never create .gitkeep files in directories that will immediately contain tracked files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Format git commit messages correctly, avoiding HEREDOC syntax issues in favor of multiline strings
Use this skill when asked to perform an interactive git rebase programmatically, absorb/fixup commits into other commits, squash commits together, reorder commits, or drop commits. Provides a portable approach that works on macOS and Linux without interactive user input.
Expert guidance on Zod v4 validation library including breaking changes from v3, migration patterns, core API usage, and common validation patterns. Use when working with Zod schemas, validation, type inference, or migrating from Zod v3.
Demonstrates skill structure with progressive disclosure and best practices for skill development
How to write idiomatic assertions with the Bupkis assertion library for TypeScript and JavaScript
| name | git-directory-management |
| description | Manage git-tracked directories correctly - never create .gitkeep files in directories that will immediately contain tracked files |
Use this skill when creating new directories in a git repository, especially when:
Never create .gitkeep files in directories you're about to populate with tracked files.
.gitkeep is ONLY for keeping truly empty directories in version control.
# Create directory and add actual file
mkdir -p plugins/new-plugin/skills
# Now add your actual files
# (Write SKILL.md, plugin.json, etc.)
Key points:
.gitkeep needed - the real files track the directory# This is wasteful and wrong
mkdir -p plugins/new-plugin/skills
touch plugins/new-plugin/skills/.gitkeep # ❌ Unnecessary!
git add plugins/new-plugin/skills/.gitkeep
git commit -m "Add empty directory"
# Then immediately add real files
# (Write SKILL.md)
git add plugins/new-plugin/skills/
git commit -m "Add actual skill"
Why this is wrong:
.gitkeep serves no purpose if files are coming.gitkeep is appropriate ONLY when:
Valid use case example:
# Application requires logs/ directory to exist on startup
mkdir -p logs
touch logs/.gitkeep
git add logs/.gitkeep
git commit -m "chore: add logs directory for runtime output"
Why this is valid:
.gitkeep ensures the empty directory is tracked✅ DO:
mkdir -p plugins/new-plugin/{skills,commands}
# Then immediately create your files:
# Write plugins/new-plugin/.claude-plugin/plugin.json
# Write plugins/new-plugin/skills/skill-name/SKILL.md
# Write plugins/new-plugin/README.md
# Add all files in one commit
git add plugins/new-plugin/
git commit -m "feat: add new-plugin"
❌ DON'T:
mkdir -p plugins/new-plugin/skills
touch plugins/new-plugin/skills/.gitkeep # ❌ Wrong!
# Then add real files later
✅ DO:
mkdir -p tmp/cache
touch tmp/cache/.gitkeep
git add tmp/cache/.gitkeep
git commit -m "chore: add cache directory for runtime"
Why this is correct: Cache directory must exist but contents are not tracked.
✅ DO:
mkdir -p .config/tool
# Immediately add configuration file
# Write .config/tool/config.json
git add .config/tool/config.json
git commit -m "feat: add tool configuration"
❌ DON'T:
mkdir -p .config/tool
touch .config/tool/.gitkeep # ❌ Wrong! You're about to add config.json
Creating a new directory?
│
├─ Will you add tracked files immediately?
│ └─ YES → No .gitkeep needed, just add the files
│
└─ Will the directory stay empty in version control?
│
├─ YES, and it must exist → Use .gitkeep
│
└─ NO, files coming later → Wait until files exist, then commit
Benefits of not using .gitkeep unnecessarily:
Problems with unnecessary .gitkeep:
Rule of thumb:
.gitkeep.gitkeepRemember:
.gitkeep is for truly empty directoriesCorrect usage (runtime directories):
What NOT to do:
# ❌ DON'T create .gitkeep in plugins/tools/skills/
# This directory is meant to contain skills, not stay empty
Correct approach:
# ✅ Just add your skill directly
# Write plugins/tools/skills/new-skill/SKILL.md
git add plugins/tools/skills/new-skill/
git commit -m "feat(tools): add new-skill"