gitignorelisted
Install: claude install-skill KhaledSaeed18/dotclaude
Produce a `.gitignore` that fits *this* repo (driven by the stacks actually present, not a generic blob) and fix the common failure where a pattern is added but the file is already tracked, so Git keeps it anyway.
## Hard rules: never break these
- **Never ignore source.** Ignore dependencies, build output, caches, logs, secrets, and local cruft, never the code or config the project needs to build.
- **Adding a pattern does not untrack a tracked file.** `.gitignore` only affects *untracked* files. Already-committed files need `git rm --cached` (Step 5) to stop being tracked.
- **Preserve existing intent.** Don't wipe a hand-tuned `.gitignore`; merge, dedupe, and organize. Keep custom and negation (`!`) rules unless they're clearly wrong.
- **Treat tracked secrets as an incident.** A committed `.env`, key, or credential is already in history; adding it to `.gitignore` and `rm --cached` stops *future* tracking but does **not** remove it from past commits. Flag it loudly and point to history-rewrite tooling (`git filter-repo`, BFG) and secret rotation.
- **Confirm before `git rm --cached`.** It changes what's tracked and lands in the next commit.
## Step 1: Detect the stacks
Scan the repo for what's actually in use rather than guessing:
- **Manifests → ecosystem:** `package.json` (Node), `Cargo.toml` (Rust), `pyproject.toml`/`requirements.txt`/`Pipfile` (Python), `go.mod` (Go), `pom.xml`/`build.gradle` (Java/Kotlin), `Gemfile` (Ruby), `composer.json` (PHP), `*.csproj`/`*.sl