claude-plugin
AGENTS.md4 starsChanged 4 months agoApache-2.0View on GitHub
Guidance for AI coding assistants (and new contributors) working in this repo. It complements CONTRIBUTING.md; read that first for setup and the full workflow. The CockroachDB plugin for Claude Code: MCP backends (.mcp.json + tools.yaml), agents (agents/), skills (skills/), and safety hooks (hooks/hooks.json + scripts/). Run the hook regression suite before touching anything under hooks/ or scripts/: CI runs the same suite on any PR that touches those paths. It covers the deny/warn/lint cases plus the fail-open regressions for #20…
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,774 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 repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- benchmarking-transaction-patternsSkill
- designing-application-transactionsSkill
- designing-multi-region-applicationsSkill
- analyzing-range-distributionSkill
- analyzing-schema-change-storage-riskSkill
- auditing-table-statisticsSkill
- monitoring-background-jobsSkill
- profiling-statement-fingerprintsSkill
- profiling-transaction-fingerprintsSkill
- triaging-live-sql-activitySkill
- molt-fetchSkill
- molt-replicatorSkill
- molt-verifySkill
- setting-up-local-clusterSkill
- managing-certificates-and-encryptionSkill
- managing-cluster-capacitySkill
- managing-cluster-settingsSkill
- performing-cluster-maintenanceSkill
- provisioning-cluster-for-productionSkill
- reviewing-cluster-healthSkill
- upgrading-cluster-versionSkill
- cockroachdb-sqlSkill
- auditing-cis-benchmarkSkill
- auditing-cloud-cluster-securitySkill
- configuring-audit-loggingSkill
- configuring-ip-allowlistsSkill
- configuring-log-exportSkill
- configuring-private-connectivitySkill
- configuring-sso-and-scimSkill
- enabling-cmek-encryptionSkill
- enforcing-password-policiesSkill
- hardening-user-privilegesSkill
- managing-tls-certificatesSkill
- preparing-compliance-documentationSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
No counts in descriptions: Do not write "three agents" or "33 skills" anywhere.
- Very specific: line 21
Run the hook regression suite before touching anything under hooks/ or scripts/:
- Distinctive: line 31
Commit messages and PR bodies in a plain human voice: conventional-commit prefixes, no AI attribution trailers, plain punctuation.
≈ “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
Agent instructions for claude-plugin
Guidance for AI coding assistants (and new contributors) working in this repo. It complements CONTRIBUTING.md; read that first for setup and the full workflow.
What this repo is
The CockroachDB plugin for Claude Code: MCP backends (.mcp.json + tools.yaml), agents (agents/), skills (skills/), and safety hooks (hooks/hooks.json + scripts/).
Rules that prevent breakage
- Never edit
skills/by hand. Skills are synced from the cockroachdb-skills submodule by a weekly workflow that also regenerates theskillsarray in.claude-plugin/plugin.json. Changes there get overwritten. Contribute skills upstream instead. - Never bump versions by hand. Release Please owns
versionin.claude-plugin/plugin.json,.release-please-manifest.json, andCHANGELOG.md. Use conventional commits:fix:/feat:cut a release,chore:/docs:do not (and that is fine, because installs pull from git, not release tarballs). - Keep the hook command pattern. Hook commands load their script through a
runpybootstrap with a\\?\long-path prefix on Windows and a trailing; exit 0. This is load-bearing: it survives plugin cache paths past Windows MAX_PATH (issue #20), hosts that fail to substitute${CLAUDE_PLUGIN_ROOT}(issue #23), and current Claude Code, which exportsCLAUDE_PLUGIN_ROOTinstead of substituting it in shell-form commands, so the bootstrap falls back to the environment variable. A hook must never surface an error on every edit; when the interpreter cannot even open the script, it must fail open. The exact pattern is documented in CONTRIBUTING. - Use
${VAR:-default}in.mcp.json, never a bare${VAR}. An unset bare reference reaches the server as literal text (issue #27). Toolbox uses an empty value as-is instead of its default, so connection settings need non-empty defaults that matchtools.yaml. - Match plugin MCP tools by their scoped name. Claude Code names them
mcp__plugin_cockroachdb_<server>__<tool>, and a hook matcher that lists only the baremcp__<server>__<tool>name never fires for marketplace installs. - Hook scripts are Python 3 stdlib only, read JSON on stdin, write JSON on stdout, and always exit 0 (blocking is signaled via
hookSpecificOutput.permissionDecision, not exit codes). - No counts in descriptions. Do not write "three agents" or "33 skills" anywhere; counts go stale. Name the things instead.
Testing
Run the hook regression suite before touching anything under hooks/ or scripts/:
bash scripts/test-hooks.shCI runs the same suite on any PR that touches those paths. It covers the deny/warn/lint cases plus the fail-open regressions for #20 and #23 (missing or unsubstituted plugin root must exit 0 with no output).
Writing style
Commit messages and PR bodies in a plain human voice: conventional-commit prefixes, no AI attribution trailers, plain punctuation. Reference issues with closing keywords per issue (Fixes #20. Fixes #23.), since GitHub only links the number directly after each keyword.
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.

