majiayu000/claude-skill-registry-data/git-directory-management
Claude Code and agent skill by majiayu000/claude-skill-registry-data
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Manage git-tracked directories correctly - never create .gitkeep files in directories that will immediately contain tracked files
Install
npx vskill@latest install majiayu000/claude-skill-registry-data/git-directory-managementSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry-data/git-directory-management.
Git Directory Management
When to Use This Skill
Use this skill when creating new directories in a git repository, especially when:
- Setting up project structure
- Creating plugin/package directories
- Organizing code into new folders
- Adding configuration directories
Core Principle
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.
Pattern to Follow
✅ DO - Add actual files directly
Key points:
- Git automatically tracks directories when they contain files
- Empty directory + file creation can happen in one step
- No
.gitkeepneeded - the real files track the directory
❌ DON'T - Create .gitkeep then immediately add files
Why this is wrong:
.gitkeepserves no purpose if files are coming- Creates unnecessary commits
- Clutters directory with placeholder file
- Extra file to maintain/remove later
When to Use .gitkeep
.gitkeep is appropriate ONLY when:
- The directory must exist but remain empty
- The empty directory is required for the application to function
- No files will be added to the directory immediately
Valid use case example:
Why this is valid:
- Directory must exist before application runs
- Directory will be populated at runtime (not in version control)
.gitkeepensures the empty directory is tracked
Common Scenarios
Scenario: Creating a new plugin structure
✅ DO:
❌ DON'T:
Scenario: Creating empty directories for runtime
✅ DO:
Why this is correct: Cache directory must exist but contents are not tracked.
Scenario: Setting up tool configuration directories
✅ DO:
❌ DON'T:
Decision Tree
Why It Matters
Benefits of not using .gitkeep unnecessarily:
- Cleaner repository (fewer placeholder files)
- Fewer commits (one commit with actual content)
- No cleanup needed later (no .gitkeep to remove)
- Clear intent (tracked files show directory purpose)
Problems with unnecessary .gitkeep:
- Clutters directories with meaningless files
- Creates confusing git history (empty → populated)
- Requires eventual cleanup
- Adds maintenance burden
Quick Reference
Rule of thumb:
- About to add files? → No
.gitkeep - Directory stays empty? → Use
.gitkeep - Not sure yet? → Wait until files exist
Remember:
- Git tracks directories through their files
.gitkeepis for truly empty directories- One commit with actual content beats two commits (empty + populated)
- When in doubt, add the real files first
Examples in This Repository
Correct usage (runtime directories):
- None currently - all directories contain tracked files
What NOT to do:
Correct approach:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdata/git-directory-management/SKILL.md
Popularity
- Repository stars
- 22
- Repository forks
- 8
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Sep 2026, 2 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/majiayu000/claude-skill-registry-data/git-directory-management)