Community-maintained rules for OpenAgentLock — the local-first firewall for AI coding agents.
A "rule" is a single policy gate (e.g. block rm -rf, deny secret exfiltration via curl). Each rule lives in its own directory under rules/, contains a rule.yaml and a README.md, and ships independently. The browsable site at https://openagentlock.github.io/rules indexes every rule and gives you a one-line install command.
Pair this repo with openagentlock/skills
Need a rule that isn't in the catalog yet? The skills repo ships agent skills (Claude Code, Cursor, Codex) that turn natural-language intent into a policy gate. Tell the agent "block any bash command that pipes a file into nc", and the block-pattern skill drafts the YAML, runs agentlock rules install, and reports the deny verdict back. Once a rule has earned its keep, open a PR here to upstream it.
rules/<rule-id>/
├── rule.yaml # the gate definition
├── README.md # what it catches, why it matters, false-positive notes
└── tests/ # (optional) synthetic tool-call fixtures
The site (under site/) is plain HTML/CSS/JS that fetches site/data/index.json — a flat index generated by tools/build-index.ts on every CI run. No backend, no database. The repo is the database.
- Fork this repo.
- Copy
rules/destructive-bash/as a starting template. - Edit
rule.yamlandREADME.md. - Open a PR. CI validates the YAML against
schema/rule.schema.json.
See docs/adding-a-rule.md for the full walkthrough.
From the rules site, search for what you want and copy the install command, e.g.:
agentlock rules install openagentlock/rules:destructive-bashThe CLI command is roadmap — see openagentlock/OpenAgentLock#42 for the in-flight signer work that backs agentlock rules.
You aren't locked into this repo. Any git URL with the same layout works:
agentlock rules add https://github.com/your-org/your-rules.git
agentlock rules syncMultiple registries are merged at sync time; rule ids must be unique within a single registry but are namespaced by registry url upstream.
Apache-2.0 — see LICENSE. Individual rules may declare a different license in rule.yaml's license field; the default is Apache-2.0 to match the registry.