Install
$ agentstack add skill-vdustr-vp-claude-code-marketplace-gitignore-builder ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Gitignore Builder
Build and merge .gitignore files using templates from github/gitignore with smart project detection.
When to Use
Invoke this skill when:
- User explicitly requests
/gitignoreor asks to create/update a.gitignore - Detecting
git initor a newly cloned repo without.gitignore - User mentions ignoring files, not wanting to track certain files
- Observing
git statusoutput with files that should typically be ignored (e.g.,node_modules/,.env,__pycache__/,*.log)
Workflow
Step 1: Determine Target Location
- Find the nearest
.gitdirectory to determine repo root - If no
.gitfound, ask user if they want to create a global gitignore at~
Location Rules:
| Situation | Action | |-----------|--------| | Inside a repo, project-level requested | Use repo root (where .git is) | | Inside a repo, global requested | Warn: "Global gitignore is recommended at ~/.gitignore. You're currently inside a repo. Proceed here anyway?" | | Not in a repo | Suggest creating global gitignore at ~/.gitignore |
Step 2: Detect Project Type
For project-level gitignore (basic detection):
| Indicator File | Template | |----------------|----------| | package.json | Node.gitignore | | requirements.txt, pyproject.toml, setup.py, Pipfile | Python.gitignore | | Cargo.toml | Rust.gitignore | | go.mod | Go.gitignore | | composer.json | Composer.gitignore | | Gemfile | Ruby.gitignore | | pom.xml | Maven.gitignore | | build.gradle, build.gradle.kts | Gradle.gitignore | | *.swift, Package.swift | Swift.gitignore | | *.csproj, *.sln | VisualStudio.gitignore | | CMakeLists.txt | CMake.gitignore | | Makefile with C/C++ files | C.gitignore or C++.gitignore |
For global gitignore (environment-aware detection):
| Detection Method | Template (from Global/) | |------------------|-------------------------| | uname = Darwin | macOS.gitignore | | uname = Linux | Linux.gitignore | | Windows environment | Windows.gitignore | | .vscode/ exists or code command available | VisualStudioCode.gitignore | | .idea/ exists | JetBrains.gitignore | | vim or nvim available | Vim.gitignore | | emacs available | Emacs.gitignore |
Step 3: Present Recommendations
Show detected templates and ask for confirmation:
Detected project root: /path/to/repo
Found indicators: package.json, .vscode/
Recommended templates:
- Node.gitignore
- VisualStudioCode.gitignore (for global)
Proceed with these templates? [Y/n/edit]
Allow user to:
- Confirm (Y)
- Cancel (n)
- Edit the list (add/remove templates)
Step 4: Fetch and Merge
Use the bundled scripts/merge-gitignore.sh script from this skill directory:
scripts/merge-gitignore.sh Node Python macOS
Merge Order (later entries have higher priority in gitignore):
- Templates section - github/gitignore templates with START/END markers (easiest to replace/update)
- Local files section - Project-specific ignores
- Overrides section - Custom overrides with highest priority (last wins in gitignore)
Step 5: Handle EOL Conflicts
If the script detects mixed line endings:
⚠️ EOL inconsistency detected:
- Node.gitignore: LF
- VisualStudio.gitignore: CRLF
- Existing .gitignore: LF
Choose unified format:
1. LF (Unix/macOS) - recommended
2. CRLF (Windows)
3. Keep as-is (no conversion)
Wait for user confirmation before proceeding.
Step 6: Show Diff Preview
If target .gitignore already exists, show a diff:
📄 Will write to: /path/to/repo/.gitignore
--- Existing content
+++ Merged content
@@ -1,5 +1,60 @@
+# ╔═══════════════════════════════════════════════════════════════════════╗
+# ║ START - github/gitignore templates ║
+# ╚═══════════════════════════════════════════════════════════════════════╝
+
+# --------------------------------------------
+# Source: Node.gitignore
+# --------------------------------------------
+node_modules/
+...
+
+# ╔═══════════════════════════════════════════════════════════════════════╗
+# ║ END - github/gitignore templates ║
+# ╚═══════════════════════════════════════════════════════════════════════╝
+
+# ============================================
+# Local files (project-specific ignores)
+# ============================================
+
+# ============================================
+# Overrides (highest priority - last wins)
+# ============================================
+
# User custom rules
my-custom-file.txt
Confirm write? [Y/n]
Step 7: Write File
After user confirms, write the file and report success:
✅ Created /path/to/repo/.gitignore (150 lines, 3 templates merged)
Important Notes
Always Recommend *.local Pattern
At the end of every gitignore generation, suggest:
💡 Tip: Consider adding these patterns for local configuration files:
*.local
*.local.*
These patterns prevent accidentally committing local overrides.
Gitignore Syntax Reminders
When discussing or modifying gitignore:
- Negation: The exclamation mark prefix negates a pattern, re-including previously excluded files. Order is important: the negation must come after the exclusion. Example:
!important.logre-includesimportant.log. - Order matters: Later patterns override earlier ones.
- Comments: Lines starting with
#are comments. - Directory: Trailing
/matches only directories (e.g.,build/). - Wildcards:
*matches anything except/,**matches everything including/.
Source Attribution & Structure
Templates section must be wrapped with START/END markers:
# ╔═══════════════════════════════════════════════════════════════════════╗
# ║ github/gitignore templates ║
# ║ https://github.com/github/gitignore ║
# ╠═══════════════════════════════════════════════════════════════════════╣
# ║ START - Do not edit this section manually ║
# ╚═══════════════════════════════════════════════════════════════════════╝
# --------------------------------------------
# Source: Node.gitignore
# --------------------------------------------
node_modules/
...
# ╔═══════════════════════════════════════════════════════════════════════╗
# ║ END - github/gitignore templates ║
# ╚═══════════════════════════════════════════════════════════════════════╝
This makes it easy to:
- Identify template content for updates (replace between START/END)
- Understand where each rule comes from
- Avoid accidental edits to generated content
Preserve User Content
If merging with an existing .gitignore, preserve user-added content in the appropriate section:
# ╔═══════════════════════════════════════════════════════════════════════╗
# ║ START - github/gitignore templates ║
# ╚═══════════════════════════════════════════════════════════════════════╝
# --------------------------------------------
# Source: Node.gitignore
# --------------------------------------------
node_modules/
...
# ╔═══════════════════════════════════════════════════════════════════════╗
# ║ END - github/gitignore templates ║
# ╚═══════════════════════════════════════════════════════════════════════╝
# ============================================
# Local files (project-specific ignores)
# ============================================
secret-folder/
local-config.json
# ============================================
# Overrides (highest priority - last wins)
# ============================================
# User custom rules (preserved from original)
my-custom-rule.txt
!important.log
Reference Files
- [examples.md](references/examples.md) - Detailed workflow examples for various scenarios
Script Reference
The merge-gitignore.sh script handles:
- Fetching templates from github/gitignore via raw.githubusercontent.com
- Detecting and reporting EOL inconsistencies
- Concatenating templates with source attribution
- Outputting to stdout for preview/confirmation workflow
Usage:
# Fetch and merge templates
scripts/merge-gitignore.sh [template2] ...
# Templates can be:
# - Top-level: Node, Python, Rust, Go, etc.
# - Global: Global/macOS, Global/VisualStudioCode, etc.
Exit Codes:
| Code | Meaning | |------|---------| | 0 | Success | | 1 | Network error (failed to fetch) | | 2 | EOL conflict detected (info in stderr) |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: VdustR
- Source: VdustR/vp-claude-code-marketplace
- License: MIT
- Homepage: https://github.com/VdustR/skills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.