notion-cookbook
AGENTS.md222 starsChanged 12 days agoMITView on GitHub
This is the canonical repository guide for coding agents. Tool-specific files should point here instead of restating these rules. Do not infer a recipe's category from a path segment that no longer exists. examples/ and workers/templates/ are flat collections; kind in catalog.json is the authoritative classification. Apps are a private alpha. Do not add, advertise, or modify Apps unless the task explicitly calls for private-alpha Apps work; follow the guidance local to the selected App when it does. 3. Read…
- Reads credentials
- Installs packages
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,439 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 repository13 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- notion-build-my-engineering-wikiSkill
- notion-create-my-team-handbookSkill
- notion-database-designerSkill
- notion-knowledge-captureSkill
- notion-meeting-prepSkill
- notion-organize-my-semesterSkill
- notion-plan-marketing-campaignsSkill
- notion-research-documentationSkill
- notion-set-up-my-projectSkill
- notion-setupSkill
- notion-spec-to-implementationSkill
- notion-weekly-project-digestSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 1 is common, 10 are distinctive, and 10 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Do not infer a recipe's category from a path segment that no longer exists.
- Very specific: line 29
Search catalog.json before scanning the tree.
- Very specific: line 36
Read the selected recipe's README, package.json, and listed entrypoints.
- Distinctive: line 37
Check nearby recipes only when they demonstrate a pattern the selected project does not cover.
- Very specific: line 40
Prefer the narrowest working recipe.
- Very specific: line 50
Use the commands declared for the recipe in catalog.json.
- Very specific: line 51
Read its README before creating .env or configuring an external service.
- Distinctive: line 54
Prefer offline checks before commands that call live APIs, mutate a Notion workspace, or deploy a Worker.
- Distinctive: line 67
Keep the change inside one recipe unless shared documentation or repository tooling genuinely needs to change.
- Very specific: line 69
Follow the existing registration and data-flow patterns in src/index.ts or the listed entrypoint.
- Distinctive: line 71
Document new prerequisites, environment variables, external permissions, expected output, and extension points.
- Distinctive: line 73
Update or add offline tests for transforms, pagination, validation, signature handling, or query safety before relying on a live …
- Very specific: line 75
If behavior, entrypoints, integrations, or commands change, update the matching catalog.json entry in the same change.
- Distinctive: line 86
Use the Notion client supplied by the Worker context when the platform owns authentication.
- Distinctive: line 98
Every new recipe must include:
- Distinctive: line 113
Do not add placeholder projects or catalog entries.
- Distinctive: line 118
Use proportional validation and report exactly what ran.
- Very specific: line 139
Run only scripts that exist in that project's package.json.
- Distinctive: line 147
Before finishing, confirm that:
- Common: line 152
No secrets, build output, dependency directories, or local Worker state were added.
- Very specific: line 164
After changing skills/mcp-clients/, run npm run plugins:build and commit the regenerated plugins/*/skills/.
≈ “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
This is the canonical repository guide for coding agents. Tool-specific files should point here instead of restating these rules.
Repository map
| Path | Purpose |
catalog.json | Machine-readable index of every runnable recipe, including paths, entrypoints, integrations, and supported commands. |
examples/<task>/ | Self-contained TypeScript programs that call the Notion API and run locally with Node.js. |
workers/templates/<integration>-<capability>/ | Self-contained Notion Worker syncs, agent tools, and webhooks. |
skills/ | Reusable instructions and evaluations for AI-assisted Notion workflows. |
plugins/<platform>/ | Agent platform plugins. Hand-written manifests; skills/ is generated. |
docs/ | Longer developer guides that are not standalone runnable projects. |
scripts/ | Repository-wide installation, validation, and maintenance commands. |
Do not infer a recipe's category from a path segment that no longer exists.
examples/ and workers/templates/ are flat collections; kind in
catalog.json is the authoritative classification.
Apps are a private alpha. Do not add, advertise, or modify Apps unless the task explicitly calls for private-alpha Apps work; follow the guidance local to the selected App when it does.
Find the right recipe
- Translate the request into an outcome, integration, and recipe kind.
Search
catalog.jsonbefore scanning the tree. For example:jq '.recipes[] | select(.integrations | index("linear"))' catalog.json jq '.recipes[] | select(.kind == "worker-tool") | {id, summary, path}' catalog.json- Read the selected recipe's README,
package.json, and listed entrypoints. - Check nearby recipes only when they demonstrate a pattern the selected project does not cover.
Prefer the narrowest working recipe. For example, adapt linear-sync for a new
Linear field; do not start from a generic Worker if the integration already has
an implemented sync.
Run a recipe
Recipes are independent projects. Run commands from the recipe directory and
install dependencies there. Never assume every project uses npm start or has
the same environment variables.
- Use the commands declared for the recipe in
catalog.json. - Read its README before creating
.envor configuring an external service. - Copy the provided environment template when present. Never commit
.env, tokens, service credentials, or generated Worker state. - Prefer offline checks before commands that call live APIs, mutate a Notion workspace, or deploy a Worker.
- State clearly when a live check was not run because credentials or external access were unavailable.
For Workers, Node.js 22.23.4 and npm 10.9.9 or newer are required. Authenticate and
deploy only when the user asks for a live deployment. Treat generated
workers.json files as local state unless a tracked fixture explicitly says
otherwise.
Adapt an existing recipe
- Preserve the recipe's standalone install and run flow.
- Keep the change inside one recipe unless shared documentation or repository tooling genuinely needs to change.
- Follow the existing registration and data-flow patterns in
src/index.tsor the listed entrypoint. - Document new prerequisites, environment variables, external permissions, expected output, and extension points.
- Update or add offline tests for transforms, pagination, validation, signature handling, or query safety before relying on a live integration test.
- If behavior, entrypoints, integrations, or commands change, update the
matching
catalog.jsonentry in the same change.
Worker-specific safety rules:
- Sync records need deterministic keys and pagination that cannot silently skip records. Document replace versus incremental behavior.
- Agent-facing query tools must enforce read-only access, bound result sizes, and explain the real security boundary; a prompt instruction is not one.
- Webhooks must authenticate deliveries and defend against replay where the provider supports timestamps or delivery IDs.
- Use the Notion client supplied by the Worker context when the platform owns authentication. Do not introduce a Notion token unnecessarily.
Add a recipe
Choose one project root:
examples/<task-name>/for a local Notion API/SDK program.workers/templates/<integration>-<capability>/for a deployed Worker. Put the integration first so related projects sort together, such aszendesk-syncandzendesk-webhook.
Every new recipe must include:
- A unique package name and a
package.jsonwith accurate scripts and engine requirements. - A README covering the outcome, when to use it, prerequisites, setup, exact run or deploy commands, expected result, code map, extension points, and verification.
- A clear TypeScript entrypoint and
tsconfig.json. .env.examplewhen configuration is required, containing names and safe placeholders only.- Deterministic offline checks for meaningful logic. New Workers should expose
build,check, andtestscripts. - One complete
catalog.jsonentry and links from the appropriate landing page and root README.
Do not add placeholder projects or catalog entries. Add a recipe only when its code, setup instructions, and checks are runnable.
Validate changes
Use proportional validation and report exactly what ran.
For an API example:
cd examples/<task>
npm install
npx tsc --noEmit
# Run the catalog's `run` command only when its required configuration is safe.For a Worker:
cd workers/templates/<integration>-<capability>
npm install
npm run check
npm test
npm run buildRun only scripts that exist in that project's package.json. Then, from the
repository root, install the repository tooling and run:
npm install
npm run verify:allBefore finishing, confirm that:
- Documentation links and commands use the current flat paths.
catalog.jsonmatches every package-backed direct child ofexamples/andworkers/templates/, with no placeholder entries.- No secrets, build output, dependency directories, or local Worker state were added.
- A recipe README still describes the behavior implemented by its entrypoint.
Documentation and skills
For documentation-only changes, validate links and run the root Markdown and
format checks. For skill changes, read skills/README.md
and the relevant skill collection guide first; update evaluations when behavior
changes. Do not treat a skill as a runnable cookbook recipe or add it to
catalog.json.
After changing skills/mcp-clients/, run npm run plugins:build and commit the
regenerated plugins/*/skills/. Never edit those copies directly.
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.

