ilude/claude-code-config/ignore-files-workflow
Claude Code and agent skill by ilude/claude-code-config
- community
Checking that the SKILL.md file is still in the repository.
Ignore file management for .gitignore, .dockerignore, and .specstory directories. Includes synchronization, alphabetical ordering, organization, best practices, and testing guidelines. Activate when working with .gitignore, .dockerignore, .specstory files, or managing version control and Docker build context.
Install
npx vskill@latest install ilude/claude-code-config/ignore-files-workflowSKILL.md
Ignore Files Workflow
Auto-activate when: Working with .gitignore, .dockerignore, .specstory/, or when user mentions ignore files, version control organization, or Docker build context.
Comprehensive guidelines for maintaining .gitignore and .dockerignore files with proper organization, synchronization, and best practices.
Purpose
Maintain .gitignore and .dockerignore files to:
- Exclude unnecessary files from Git version control
- Reduce Docker build context and image sizes
- Prevent accidental commits of secrets and credentials
- Improve build performance
- Keep repositories clean and focused
Quick Reference
Key Principles
- Alphabetical ordering - Within sections, sort entries alphabetically (case-sensitive)
- Section organization - Use comments to group related patterns
- Synchronization - Keep shared entries consistent between
.gitignoreand.dockerignore - Specificity - Use precise patterns, avoid overly broad rules
- Documentation - Comment platform-specific or non-obvious patterns
- Consistency - Review and maintain quarterly
File Organization Structure
Alphabetical Ordering Rules
- All entries within sections must be in alphabetical order
- Case-sensitive ordering: uppercase letters before lowercase (ASCII sorting)
- Special characters sorted by ASCII value
- Sections themselves can be organized logically
- Makes files easier to scan and prevents duplicate patterns
Example:
Synchronization Rules
Entries in Both .gitignore and .dockerignore
These should appear in both files (keep in sync):
Entries ONLY in .gitignore
Entries ONLY in .dockerignore
Why Synchronization Matters
- Consistency - Reduced confusion across build environments
- Maintenance - Less duplicated pattern management
- Security - Same files excluded from both Git and Docker
- Performance - Aligned optimization rules
.gitignore Best Practices
What to Include ✅
Build artifacts:
build/,dist/,*.egg-info/,bin/,lib/,out/
Dependencies:
node_modules/,.venv/,venv/,vendor/,packages/
Compiled code:
*.pyc,*.pyo,__pycache__/,*.o,*.so
Test outputs:
.pytest_cache/,.coverage,htmlcov/,.tox/,.nox/
Environment files:
.env(secrets),.env.*(except.env.example)
Logs:
*.log,logs/
OS files:
.DS_Store,Thumbs.db,Desktop.ini
IDE files:
.vscode/,.idea/,*.swp,*.swo,*~
Temporary files:
tmp/,temp/,*.tmp
What NOT to Include ❌
Source code:
- Never ignore application code or tests
Configuration templates:
.env.example,config.example.yml(provide examples)
Project documentation:
README.md,docs/,*.md(unless auto-generated)
Essential config:
pyproject.toml,package.json,Dockerfile
.gitignore Complete Template
.dockerignore Best Practices
What to Include ✅
Version control:
.git/,.gitignore,.gitattributes
Documentation:
README.md,docs/,*.md(not needed in image)
CI/CD:
.github/,.gitlab-ci.yml,Jenkinsfile
Development:
.devcontainer/,.vscode/,.idea/
Testing:
tests/,.spec/,.specstory/,*.test.js
Build artifacts:
build/,dist/,node_modules/,*.egg-info/
Environment:
.env,.env.*
Logs:
*.log,logs/
OS files:
.DS_Store,Thumbs.db
What to KEEP ✅
Source code - Code needed in the image
Dependencies files:
requirements.txt,package.json,Gemfile,go.mod
Configuration - Config needed at runtime
Assets - Static files served by the application
.dockerignore Complete Template
Language-Specific Patterns
Python
Node.js / JavaScript
Go
Rust
General Development (All Languages)
SpecStory Integration
.specstory Directory Management
The .specstory/ directory contains SpecStory extension artifacts (chat history, project metadata, backups).
Recommended .gitignore Entry
Recommended .dockerignore Entry
When to Keep .specstory in Git
- Valuable for project context and decision history
- Useful for onboarding and meta-analysis
- Share chat history with team
When to Exclude .specstory
- When chat history contains sensitive information
- When you want minimal repository bloat
- When .specstory is auto-generated
Project-Specific Customization
Adding Custom Patterns
For project-specific artifacts:
Excluding Important Files with Negation
Use ! to override ignore patterns:
Common Mistakes to Avoid
❌ Too Broad Patterns
✅ Specific Patterns
❌ Missing Comments
✅ Well-Documented
❌ Accidentally Ignoring Important Files
✅ Precise Patterns with Exceptions
Maintenance Guidelines
Regular Review Schedule
- Quarterly review - Check for obsolete patterns
- New tool/framework - Add patterns immediately after adoption
- Performance issues - Review when builds or operations slow down
- Team feedback - Incorporate suggestions from team members
Review Checklist
- [ ] All patterns alphabetically sorted within sections
- [ ] No duplicate patterns
- [ ] Comments describe each section clearly
- [ ] Patterns are specific, not overly broad
- [ ] No accidentally ignored important files
- [ ]
.env.exampleand templates NOT ignored - [ ] Docker build context size is reasonable
- [ ] Tests confirmed still tracked in Git
Testing Ignore Patterns
Verification Checklist
Before committing changes to ignore files:
- [ ] All patterns are in alphabetical order within sections
- [ ] Each section has a descriptive comment header
- [ ] No overly broad patterns (
*,.*) - [ ] Templates and examples NOT ignored (
.env.example,config.example.yml) - [ ] Critical files still tracked:
git status | grep -E "package.json|requirements.txt|Dockerfile" - [ ] No duplicate patterns between sections
- [ ] Platform-specific patterns are commented (
# macOS,# Windows) - [ ]
.specstory/handled appropriately (included/excluded consistently) - [ ] Docker build context is reasonable size
- [ ]
git status --ignoredshows expected ignored files - [ ] Run
make testor equivalent test suite passes (if applicable)
Complete Example: Synchronized Python Project
.gitignore
.dockerignore
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ignore-files-workflow/SKILL.md
Popularity
- Repository stars
- 7
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Mar 2026, 8 months ago.
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/ilude/claude-code-config/ignore-files-workflow)