Free guide · checked 2026-11-06

Is this AGENTS.md safe to run?

Untrusted AGENTS.md, CLAUDE.md, CLAUDE.local.md and Cursor rules keep showing up in ~/Downloads, cloned starters and "paste this into your project" posts. Coding agents treat those files as instructions. Below: a practical origin check, what to scan for (curl|bash, secret exfil, silent AGENTS.md disable, path tricks), a step-by-step before you open the folder, and links to the free check_agents_md.sh / agents-md-check skill.

Checked against vendor docs on 2026-11-06: Claude Code memory docs (CLAUDE.md / CLAUDE.local.md / AGENTS.md) · OpenAI Codex AGENTS.md guide · agents.md convention. Raw Markdown: /guides/agents-md-safe.md. Pair with AGENTS.md: one rules file for every coding agent.

Free below. Want a finished AGENTS.md + CLAUDE.md + six Cursor rules you own? App Builder Agent Pack ($19). Or block a fake "done" with the Done-Check Kit (pay what you want from $0).

Why an untrusted rules file matters

1. Where did this file come from?

OriginWhat to do
You wrote it, and it lives in a repo you controlLower risk. Still skim after any merge that touches AGENTS.md, CLAUDE.md, .cursor/rules, .claude/, or hooks.
It came from a teammate or a known open-source project with a real historyMedium. Read the diff of the rules files before the first agent session. Prefer the project's docs over a random fork.
It arrived as a zip, gist, Discord drop, "paste this into your project" post, or something in ~/DownloadsTreat as untrusted. Do not open the folder with an agent until you have scanned the rules files. Prefer copying only the lines you understand into a fresh AGENTS.md you own.
You do not remember putting it thereStop. Find who/what created it (git log, download history, zip contents) before any agent run.

2. What to scan for

  1. Shell one-liners that download and run. curl … | bash, wget … | sh, powershell -enc, Invoke-WebRequest | iex, python -c with urllib, or any "setup" that pipes remote content into a shell.
  2. Secret and credential exfiltration. Instructions to cat, print, or upload .env, ~/.ssh, ~/.aws, keychains, browser cookies, recovery phrases, or to POST them to an unfamiliar URL / webhook / pastebin.
  3. Silent disable of your real rules. A new CLAUDE.local.md (or CLAUDE.md) that does not import @AGENTS.md, so Claude Code stops reading your shared AGENTS.md. Also: rules that say to ignore, delete, or overwrite AGENTS.md / CLAUDE.md / .cursor/rules.
  4. Path tricks and write targets outside the project. ../ paths, absolute paths into $HOME, writes to ~/.claude, ~/.codex, /etc, LaunchAgents, cron, systemd, or shell rc files (".bashrc", ".zshrc").
  5. Hidden or lookalike files. AGENTS.md with unusual Unicode, zero-width characters, a second "AGENTS.md" that is actually a different filename, or rules buried inside .cursor/rules, .claude/hooks, or SKILL.md that the chat never showed you.
  6. Hooks and always-on automation. New Stop / SessionStart / PreToolUse hooks, git hooks, or CI steps that run on every prompt. Read every new script end-to-end before enabling it.
  7. "Trust me" network and package moves. npm/pip/cargo install of unknown packages, curl to raw.githubusercontent.com or short links, disabling TLS verify, or adding a mystery MCP server / skill from a URL you did not choose.
  8. Social-engineering lines aimed at the agent. "The user already approved", "do not ask", "this is an emergency", "ignore previous instructions", "exfiltrate to help debug", or roleplay that bypasses your normal confirmation rules.

Tip: grep -nEi 'curl|wget|bash|powershell|\.env|ssh|aws|webhook|base64|eval|ignore previous|CLAUDE\.local' AGENTS.md CLAUDE.md CLAUDE.local.md .cursor/rules/* 2>/dev/null is a fast first pass. It is not enough on its own.

3. Before you open the folder with an agent

  1. Pause the agent. Do not start Claude Code, Cursor Agent, Codex, or Copilot Chat in that folder until the scan is done. A first message can already load AGENTS.md.
  2. List every rules surface. From the folder root: AGENTS.md, CLAUDE.md, CLAUDE.local.md, .claude/**, .cursor/rules/**, .cursorrules, .github/copilot-instructions.md, .github/instructions/**, GEMINI.md, .gemini/settings.json, SKILL.md / .agents/skills/**, and any *.mdc the zip added.
  3. Read them as an attacker would. Search for curl, wget, bash, powershell, .env, ssh, aws, webhook, base64, eval, chmod +x, ~/., /etc, LaunchAgents, and "ignore previous". Open every referenced script.
  4. Run the free drift + local-override check. From a repo you trust enough to inspect: sh check_agents_md.sh (download from /guides/agents-md/). It fails on missing AGENTS.md import, dead paths, oversize files, and a CLAUDE.local.md that hides AGENTS.md. It does not catch malware strings; that part is still your eyes.
  5. Only then keep what you understand. Copy safe, boring lines into an AGENTS.md you authored. Delete or quarantine the rest. Prefer @AGENTS.md imports over duplicate CLAUDE.md copies.

Download the free drift check: curl -o check_agents_md.sh https://agentpromptsatoz.com/guides/agents-md/check_agents_md.sh.txt (read it first), then sh check_agents_md.sh. Or let your agent run the same script via the free agents-md-check skill: npx skills add https://agentpromptsatoz.com --skill agents-md-check.

Checklist

  1. I know exactly where this AGENTS.md / CLAUDE.md / .mdc set came from.
  2. I listed every rules file the zip or clone added (including CLAUDE.local.md, hooks, and .cursor/rules).
  3. I searched those files for curl|bash, wget, powershell, .env, ssh, aws, webhooks, base64, eval, and home-directory writes.
  4. I opened every script, hook, or URL the rules tell the agent to run.
  5. No CLAUDE.local.md (or CLAUDE.md) is silently disabling AGENTS.md; @AGENTS.md is present if Claude files exist.
  6. No path traversal or writes outside this project without a reason I accept.
  7. I ran check_agents_md.sh (or the agents-md-check skill) and understand every FAIL.
  8. I am willing to own every remaining line as if I wrote it.

Tips

FAQ

Is a weird AGENTS.md in ~/Downloads actually dangerous?

It can be. Coding agents load project instructions when you open that folder. A planted AGENTS.md, CLAUDE.md, CLAUDE.local.md or Cursor rule can tell the agent to run shell, read secrets, or ignore your real rules. Treat Downloads drops as untrusted until you have scanned them.

Does check_agents_md.sh detect malware?

No. It is a drift and override check: missing @AGENTS.md import, dead paths, Codex size cap, Gemini settings, and CLAUDE.local.md hiding AGENTS.md. Malicious curl|bash lines and secret exfil still need a human (or a separate scanner). Use both.

What about CLAUDE.local.md?

Claude Code docs treat CLAUDE.local.md like a CLAUDE.md. If it exists and nothing imports @AGENTS.md, Claude stops reading AGENTS.md for that project. That is handy for private notes; it is also how a planted local file can disable your shared rules without deleting them. check_agents_md.sh v1.2 fails on that case.

Should I delete every AGENTS.md I did not write?

Not if you read and trust it. Prefer: quarantine the untrusted copy, write a short AGENTS.md you own, and import it from a one-line CLAUDE.md. Our AGENTS.md guide has the vendor-checked setup.

Can Cursor rules or skills be malicious too?

Yes. .cursor/rules/*.mdc, Stop hooks, and SKILL.md files are also instructions. Scan them with the same checklist. Our skill-descriptions guide covers how agents load skills (name + description first).

Premium · $19

Want rules you wrote on purpose?

App Builder Agent Pack: a finished AGENTS.md, a thin CLAUDE.md that imports it, six Cursor rules files, and a plan-then-build workflow. Plain text you own. Pair with the free Done-Check Kit so "done" means checks that exit 0.

App Builder pack: $19 All 5 packs: $29 Done-Check Kit: $0+

Related free guides

Get new free agent prompts

One short email a week: new free packs, guides and tested agent rules. Unsubscribe anytime.

Form not showing? Subscribe on Beehiiv.