- Home
- Skills
- Vdustr
- Vp Claude Code Marketplace
- Gitignore Builder
gitignore-builder_skill
- Shell
0
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 vdustr/vp-claude-code-marketplace --skill gitignore-builder- SKILL.md10.8 KB
Overview
This skill builds and merges .gitignore files using templates from the github/gitignore collection with smart project and environment detection. It locates the repository root (or suggests a global ignore), recommends appropriate templates, shows a preview diff, and writes a merged .gitignore while preserving user content and respecting EOL choices. The workflow is interactive and safe: confirm templates, review diffs, and approve writes.
How this skill works
The skill finds the nearest .git directory to determine the repo root or suggests a global ~/.gitignore when not in a repo. It scans indicator files and environment cues to recommend github/gitignore templates (e.g., Node, Python, macOS, VisualStudioCode). It fetches template content, wraps it with START/END markers for easy updates, merges sections in a predictable order (templates, local files, overrides), checks EOL consistency, shows a diff preview, and writes the final .gitignore after confirmation.
When to use it
- User asks to create or update a .gitignore (e.g., "create gitignore", "/gitignore").
- Newly initialized or cloned repository missing a .gitignore.
- You see untracked files that should be ignored (node_modules/, .env, __pycache__, *.log).
- You want to combine multiple official templates into one coherent .gitignore.
- You need a global .gitignore for an environment (macOS, Windows, Linux, editors).
Best practices
- Detect project root first; prefer repo-level .gitignore unless user requests global.
- Show recommended templates and require explicit user confirmation before writing.
- Wrap template content with clear START/END markers to allow future updates.
- Preserve user-added rules in Local and Overrides sections when merging.
- Prompt on EOL inconsistencies and let the user pick LF, CRLF, or keep-as-is.
- Always suggest adding *.local and *.local.* to avoid committing local configs.
Example use cases
- Add a Node.gitignore and VisualStudioCode.gitignore when package.json and .vscode/ are present.
- Create a global macOS and editor ignore for a new developer machine (uname = Darwin + code available).
- Merge Python and JetBrains templates for a repo with pyproject.toml and .idea/.
- Update an existing .gitignore: show a diff, preserve custom rules, and replace template block.
- Handle EOL conflicts when mixing templates from different OS origins before writing file.
FAQ
Templates are placed in the Templates section; later templates have higher precedence within the gitignore semantics. Final file order is Templates, Local files, then Overrides (last wins).
Will my existing custom rules be lost?
No. Existing user rules are preserved in the Local files or Overrides sections and retained when the template block is updated.