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.
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.
Maintain .gitignore and .dockerignore files to:
.gitignore and .dockerignore# Comment describing section
specific-entry/
pattern-*.ext
another-entry.xyz
# Next section
other-entry/
Example:
# Build artifacts (alphabetical)
build/
dist/
*.egg-info/
# IDEs (alphabetical)
.idea/
.vscode/
*.swp
These should appear in both files (keep in sync):
# Build artifacts
build/
dist/
*.egg-info/
# Python bytecode
__pycache__/
*.pyc
*.pyo
# Testing outputs
.coverage
.pytest_cache/
htmlcov/
# Environment files
.env
.env.*
# Virtual environments
.venv/
venv/
# Temporary files
tmp/
temp/
*.tmp
# Logs
*.log
logs/
# OS files
.DS_Store
Thumbs.db
# Type checking (Python)
.mypy_cache/
# Dev dependencies (keep locally)
.venv/
venv/
ENV/
# IDE configuration (version control is optional)
.idea/
.vscode/
*.swp
*~
# Test coverage reports
htmlcov/
# Git metadata
.git/
.gitattributes
.gitignore
# Documentation (don't need in image)
*.md
docs/
# CI/CD pipelines
.github/
.gitlab-ci.yml
Jenkinsfile
# Development tools
.devcontainer/
# Testing (keep in git, exclude from Docker)
tests/
.spec/
*.test.js
# SpecStory artifacts
.specstory/
Build artifacts:
build/, dist/, *.egg-info/, bin/, lib/, out/Dependencies:
node_modules/, .venv/, venv/, vendor/, packages/Compiled code:
*.pyc, *.pyo, __pycache__/, *.o, *.soTest 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.iniIDE files:
.vscode/, .idea/, *.swp, *.swo, *~Temporary files:
tmp/, temp/, *.tmpSource code:
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# Python
__pycache__/
*.egg-info/
*.py[cod]
*.pyo
*.so
.Python
# Distribution / packaging
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
# Virtual environments
.venv/
venv/
ENV/
env/
# Testing
.coverage
.nox/
.pytest_cache/
.tox/
htmlcov/
# Type checking
.dmypy.json
.mypy_cache/
.pytype/
dmypy.json
# Linting
.ruff_cache/
# Jupyter
.ipynb_checkpoints/
*.ipynb_checkpoints
# Environment
.env
.env.*
!.env.example
# IDEs
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Temporary
temp/
tmp/
*.tmp
Version control:
.git/, .gitignore, .gitattributesDocumentation:
README.md, docs/, *.md (not needed in image)CI/CD:
.github/, .gitlab-ci.yml, JenkinsfileDevelopment:
.devcontainer/, .vscode/, .idea/Testing:
tests/, .spec/, .specstory/, *.test.jsBuild artifacts:
build/, dist/, node_modules/, *.egg-info/Environment:
.env, .env.*Logs:
*.log, logs/OS files:
.DS_Store, Thumbs.dbSource code - Code needed in the image
Dependencies files:
requirements.txt, package.json, Gemfile, go.modConfiguration - Config needed at runtime
Assets - Static files served by the application
# Git
.git/
.gitattributes
.gitignore
# Documentation
*.md
docs/
# CI/CD
.github/
.gitlab-ci.yml
Jenkinsfile
# Development
.devcontainer/
.idea/
.vscode/
# Testing
.coverage
.pytest_cache/
.spec/
.specstory/
htmlcov/
tests/
# Python
__pycache__/
*.egg-info/
*.pyc
*.pyo
.mypy_cache/
.ruff_cache/
# Virtual environments
.venv/
venv/
# Build artifacts
build/
dist/
# Environment files
.env
.env.*
# Logs
*.log
logs/
# OS
.DS_Store
Thumbs.db
# Temporary
temp/
tmp/
*.tmp
__pycache__/
*.py[cod]
*.egg-info/
*.so
.mypy_cache/
.pytest_cache/
.ruff_cache/
.venv/
venv/
.coverage
htmlcov/
node_modules/
npm-debug.log
.npm/
package-lock.json
yarn.lock
dist/
.next/
.nuxt/
*.exe
*.test
vendor/
*.out
go.sum
target/
Cargo.lock
*.rlib
*.rmeta
*.swp
*.swo
*~
.DS_Store
Thumbs.db
.vscode/
.idea/
The .specstory/ directory contains SpecStory extension artifacts (chat history, project metadata, backups).
# SpecStory artifacts (optional - exclude chat history from version control)
.specstory/history/
# SpecStory AI rules backups (optional - if you version control separately)
.specstory/ai_rules_backups/
# Full .specstory exclusion (if not using SpecStory)
.specstory/**
# SpecStory artifacts (development tool, not needed in image)
.specstory/
For project-specific artifacts:
# Project-specific data
data/raw/
models/trained/
cache/
# Generated artifacts
api-docs/
coverage-reports/
# Platform-specific
*.local
Use ! to override ignore patterns:
# Ignore all .env files
.env.*
# Except the example template
!.env.example
# Ignore all configs
config/*.yml
# Except the template
!config/template.yml
# Ignore Python cache but keep specific file
__pycache__/
!__pycache__/.gitkeep
# BAD: Matches too much
*
*.py*
config/
# GOOD: Precise patterns
*.pyc
*.pyo
__pycache__/
config/*.local
!config/template.yml
.DS_Store
Thumbs.db
.vscode/
# OS files
.DS_Store # macOS
Thumbs.db # Windows
# IDEs
.vscode/ # VS Code
.idea/ # JetBrains
*.example # Too broad, catches .example files you need
.env.* # Without negation for .env.example
test/ # Might ignore real tests
.env
.env.*
!.env.example
tests/ # Only the tests directory
!tests/.gitkeep
.env.example and templates NOT ignored# Check what Git ignores (shows all ignored files)
git status --ignored
# Check what .gitignore would ignore (dry run)
git check-ignore -v *
# List what's being tracked
git ls-files
# Verify specific file not ignored
git check-ignore -v path/to/file.txt
# Docker build context size
docker build --no-cache . 2>&1 | grep "Sending build context"
# See what Docker would send (requires buildkit)
DOCKER_BUILDKIT=1 docker build --progress=plain . 2>&1 | head -20
Before committing changes to ignore files:
*, .*).env.example, config.example.yml)git status | grep -E "package.json|requirements.txt|Dockerfile"# macOS, # Windows).specstory/ handled appropriately (included/excluded consistently)git status --ignored shows expected ignored filesmake test or equivalent test suite passes (if applicable)# Build artifacts
build/
dist/
*.egg-info/
# Python
__pycache__/
*.py[cod]
*.pyo
*.so
.Python
# Virtual environments
.venv/
venv/
ENV/
env/
# Testing
.coverage
.pytest_cache/
.tox/
htmlcov/
# Type checking
.mypy_cache/
.dmypy.json
dmypy.json
.pytype/
# Linting
.ruff_cache/
# Jupyter
.ipynb_checkpoints/
*.ipynb_checkpoints
# Environment
.env
.env.*
!.env.example
# IDEs
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Temporary
temp/
tmp/
*.tmp
# SpecStory (optional)
.specstory/history/
# Git
.git/
.gitattributes
.gitignore
# Documentation
*.md
docs/
# CI/CD
.github/
.gitlab-ci.yml
Jenkinsfile
# Development
.devcontainer/
.idea/
.vscode/
# Testing
.coverage
.pytest_cache/
.spec/
.specstory/
htmlcov/
tests/
# Python
__pycache__/
*.egg-info/
*.pyc
*.pyo
.mypy_cache/
.ruff_cache/
# Virtual environments
.venv/
venv/
# Build artifacts
build/
dist/
# Environment files
.env
.env.*
# Logs
*.log
logs/
# OS
.DS_Store
Thumbs.db
# Temporary
temp/
tmp/
*.tmp
.git directorygit status / git add# Check .git size
du -sh .git
# Check what's in Docker build context
docker build --progress=plain . 2>&1 | grep "Sending build context"
git status --ignored or Docker buildSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer