Manage git-tracked directories correctly - never create .gitkeep files in directories that will immediately contain tracked files
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
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"