dotagents
AGENTS.md245 starsChanged 9 months agoMITView on GitHub
Use pnpm: pnpm install, pnpm build, pnpm test dotagents is shared tooling for coding agents. It manages skills, MCP servers, and hooks declared in agents.toml, and handles symlinks and config generation so tools like Claude Code can be configured from a single source of truth. See specs/SPEC.md for the full design. This repo is a pnpm workspace with two packages, versioned in lock-step (see RELEASING.md). The host depends on the lib via workspace:^ (rewritten at pack time). For cross-workspace typecheck,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository8 other files it gives its agents.
- skills/dotagents-qa/references/claude.mdCLAUDE.md
- docs/public/llms.txtllms.txt
- warden-skillSkill
- plugin-qaSkill
- commitSkill
- reviewSkill
- dotagents-qaSkill
- dotagentsSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Very specific: line 5
Use pnpm: pnpm install, pnpm build, pnpm test
- Distinctive: line 46
Fight entropy: Leave the codebase better than you found it.
- Very specific: line 58
Use export type for type-only exports (required for Bun compatibility)
- Distinctive: line 66
Prefer integration tests over unit tests
- Distinctive: line 67
Add regression tests for bugs
- Very specific: line 72
When changes affect CLI behavior, command interfaces, or user-facing semantics (flags, error messages, default behavior), update the …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Package Manager
Use pnpm: pnpm install, pnpm build, pnpm test
What This Project Is
dotagents is shared tooling for coding agents. It manages skills, MCP servers, and hooks declared in agents.toml, and handles symlinks and config generation so tools like Claude Code can be configured from a single source of truth.
See specs/SPEC.md for the full design.
Architecture
This repo is a pnpm workspace with two packages, versioned in lock-step (see RELEASING.md).
packages/
├── dotagents/ # @sentry/dotagents — the host CLI + agents.toml orchestrator
│ └── src/
│ ├── index.ts # Library entry point (re-exports lib symbols with @deprecated)
│ ├── scope.ts # Project/user scope resolution
│ ├── cli/ # CLI entry point + commands (init, install, add, remove, sync, list, mcp, doctor, trust)
│ ├── targets/ # Target agent definitions plus MCP/hook config writers
│ ├── subagents/ # Subagent identity, store, and runtime writer
│ ├── agents/ # Compatibility re-export barrel for older internal imports
│ ├── config/ # agents.toml schema, loader, writer
│ ├── lockfile/ # agents.lock schema, loader, writer
│ ├── symlinks/ # Symlink creation/management
│ ├── gitignore/ # .agents/.gitignore generation
│ └── utils/ # isInPlaceSkill (host-specific path conventions)
│
└── dotagents-lib/ # @sentry/dotagents-lib — the reusable core
└── src/
├── index.ts # Public API of the lib
├── skills/ # SKILL.md loader, discovery, resolver (parseSource, etc.)
├── sources/ # git.ts, cache.ts (configureCache), local.ts, wellknown.ts, repository-source.ts
├── trust/ # Trust validation (validateTrustedSource), TrustPolicy interface
└── utils/ # exec.ts, fs.ts (copyDir, stripTrailingSlashes)The host depends on the lib via workspace:^ (rewritten at pack time). For cross-workspace typecheck, the host's tsconfig.json declares a project reference to the lib (composite mode); the host's vitest.config.ts aliases @sentry/dotagents-lib directly to the lib's source so tests run without a build step.
Principles
- Fight entropy. Leave the codebase better than you found it.
- Prefer simpler solutions where it reasonably makes sense. Three lines of straightforward code beats an abstraction.
- Minimal dependencies. Reach for the standard library first.
- Early returns, fail fast. Guard clauses over nested conditionals.
Key Conventions
- TypeScript strict mode
- Zod v4 for runtime validation (
import { z } from "zod/v4") - ESM modules (
"type": "module") - Vitest for testing
- oxlint for linting (with
--deny-warnings) - Use
export typefor type-only exports (required for Bun compatibility) - Pre-commit hooks: oxlint via lint-staged
Testing
New functionality requires tests, but only tests that are functionally additive. Don't write tests for the sake of testing. A test should exist because it catches a real bug or verifies a meaningful behavior, not to hit a coverage number.
- Co-locate tests with source (
foo.ts->foo.test.ts) - Prefer integration tests over unit tests
- Add regression tests for bugs
- Mock external services, use real-world fixtures
Documentation
When changes affect CLI behavior, command interfaces, or user-facing semantics (flags, error messages, default behavior), update the relevant documentation: README.md, specs/SPEC.md, docs/public/llms.txt, and --help output. Code and docs ship together.
Verifying Changes
pnpm checkOr individually: pnpm lint && pnpm typecheck && pnpm test
- Changes affecting install, sync, doctor, skill placement, agent symlinks,
generated configs, user scope, or package/runtime behavior should use
skills/dotagents-qa/SKILL.mdfor proportionate Docker QA.
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.

