gitignore

A helper that creates or repairs a repository's `.gitignore`, the file listing files Git should not track. It combines required project entries with optional templates for languages and development tools.

In plain words
What is it for?
Use it when `.gitignore` is missing or incomplete, especially after a guard reports files that should be ignored.
Why use it?
It reduces the chance of committing secrets, temporary state, or local tool files, while preserving existing ignore rules.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/friedbotstudio/baseline/gitignore
Any agent
npx skills add friedbotstudio/baseline --skill gitignore
Clone the repo
git clone --depth 1 https://github.com/friedbotstudio/baseline

Made for: Claude Code, Codex.

Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00105 $0.00728
Opus 5 $0.00053 $0.00364
Sonnet 5 $0.00021 $0.00146
Haiku 4.5 $0.00011 $0.00073

Measured 2d ago against content hash 548ba6e1ec1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitignore scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/gitignore/SKILL.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gitignore — generate and repair .gitignore

This skill produces a correct .gitignore for the current project. It runs in main context (Article II). It never blocks a commit — enforcement is the gitignore_leak_guard hook's job; this skill repairs what the guard flags.

Source of truth

The canonical baseline must-ignore set lives at .claude/skills/gitignore/baseline-ignores.json (entries spanning secret, state, and tooling categories). Consumer-specific additions live in project.json → gitignore.extra_must_ignore. The same set is read by the install/init merge and by the gitignore_leak_guard hook, so the three never drift.

Steps

  1. Read the baseline set from baseline-ignores.json and the consumer extras from project.json → gitignore.extra_must_ignore. These are mandatory — they MUST end up in the final .gitignore.
  2. Optional enrichment via gitignore.io (network). When the user names stacks (or you infer them from the repo), fetch language/IDE coverage from the gitignore.io service hosted at Toptal:
    • List available types: GET https://www.toptal.com/developers/gitignore/api/list
    • Generate for a comma-separated list: GET https://www.toptal.com/developers/gitignore/api/<type1,type2,...> (e.g. node,macos,visualstudiocode) → plain-text .gitignore body. Use WebFetch. This is enrichment only.
  3. Offline fallback. If the network is unreachable or the service errors, skip enrichment and write the baseline set only, then tell the user the enrichment was skipped (offline fallback). The baseline correctness never depends on the network — the fallback path is the safety net, not an error.
  4. Merge add-only. If a .gitignore already exists, never overwrite or reorder it. Append only the lines (baseline + enrichment) that are not already present, preserving the existing content byte-for-byte. If none exists, create it from the baseline (+ enrichment).
  5. Confirm. Report which sources contributed (baseline always; gitignore.io types if reached; consumer extras) and whether the offline fallback was used.

Read the full file on GitHub · 33 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 33 lines · 0 tokens per session scan A 548ba6e1ec1b

Subscribe to this mod's changes

gitignore is a skill published in the GitHub repository friedbotstudio/baseline (11 stars, last pushed 6d ago), licensed Apache-2.0. It adds 105 tokens to every session and 728 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.