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
- vale-cli/agent-toolstheir own version, first seen Nov 29, 2026
- discountry/ritmex-skillstheir own version, first seen Nov 29, 2026
- hidumou/skillstheir own version, first seen Mar 24, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- vale-cli/agent-tools★ 10same name
- discountry/ritmex-skills★ 4same name
- 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.
- AGENTS.mdAGENTS.md
- skills/source/templates/AGENTS.mdAGENTS.md
- skills/source/templates/CLAUDE.mdCLAUDE.md
- sourceSkill
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
- Very specific: line 60
Do not scan node_modules/, vendor/, dist/, build/, or .git/.
- Very specific: line 64
Use the shared candidates, then the skip rules.
- Very specific: line 84
If the JSON is missing, create { "permissions": { "deny": [] } }.
- Very specific: line 86
Keep every existing key. In permissions.deny, remove only rules that exactly match a rule this skill manages, then add the current set.
- Distinctive: line 111
If either sandbox key is present, write nothing and report that.
- Very specific: line 112
If default_permissions is :danger-full-access, write nothing and report that.
- Very specific: line 113
If default_permissions is another custom profile name, add the deny table to that profile.
- Very specific: line 114
If default_permissions is missing, :workspace, or :read-only, write a profile named ignore-managed that extends that built-in (:workspace …
- Very specific: line 116
Add only this table, replacing a previous # codex: ignore-managed block when one exists.
- Very specific: line 133
Put stack directories in that same block as "/<dir>/" = "deny" when they survived the skip rules.
- Distinctive: line 135
When creating the profile, use this shape and nothing else:
- Very specific: line 150
Do not claim a terminal, MCP server, or unrecognized shell command is blocked.
“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.
Files
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.
| Evidence | Patterns |
package.json | node_modules/, .next/, .nuxt/, dist/, build/, coverage/, .turbo/ |
pyproject.toml, requirements.txt, or Pipfile | .venv/, venv/, __pycache__/ |
composer.json | vendor/ |
Cargo.toml | target/ |
pom.xml, build.gradle, or build.gradle.kts | target/ |
pubspec.yaml | .dart_tool/, build/ |
Podfile at the root or ios/Podfile | Pods/ |
*.csproj, *.fsproj, *.vbproj, or *.sln | bin/, obj/ |
Secrets, for every tool that can express them:
*.pem
*.key
id_rsa
credentials.json
secrets.jsonEnv files, for every tool except Cursor:
.env
.env.*
!**/.env.example
!**/.env.sample
!**/.env.templateThe ! 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.
.gitignorealready has that pattern. This does not apply to the three!env-example lines.- The file is
.cursorignoreand 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.
| File | Tool | Markers |
.cursorignore | Cursor | # cursor: ignore-managed … # /cursor: ignore-managed |
.codeiumignore | Windsurf | # windsurf: ignore-managed … # /windsurf: ignore-managed |
.clineignore | Cline | # cline: ignore-managed … # /cline: ignore-managed |
.geminiignore | Gemini CLI | # gemini: ignore-managed … # /gemini: ignore-managed |
.antigravityignore | Antigravity | # 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_permissionsis:danger-full-access, write nothing and report that. - If
default_permissionsis another custom profile name, add the deny table to that profile. Do not changedefault_permissions. - If
default_permissionsis missing,:workspace, or:read-only, write a profile namedignore-managedthat extends that built-in (:workspacewhen the key is missing) and setdefault_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-managedPut 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.
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
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.

