agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/gitignore/SKILL.md

gitignore

Skill2 starsChanged 4 months agoMITView on GitHub

Generate or tighten a .gitignore for the project's stack, and flag already-tracked files that should be ignored. Use when the user says "create a gitignore", "update my gitignore", "what should I ignore", "stop tracking this file", or "add X to gitignore".

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Merge, don't clobber: If a .gitignore exists, add only the missing entries and keep the user's existing ones and grouping.

    line 25
  2. Very specific:

    Don't ignore lockfiles (package-lock.json, poetry.lock, Cargo.lock) for applications — they should be committed.

    line 30
  3. Very specific:

    Keep entries specific — avoid overly broad globs (*.json) that would hide real source/config.

    line 31
  4. Very specific:

    Don't add committed, project-shared editor config to the ignore list (e.g.

    line 32
  5. Distinctive:

    After writing, summarize what you added and list any untrack commands the user still needs to run.

    line 33

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Stack + current state

!ls package.json pyproject.toml requirements.txt Cargo.toml go.mod pom.xml build.gradle Gemfile composer.json 2>/dev/null

!cat .gitignore 2>/dev/null | head -60 || echo "No .gitignore yet"

!git ls-files 2>/dev/null | grep -iE '\.env$|\.log$|node_modules/|/dist/|/build/|\.DS_Store|__pycache__|\.pyc$|/target/|coverage/' | head -20 | sed 's/^/TRACKED-BUT-SHOULD-IGNORE: /'

Instructions

Generate or improve the .gitignore for this project (add anything from $ARGUMENTS too).

Method

  1. Detect the stack(s) from the manifests above — language, package manager, framework, and build tooling. A repo can need several sections (e.g. Node + Python).
  2. Cover the standard categories for each detected stack: dependency dirs (node_modules/, vendor/), build output (dist/, build/, target/), caches (__pycache__/, .pytest_cache/, .gradle/), logs, coverage reports, env/secret files (.env, .env.local), editor/OS cruft (.DS_Store, .idea/, .vscode/ — only if not project-shared), and lockfile/temp artifacts.
  3. Merge, don't clobber. If a .gitignore exists, add only the missing entries and keep the user's existing ones and grouping. Group new entries under clear comment headers.
  4. Flag already-tracked files. For any path in the TRACKED-BUT-SHOULD-IGNORE list above, adding it to .gitignore is not enough — git keeps tracking it. Tell the user and give the exact untrack command: git rm --cached <path> (or -r for a directory), noting it stays on disk.

Rules

  1. Don't ignore lockfiles (package-lock.json, poetry.lock, Cargo.lock) for applications — they should be committed. Do ignore them only for libraries if that's the project's convention; ask if unsure.
  2. Keep entries specific — avoid overly broad globs (*.json) that would hide real source/config.
  3. Don't add committed, project-shared editor config to the ignore list (e.g. a checked-in .vscode/settings.json).
  4. After writing, summarize what you added and list any untrack commands the user still needs to run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.