agentleFS
manu-kaushikmanu-kaushik/agent-kit/skills/ignore/SKILL.md

ignore

Skill0 starsChanged 21 days agoMITView on GitHub

Write managed ignore rules for Cursor, Claude Code, Codex, Windsurf, Cline, Gemini, and Antigravity. Use for /ignore. Keeps env example files visible and does not edit .gitignore.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. vale-cli/agent-tools★ 10same name
    2. discountry/ritmex-skills★ 4same name
    3. hidumou/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 2 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    Do not scan node_modules/, vendor/, dist/, build/, or .git/.

    line 60
  2. Very specific:

    Use the shared candidates, then the skip rules.

    line 64
  3. Very specific:

    If the JSON is missing, create { "permissions": { "deny": [] } }.

    line 84
  4. Very specific:

    Keep every existing key. In permissions.deny, remove only rules that exactly match a rule this skill manages, then add the current set.

    line 86
  5. Distinctive:

    If either sandbox key is present, write nothing and report that.

    line 111
  6. Very specific:

    If default_permissions is :danger-full-access, write nothing and report that.

    line 112
  7. Very specific:

    If default_permissions is another custom profile name, add the deny table to that profile.

    line 113
  8. Very specific:

    If default_permissions is missing, :workspace, or :read-only, write a profile named ignore-managed that extends that built-in (:workspace …

    line 114
  9. Very specific:

    Add only this table, replacing a previous # codex: ignore-managed block when one exists.

    line 116
  10. Very specific:

    Put stack directories in that same block as "/<dir>/" = "deny" when they survived the skip rules.

    line 133
  11. Distinctive:

    When creating the profile, use this shape and nothing else:

    line 135
  12. Very specific:

    Do not claim a terminal, MCP server, or unrecognized shell command is blocked.

    line 150

“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

Ignore

/ignore writes the same secrets and stack folders for each tool that has a real ignore mechanism. It does not edit .gitignore. It does not run from /source init.

Amp has no ignore file. Do not invent one. Report that Amp was skipped.

Shared candidates

Detect the stack from manifests at the repo root or one directory down. A pattern the stack does not justify is not a candidate. List each pattern once.

EvidencePatterns
package.jsonnode_modules/, .next/, .nuxt/, dist/, build/, coverage/, .turbo/
pyproject.toml, requirements.txt, or Pipfile.venv/, venv/, __pycache__/
composer.jsonvendor/
Cargo.tomltarget/
pom.xml, build.gradle, or build.gradle.ktstarget/
pubspec.yaml.dart_tool/, build/
Podfile at the root or ios/PodfilePods/
*.csproj, *.fsproj, *.vbproj, or *.slnbin/, obj/

Secrets, for every tool that can express them:

*.pem
*.key
id_rsa
credentials.json
secrets.json

Env files, for every tool except Cursor:

.env
.env.*
!**/.env.example
!**/.env.sample
!**/.env.template

The ! lines must come after .env and .env.*. Do not drop them because .gitignore already ignores .env*. Drop one only when that exact line already exists outside the managed block.

Cursor already ignores .env* by default. In .cursorignore only, omit .env and .env.*, and still write the three ! lines so example files stay visible.

Skip rules

Drop a candidate, and record the reason, when:

  • The tool's own file already has that pattern outside the managed block. A trailing slash does not make it different.
  • .gitignore already has that pattern. This does not apply to the three ! env-example lines.
  • The file is .cursorignore and the pattern is on Cursor's default list: node_modules/, .next/, .nuxt/, .venv/, venv/, __pycache__/, .cache/, .gradle/, lockfiles, or .env*.

Do not scan node_modules/, vendor/, dist/, build/, or .git/.

Gitignore-style files

Use the shared candidates, then the skip rules. Write one pattern per line, no blank lines inside the block. Order: .env, .env.* (when this file gets them), the three ! lines, secrets, then stack directories.

FileToolMarkers
.cursorignoreCursor# cursor: ignore-managed … # /cursor: ignore-managed
.codeiumignoreWindsurf# windsurf: ignore-managed … # /windsurf: ignore-managed
.clineignoreCline# cline: ignore-managed … # /cline: ignore-managed
.geminiignoreGemini CLI# gemini: ignore-managed … # /gemini: ignore-managed
.antigravityignoreAntigravity# antigravity: ignore-managed … # /antigravity: ignore-managed

Replace the marked block. Leave every line outside it. Append the block if the markers are missing. Create the file if it is missing.

.aiexclude (Gemini Code Assist and Android Studio) cannot un-ignore with !. Do not write .env.* or any ! line into it. Write .env, .env.local, .env.development, .env.production, .env.test, and .env.staging, plus the secrets and stack directories. Markers: # aiexclude: ignore-managed and # /aiexclude: ignore-managed. Never create an empty .aiexclude. An empty one excludes the whole tree.

Cline's file is deprecated and is not a security boundary. Still write it, and say that in the summary.

Claude Code

File: .claude/settings.json. A .claudeignore file does nothing. Do not create one.

If the JSON is missing, create { "permissions": { "deny": [] } }. If the file exists and is not valid JSON, or if it contains comments, stop for this file and report that. Do not rewrite it.

Keep every existing key. In permissions.deny, remove only rules that exactly match a rule this skill manages, then add the current set. Leave every other deny, ask, and allow rule.

Managed rules, in this order. Deny rules first, then the ! carve-outs. A ! rule only carves out an earlier deny in this same file.

Read(.env)
Read(.env.*)
Read(!.env.example)
Read(!.env.sample)
Read(!.env.template)
Read(*.pem)
Read(*.key)
Read(id_rsa)
Read(credentials.json)
Read(secrets.json)

Then one Read(<dir>/**) for each stack directory that survived the skip rules, such as Read(node_modules/**) or Read(vendor/**).

These rules cover Claude's file tools and shell commands it recognizes, such as cat. They do not cover a search that never names the file, or a script that opens the file itself.

Codex

File: .codex/config.toml. Permission profiles are beta and do not apply while sandbox_mode or sandbox_workspace_write is set.

  • If either sandbox key is present, write nothing and report that.
  • If default_permissions is :danger-full-access, write nothing and report that.
  • If default_permissions is another custom profile name, add the deny table to that profile. Do not change default_permissions.
  • If default_permissions is missing, :workspace, or :read-only, write a profile named ignore-managed that extends that built-in (:workspace when the key is missing) and set default_permissions = "ignore-managed". Report that this selects the profile.

Add only this table, replacing a previous # codex: ignore-managed block when one exists. Do not change network, features, or other filesystem keys.

# codex: ignore-managed
"**/.env" = "deny"
"**/.env.*" = "deny"
"**/.env.example" = "read"
"**/.env.sample" = "read"
"**/.env.template" = "read"
"**/*.pem" = "deny"
"**/*.key" = "deny"
"**/id_rsa" = "deny"
"**/credentials.json" = "deny"
"**/secrets.json" = "deny"
# /codex: ignore-managed

Put stack directories in that same block as "**/<dir>/**" = "deny" when they survived the skip rules. The example paths are read so they stay available. A broader deny does not cover a more specific path.

When creating the profile, use this shape and nothing else:

default_permissions = "ignore-managed"

[permissions.ignore-managed]
extends = ":workspace"

[permissions.ignore-managed.filesystem.":workspace_roots"]

Summary

For each file, report Added, Skipped (with the reason), and Left in place. Name Amp, and any Codex case that wrote nothing, under Skipped.

Do not claim a terminal, MCP server, or unrecognized shell command is blocked. .gitignore is not edited.

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.