agentleFS
arniesahaarniesaha/ctxops/skills/ctx-ignore/SKILL.md

ctx-ignore

Skill0 starsChanged 5 months agoMITView on GitHub

WHEN an agent keeps reading noise (node_modules, lockfiles, build output, generated code, fixtures) or a repo needs ignore files for AI tools. Triggers: 'generate a claudeignore', 'keep the agent out of X', 'my agent wastes context on generated files', 'set up ignore files', new repo onboarding. OUTPUT: a ranked noise report, an annotated .contextignore as source of truth, and tool-specific ignore files (.claudeignore, .cursorignore, .copilotignore, .windsurfignore). PAIR BEFORE: ctx-pack (exclude noise before assembling context). NOT FOR: choosing what to load for one task (use ctx-pack), .gitignore hygiene alone.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Write .contextignore as the annotated source of truth (grouped, commented, dated header), then derive the tool-specific files the user …

    line 16
  2. Distinctive:

    If existing ignore files are present, merge additions under a marked section.

    line 17
  3. Distinctive:

    Never exclude source, docs, or config that shapes runtime behavior, even when large.

    line 28
  4. Distinctive:

    When unsure whether a directory is generated, check for a generator config or header comment before excluding it.

    line 30
  5. Distinctive:

    Keep entries as directory or glob patterns, not hundreds of individual files.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

ctx-ignore

Decide what an agent should never read, once, instead of paying for the noise on every request. The other half of context assembly is context exclusion.

Workflow

  1. Walk the repo tree, respecting .gitignore. Note file sizes.
  2. Categorize noise candidates against patterns.md in this skill's directory (dependencies, lockfiles, build output, generated code, binaries, test artifacts, IDE/OS noise). Red entries always exclude; yellow entries (test files, migrations) need user confirmation.
  3. Score each remaining candidate by context cost versus usefulness: large and mechanically produced ranks highest.
  4. Show a ranked report with a one-line reason per entry. Get confirmation before writing anything.
  5. Write .contextignore as the annotated source of truth (grouped, commented, dated header), then derive the tool-specific files the user wants: .claudeignore, .cursorignore, .copilotignore, .windsurfignore.
  6. If existing ignore files are present, merge additions under a marked section. Never clobber hand-written entries.

Output Shape

  • Ranked noise report: path, size, category, one-line reason
  • .contextignore (source of truth)
  • Tool-specific ignore files derived from it
  • Skipped-on-purpose list: things that looked like noise but stay readable, with reasons

Rules

  • Never exclude source, docs, or config that shapes runtime behavior, even when large.
  • Lockfiles are noise for reading but load-bearing for reproducibility: exclude from agent context, never delete.
  • When unsure whether a directory is generated, check for a generator config or header comment before excluding it.
  • Report first, write second. No silent writes: wait for the user's explicit go-ahead on the report before writing any file, even when the change looks obviously right or you are fixing drift from a previous run.
  • Keep entries as directory or glob patterns, not hundreds of individual files.

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.