gitignore-sync

Writes and verifies the repo's ignore file with plugin-managed entries on Git or TFVC.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/vickysrawat/AI-Assisted-development --skill gitignore-sync-vickysrawat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gitignore-sync
Source: https://github.com/vickysrawat/AI-Assisted-development/tree/main/skills/gitignore-sync
Command: npx skills add https://github.com/vickysrawat/AI-Assisted-development --skill gitignore-sync-vickysrawat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories often lack a correct ignore file, letting generated artifacts, security scan outputs, and credential files get committed. On TFVC repos a .gitignore is silently inert, so protection fails without any visible error. ## Core Features & Use Cases - VCS-aware ignore file generation: Detects Git vs TFVC first, then writes .gitignore or .tfignore with the correct syntax for each system. - Managed block updates: Writes plugin-required entries inside a managed block that can be safely re-run, never removing or reordering the developer's own lines. - TFVC credential protection: Detects when .claude/settings.local.json is already tracked by TFVC and instructs the developer to untrack it, since an ignore entry alone cannot protect it. - Optional artifact detection: With --with-artifacts, scans for build outputs (bin/, obj/, dist/, __pycache__) and env files, adding only explicitly selected entries. - Use Case: After installing the plugin into an existing TFVC-controlled .NET solution, run the sync to create a .tfignore that blocks generated security and review output directories, then verify every entry landed on disk. ## Quick Start Run the gitignore-sync command to detect my version control system and write the required ignore entries into the correct ignore file, then verify the result.

Frequently Asked Questions about gitignore-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add entries to .gitignore without losing my existing rules?▼

The sync writes plugin entries inside a managed block delimited by begin and end markers, leaving all other lines untouched. Re-running only replaces the managed block, and matching is whole-line exact so your own entries are never removed or reordered.

How do I ignore files in TFVC instead of Git?▼

TFVC uses a `.tfignore` file with backslash path separators and no trailing slashes on directories. The sync detects TFVC via the `tf` command or `$tf`/`.tf` markers and writes entries in the correct TFVC syntax automatically.

Why is my .gitignore not working on a TFS repository?▼

TFVC completely ignores `.gitignore`, so writing one provides zero protection and generated files can still be checked in. You must write a `.tfignore` file instead, which is why the sync detects the version control system before writing anything.

Does .tfignore protect a file already checked into TFVC?▼

No, `.tfignore` only blocks new adds. If `.claude/settings.local.json` is already tracked, you must run `tf vc delete --keep-local` on it and check in the deletion, ideally moving secrets to a user environment variable.

Can I automatically ignore build artifacts like bin and obj folders?▼

Yes, pass `--with-artifacts` to scan for common build outputs such as `bin/`, `obj/`, `dist/`, `coverage/`, and `__pycache__`. Detected candidates are consolidated into minimal patterns and only added after you explicitly select them.

Will the sync ever add .env files to my ignore file?▼

Only with explicit developer selection during the `--with-artifacts` flow. Environment files are never added automatically because accidentally ignoring or exposing them has security implications that require a deliberate choice.