- Home
- Skills
- Gwenwindflower
- .Charmschool
- Gitignore
gitignore_skill
- Shell
7
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill gwenwindflower/.charmschool --skill gitignore- SKILL.md2.3 KB
Overview
This skill generates advanced and comprehensive .gitignore files tailored to your project type, using precise gitignore syntax and patterns. It produces scaffolding from common templates and refines entries with anchored paths, wildcards, and negations to minimize accidental commits. The output emphasizes clarity and maintainability so teams can rely on a consistent ignore strategy.
How this skill works
The skill can scaffold a starter .gitignore based on project type and then refine rules using anchored paths (/path), directory-only matches (path/), and loose matches (path). It applies fnmatch-style globbing (*, **, ?, [sets], [ranges]) to handle files and directories at any depth, and supports explicit negation (!pattern) to re-include necessary files. Comments (#) and escapes () are used to document and preserve literal patterns.
When to use it
- Initializing a new repository and creating a minimal, correct .gitignore
- Converting informal ignore lists into strict, anchored rules for clarity
- Adding exclusions for build artifacts, logs, secrets, or dependency folders
- Preserving a small set of committed files while ignoring broader patterns
- Creating cross-project dotfiles for consistent developer environments
Best practices
- Prefer anchored paths (/path) for repo-root directories to avoid accidental global matches
- Use directory-only patterns (path/) when you intend to ignore a folder and its contents
- Use ** to express depth-insensitive ignores (e.g., **/node_modules) for nested dependencies
- Add negation rules (!pattern) after the broader ignore to re-include necessary tracked files
- Comment groups of rules to explain why items are ignored and reduce surprise for teammates
Example use cases
- Generate a Node.js .gitignore that ignores node_modules/, dist/, *.log and re-includes a tracked config file
- Create a Python .gitignore that excludes venv/ and __pycache__/, while allowing a tracked requirements.txt
- Scaffold a build-focused .gitignore that ignores build/, *.o, and coverage/ but keeps README.md
- Convert a flat list of ignored names into precise patterns using /path, path/, and ** for depth
FAQ
/path anchors the match to the .gitignore location (use for repo-root folders). path/ matches any directory named path at any depth and ignores its contents.
How do I keep one file inside an ignored folder?
Ignore the folder first (e.g., logs/), then add a negation for the file path after (e.g., !logs/important.log). Ensure the negation is not shadowed by earlier rules.