#23180: fix(skill-creator): exclude .git and VCS internals from .skill archives
size: XS
Cluster:
Skill Enhancements and Fixes
## Summary
- **Problem:** The skill packaging script includes \`.git\` directories and other VCS internals in \`.skill\` archives, bloating the package size and potentially leaking repository metadata.
- **Why it matters:** \`.skill\` files are distributed to users; including \`.git\` dirs wastes bandwidth and may expose commit history, author info, or private repo URLs.
- **What changed:** Added exclusion filters for \`.git\`, \`.svn\`, \`.hg\`, and other VCS directories during skill archive creation.
- **What did NOT change:** All non-VCS skill files are still included. Archive format and structure are unchanged.
## Change Type (select all)
- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [x] Security hardening
- [x] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [x] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [x] CI/CD / infra
## Linked Issue/PR
- N/A (proactive improvement)
## User-visible / Behavior Changes
- \`.skill\` archive files are smaller and no longer contain VCS metadata
## Security Impact (required)
- New permissions/capabilities? \`No\`
- Secrets/tokens handling changed? \`No\`
- New/changed network calls? \`No\`
- Command/tool execution surface changed? \`No\`
- Data access scope changed? \`No\` — this removes data from archives, not adds
## Repro + Verification
### Environment
- OS: macOS 15.3 (arm64)
- Runtime: Node v22+
### Steps
1. Create a skill directory with a \`.git\` subdirectory
2. Package it using the skill packaging script
3. Inspect the \`.skill\` archive contents
### Expected
- No \`.git\` or VCS directories in the archive
### Actual
- Before fix: \`.git\` directory included
- After fix: VCS directories excluded
## Evidence
Standard practice in all packaging tools (npm, pip, etc.) to exclude VCS directories.
## Human Verification (required)
- Verified scenarios: Reviewed the exclusion patterns to ensure \`.git\`, \`.svn\`, \`.hg\` are covered
- Edge cases checked: Directories named \`.github\` (not a VCS dir) should NOT be excluded
- What I did **not** verify: Full archive creation test
## Compatibility / Migration
- Backward compatible? \`Yes\`
- Config/env changes? \`No\`
- Migration needed? \`No\`
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly: Remove the VCS exclusion filters
- Known bad symptoms: None expected
## Risks and Mitigations
None — removing VCS metadata is always safe for distribution archives.
Most Similar PRs
#23183: fix(skill-creator): exclude .git and VCS internals from .skill arch...
by aldoeliacim · 2026-02-22
84.7%
#12076: fix(skills): recursive directory filtering to actually exclude venv...
by xiaoyaner0201 · 2026-02-08
69.9%
#20796: fix(security): OC-22 prevent Zip Slip and symlink following in skil...
by aether-ai-agent · 2026-02-19
69.2%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew · 2026-02-03
68.7%
#8150: fix(skills): block dangerous environment variables from skill config
by yubrew · 2026-02-03
67.6%
#10016: fix: prevent FD exhaustion from skill watcher scanning artifact trees
by oldeucryptoboi · 2026-02-06
67.3%
#23413: Skills: gate remote eligibility expansion behind explicit opt-in
by bmendonca3 · 2026-02-22
66.7%
#6777: fix(skills): ignore Python venvs and caches in skills watcher
by kirkluokun · 2026-02-02
66.2%
#19664: fix(skills): log skill YAML parsing diagnostics with skill name
by orchidsun · 2026-02-18
66.0%
#22198: fix(skills): treat empty allowBundled array as block-all
by haitao-sjsu · 2026-02-20
65.5%