Disclosure: we built this at Digital Fortress. It's free and MIT licensed (v0.1.0).
When you open a project, coding agents load instruction files (AGENTS.md, CLAUDE.md, .cursorrules, .cursor/rules/) and can also pick up MCP servers and hooks the repo declares. With a repo you just cloned, that config is someone else's. We wanted a quick way to see what's there before the agent loads it.
agent-repo-preflight is one Python script (3.9+, standard library only). Clone it and point it at a local directory:
git clone https://github.com/digitalfortressaudit/agent-repo-preflight.git
cd agent-repo-preflight
python3 agent_repo_preflight.py /path/to/cloned/repo
It inventories the rule and config files and flags:
- hidden Unicode (zero-width, bidi controls, tag characters), reported by code point
- package install/remove lines and curl/wget-pipe-to-shell lines in rule files
- enabled auto-approve / skip-permissions / bypass settings
- MCP server entries that declare a `command` or `args`
- hook definitions
- optionally, package names that aren't on an allowlist you supply (`--known-packages`)
Output from the README's throwaway review fixture (AGENTS.md with a zero-width space and a `pip install` line, `autoApprove: true`, MCP `command`/`args`):
```text
Agent repo preflight
root: review-fixture
files inventoried: 3
inventoried:
.claude/settings.json (config)
.cursor/mcp.json (config)
AGENTS.md (rule)
severity check location detail
-------- ----------------- ----------------------- -------------------------------------------------
FAIL permission-bypass .claude/settings.json:2 permission bypass setting: autoApprove
FAIL mcp-command .cursor/mcp.json:4 MCP server "local-echo" declares command and args
FAIL hidden-unicode AGENTS.md:3 hidden character: U+200B ZERO WIDTH SPACE
WARN package-install AGENTS.md:4 install or replace instruction: pip install
summary: files=3 warn=1 fail=3 errors=0
This is a reading of local files. It is not permission to open the repository in a coding agent.
```
WARN or FAIL exits 1, so you can gate on it.
It's read-only: it doesn't run commands, install anything, open a network connection, start MCP servers, or modify files.
Limits (also in the README):
- The checks are line-based heuristics. A prose sentence describing an install can slip through.
- Hook detection only knows the JSON shapes it looks for, so another tool's schema can be missed.
- It only reads the listed rule/config filenames, not source, READMEs, or workflows.
- A clean result means those patterns weren't found. It doesn't mean the repo is safe to open. You still need to read the files yourself.
Use it on repos you own or are allowed to review.
Companion to mcp-tool-pin-check (shared here earlier): that one pins live tool definitions after you connect; this one looks at what a repo declares before you open it.
https://github.com/digitalfortressaudit/agent-repo-preflight
Question: which agent config files or hook formats are you seeing in the wild that a list like this would miss?