metamask-docs / rules
Cursor rule865 starsChanged 16 days agoApache-2.0View on GitHub
Maps folder conventions to Diataxis content types so AI tools produce the right structure for each doc category.
We split this content-types.mdc into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Do not include step-by-step instructions.
- Distinctive: line 21
Keep explanation closely bounded.
- Distinctive: line 34
Do not digress into explanations or teaching.
- Distinctive: line 52
Keep the scope narrow. Link to guides for extended scenarios.
- Distinctive: line 75
Keep explanatory prose to the minimum needed to use the API correctly.
- Distinctive: line 76
Do not include tutorials or extended how-to steps.
- Distinctive: line 85
Do not assume the reader has prior knowledge of the subject or tools.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule 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
--- description: Maps folder conventions to Diataxis content types so AI tools produce the right structure for each doc category. globs: **/*.md,**/*.mdx alwaysApply: false --- # Content types (Diataxis) This repository follows the [Diataxis framework](https://diataxis.fr/) to organize documentation by function. The folder a file lives in usually determines the content type and structure expectations. `get-started/` is a mix of onboarding topics; see that section for when quickstart rules apply. ## Folder-to-type mapping ### `concepts/` and `learn/` - Explanation - Explain **why** something exists and **how** it works at a high level. - Provide context: design decisions, historical reasons, trade-offs, and alternatives. - Make connections to other parts of the system or to broader concepts. - Do not include step-by-step instructions. Link to related guides or quickstarts instead. - Keep explanation closely bounded. Do not let instructions or reference details creep in. - End every concept page with a "Next steps" section linking to actionable content. - Example: `smart-accounts-kit/concepts/smart-accounts.md` ### `guides/` and `how-to/` - How-to - Goal-oriented steps that help the reader achieve a specific outcome. - Title the page with the goal (for example, "Configure gas limits"), not a generic label. - State the goal in the first sentence or heading. - List prerequisites before the first step. - Number the steps. Each step should contain one action. - Assume the reader has basic knowledge of the product. - Omit the unnecessary. Practical usability matters more than completeness. - Do not digress into explanations or teaching. Link to concept pages instead. - Example: `smart-accounts-kit/guides/advanced-permissions/execute-on-metamask-users-behalf.md` ### `quickstart/` and `get-started/` The folder name alone does not imply a single content type for every file under `get-started/`. **Tutorial-adjacent quickstart** (end-to-end, copy-paste-and-run path to a working integration) applies only when: - The file lives under a `quickstart/` directory, or - The file lives under `get-started/` and **quickstart** appears in the file or directory name (for example, `smart-account-quickstart/index.md`). For those quickstart pages: - State what the reader will build or achieve. - Provide complete, working code that can be copied and pasted. - Keep the scope narrow. Link to guides for extended scenarios. **Other `get-started/` pages** are onboarding essentials readers should see before the rest of the docs: installation, system requirements, supported networks, supported clients, dashboard setup, and similar. They are not necessarily quickstarts. Choose structure based on the topic (how-to steps, short explanation, or reference-style facts) and match conventions of neighboring pages in the same `get-started/` section. Examples: - Quickstart: `smart-accounts-kit/get-started/smart-account-quickstart/index.md` - Onboarding in `get-started/` (not quickstart): `smart-accounts-kit/get-started/install.md` ### `reference/` - Reference - Precise, complete, structured descriptions of APIs, methods, parameters, and return values. - Describe and only describe. Be austere, neutral, and factual. - Match the parameter format used in surrounding reference pages. Some areas use tables (name, type, required/optional, description); others use nested bulleted lists (for example, JSON-RPC method docs in Snaps). Be consistent with the existing convention in the same product section. - Adopt standard patterns. Consistent structure lets readers find information quickly. - Mirror the structure of the API or code itself (for example, one section per method or endpoint). - Include short usage examples to illustrate parameters and return values. - Keep explanatory prose to the minimum needed to use the API correctly. - Do not include tutorials or extended how-to steps. - Examples: `snaps/reference/config-options.md`, `smart-accounts-kit/reference/delegation/delegation-scopes.md`, `snaps/reference/snaps-api/wallet_snap` ### `tutorials/` - Tutorial - Learning-oriented, reproducible, end-to-end walkthrough. - State what the reader will build or accomplish at the very start. - Do not assume the reader has prior knowledge of the subject or tools. - Deliver visible results early and often. Each step should produce output the reader can verify. - Show expected output (for example, "You should see `Server running on port 3000`"). - Ruthlessly minimize explanation. Keep the focus on doing, not theory. Link to concept pages for deeper understanding. - Ignore options and alternatives. Guide the reader along a single path to a successful conclusion. - Provide a complete working project or code sample. - Aspire to perfect reliability. Test every step. A learner who doesn't get the expected result loses confidence immediately. - Example: `src/pages/tutorials/create-wallet-ai-agent.md` ### `troubleshooting/` - Problem/solution - State the symptom or error message first, then the fix. - One problem per section or page. - Include the exact error text when available so readers can search for it. - Example: `smart-accounts-kit/troubleshooting/allowance-exceeded.md` ## Frontmatter For required and optional documentation frontmatter (`description`, `keywords`, `sidebar_label`, `title` vs duplicate H1), see **Frontmatter** in `markdown-formatting.mdc`.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/contributor-workflow.mdcCursor rule
- .cursor/rules/editorial-voice.mdcCursor rule
- .cursor/rules/markdown-formatting.mdcCursor rule
- .cursor/rules/product-agent-wallet.mdcCursor rule
- .cursor/rules/product-embedded-wallets.mdcCursor rule
- .cursor/rules/product-infura.mdcCursor rule
- .cursor/rules/product-metamask-connect.mdcCursor rule
- .cursor/rules/product-smart-accounts-kit.mdcCursor rule
- .cursor/rules/product-snaps.mdcCursor rule
- .cursor/rules/terminology.mdcCursor rule
- .cursor/rules/vercel-redirects.mdcCursor rule
- static/llms.txtllms.txt
- author-pageSkill
- style-reviewSkill
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.

