secure-stack
AGENTS.md2 starsChanged 33 days agoApache-2.0View on GitHub
Working instructions for an AI agent operating in this repository. (This is the agents.md entry point. If you are an agent being used by someone else and your runtime can't load SKILL.md skills, read agents/SKILLS.md instead — that's the generated bundle of the skill instructions.) The source for tools AI coding agents use to secure a stack end to end — the code they write and the systems you run — powered by xgrep (code) and cnspec (posture & policy).…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- author-detectionsSkill
- fix-findingsSkill
- secure-ai-servicesSkill
- secure-cloudSkill
- secure-codingSkill
- secure-osSkill
- secure-pipelineSkill
- secure-saasSkill
- triage-findingsSkill
- understand-codeSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 1 is common, 0 are distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 30
No compile step. Node (for the mod/adapters) and npx tsx (for the scripts) are the only tooling.
- Very specific: line 49
Always run ./scripts/publish.sh --check before opening a PR — it is the CI gate.
- Common: line 71
Don't commit secrets or real credentials, and don't add a scanner invocation that sends code off the machine.
- Very specific: line 80
Keep a PR to one feature. Run the tests and ./scripts/publish.sh --check first, and state in the description what you verified.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Working instructions for an AI agent operating in this repository. (This is the
agents.md entry point. If you are an agent being used by someone
else and your runtime can't load SKILL.md skills, read agents/SKILLS.md
instead — that's the generated bundle of the skill instructions.)
What this repo is
The source for tools AI coding agents use to secure a stack end to end — the code they write and the systems you run — powered by xgrep (code) and cnspec (posture & policy). Three layers:
skills/— loadable Agent Skills, outcome-named, in two families:- secure development (code lifecycle):
understand-code→secure-coding→secure-pipeline→triage-findings→fix-findings, plusauthor-detections. - secure posture (what you run):
secure-os,secure-cloud,secure-saas,secure-ai-services— thin wrappers that invoke cnspec.
- secure development (code lifecycle):
mods/secure-guard/+integrations/— a runtime guard that scans an agent's tool calls with xgrep (code/secrets/dangerous commands) and cnspec (IaC policy) before they land, with a thin adapter per agent (Claude, Codex, Vibe, Pi, opencode).docs/owasp.md— the OWASP Top 10:2025 (app) and LLM/GenAI 2025 coverage matrices the hub is measured against.
Full layout and spec conformance: docs/agents-and-skills.md.
Build, validate, test
No compile step. Node (for the mod/adapters) and npx tsx (for the scripts) are the only
tooling.
# Regenerate agents/SKILLS.md + the README tables, and validate every manifest.
./scripts/publish.sh # write generated artifacts
./scripts/publish.sh --check # CI gate: fails if artifacts are stale or a manifest drifts
# Guard mod + adapters — unit tests (no scanner binaries needed):
node --test mods/secure-guard/hooks/*.test.mjs integrations/shared/*.test.mjs
claude plugin test mods/secure-guard # the Claude mod's hooks, run by Claude Code itself
node --experimental-strip-types integrations/pi/smoke.test.ts
node --experimental-strip-types integrations/opencode/smoke.test.ts
# End-to-end against the real binaries (point at installed tools to skip the download):
XGREP_PATH=/path/to/xgrep CNSPEC_PATH=/path/to/cnspec \
node integrations/shared/pipeline-scenario.mjsAlways run ./scripts/publish.sh --check before opening a PR — it is the CI gate.
Conventions
- Skills follow the Agent Skills spec; the repo follows agents.md. Keep both true — see
docs/agents-and-skills.md, including the "adding a new skill" checklist. A skill'snamemust equal its directory name. agents/SKILLS.mdis generated — never hand-edit it; run./scripts/publish.sh.- One version for everything, stamped by the release workflow. Never edit a
versionin anyplugin.json/manifest by hand (plugin updateskips unchanged versions, stranding users on old content). The README "Releasing" section is the process. - xgrep is available to everyone — link it from its home at xgrep.ai,
the docs, or the
@mondoohq/xgrepnpm package, so readers can get started right away. cnspec is open source — link github.com/mondoohq/cnspec. - Small, focused commits on feature branches; keep generated artifacts in the same commit as the change that caused them.
Security
- The guard is fail-open: a missing, old, or erroring scanner must never wedge a session — preserve that in any adapter change.
- Don't commit secrets or real credentials, and don't add a scanner invocation that sends code off the machine. xgrep/cnspec run locally.
- Anything that crosses the network is announced and documented in the mod README's "Local by design" table: the xgrep binary fetch and cnspec policy downloads come down only, and sending anything up (e.g. Mondoo Platform reporting) is opt-in. Keep it that way, and keep that table in sync when you add one.
PR guidelines
Keep a PR to one feature. Run the tests and ./scripts/publish.sh --check first, and state in
the description what you verified.
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.

