Install
$ agentstack add skill-m2laborg-agent-skills-local-git-excludes ✓ 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
Local Git Excludes — Don't Pollute the Team .gitignore
The team's .gitignore is tracked and shared. Every line you add is committed and pushed for everyone to see. For anything personal — symlinks to your own dotfile/skills repos, scratch notes, IDE configs that nobody else uses, machine-local artifacts — use a local-only mechanism instead.
Three Mechanisms (Pick the Right One)
| Mechanism | Scope | Tracked? | When to use | |---|---|---|---| | Repo .gitignore | This repo, all clones | ✅ Yes | Build outputs, secrets patterns, anything every contributor needs | | .git/info/exclude | One clone of one repo | ❌ No | Personal files in a specific shared repo | | Global gitignore (core.excludesfile) | Every repo on this machine | ❌ No | Patterns you always want ignored everywhere (e.g. .DS_Store, *.swp, personal IDE folders) |
Decision Rule
Before adding a line to a tracked .gitignore, ask: "Would every contributor benefit from this rule?"
- Yes → tracked
.gitignoreis correct. - No / only me →
.git/info/exclude(this repo) or global gitignore (all repos). - Unsure → default to
.git/info/exclude. You can always promote it to the tracked file later.
Mechanism 1 — Per-Clone Exclude (.git/info/exclude)
Lives at /.git/info/exclude. Same syntax as .gitignore. Never pushed (the entire .git/ directory is local).
# Add a personal pattern to the current repo only
echo ".claude/skills/my-personal-skill" >> .git/info/exclude
# Verify it's working
git check-ignore -v .claude/skills/my-personal-skill
# .git/info/exclude:N:.claude/skills/my-personal-skill .claude/skills/my-personal-skill
When you re-clone the repo, .git/info/exclude resets to the default. Either re-add the lines or use the global gitignore for patterns you want everywhere.
Mechanism 2 — Global Gitignore
One file, applies to every repo on the machine. Set it once.
# One-time setup
git config --global core.excludesfile ~/.gitignore_global
# Add patterns you always want ignored, anywhere
cat >> ~/.gitignore_global > .git/info/exclude
# 3. Verify
git status # should NOT list the file
git check-ignore -v .claude/skills/my-skill # confirms which rule excluded it
Auditing Before You Commit
Before pushing changes to a tracked .gitignore, ask yourself again per line:
git diff .gitignore
For each new line: "Would I be comfortable explaining this to every reviewer?" If the answer involves "this is just my personal setup", move it to .git/info/exclude instead.
When You've Already Pushed Personal Stuff to the Team .gitignore
Don't panic — gitignore lines are harmless code. To clean up:
git checkout main && git pull
git checkout -b mdsm/cleanup-gitignore
# remove the personal lines from .gitignore
git commit -am "gitignore: remove personal entries (moved to local exclude)"
# add the same lines to .git/info/exclude on every machine you use
echo "" >> .git/info/exclude
Open a small PR, mention briefly that you're moving them to per-clone excludes.
Bonus — git update-index --assume-unchanged
For tracked files where you have local-only modifications you don't want to push (e.g. tweaking a config file that lives in the repo):
git update-index --assume-unchanged path/to/tracked/file
# undo:
git update-index --no-assume-unchanged path/to/tracked/file
Use sparingly — it can confuse you later. Prefer rewriting the file's design (template + gitignored override) when this comes up repeatedly.
Anti-Patterns
- Adding
.idea/,.vscode/,.DS_Store, personal symlinks, orWARP.md-style assistant configs to the team.gitignore"for convenience". They belong in the global gitignore. - Committing personal scratch notes "behind" a
.gitignorerule for them — the rule reveals you have them. - Telling colleagues to put a specific line in their local
.gitignore— give them the global-gitignore recipe instead. - Forgetting that
.git/info/excludeis per-clone; treating it as if it follows the repo.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: M2LabOrg
- Source: M2LabOrg/agent-skills
- License: MIT
- Homepage: https://m2laborg.github.io/agent-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.