onchainos-skills
AGENTS.md346 starsChanged 2 months agoMITView on GitHub
This file is the canonical development guide for all coding agents in this repository. CLAUDE.md only adds Claude Code specifics on top of it. 1. Do not use cargo test --lib because cli/ is a binary-only Rust crate and has no library target. Follow these steps for every development change. Before treating a requirement as clear, explain the supplied requirement or technical documents to the user: the goal, scope, and expected behavior. Use AskUserQuestion to obtain the user's confirmation. Then…
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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- okx-agentic-walletSkill
- okx-agent-payments-protocolSkill
- okx-aiSkill
- okx-dapp-discoverySkill
- okx-defiSkill
- okx-dex-marketSkill
- okx-guideSkill
- okx-mcp-servicesSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Do not use cargo test --lib because cli/ is a binary-only Rust crate and has no library target.
- Distinctive: line 13
Follow these steps for every development change.
- Very specific: line 17
Before treating a requirement as clear, explain the supplied requirement or technical documents to the user: the goal, scope, and expected …
- Distinctive: line 22
Do not start development until the user confirms the requirement.
- Distinctive: line 26
After the requirement is clear, classify the change and finish the matching pre-read below before creating or modifying a file.
- Distinctive: line 36
If you are unsure which row applies, treat the change as mixed.
- Distinctive: line 46
Start an independent sub-agent code review after development.
- Very specific: line 61
When using AskUserQuestion, ask only for information needed to continue.
- Distinctive: line 65
Write like a person in a chat thread.
- Very specific: line 74
When you create or modify a Skill file (SKILL.md, a Router / Business-Policy / CLI / Troubleshooting / Shared Reference, or a WebSocket …
- Distinctive: line 81
Keep the structure and the responsibilities that the template defines.
- Distinctive: line 82
Do not invent a new structure when a template exists.
- Distinctive: line 84
Write the text by the Writing Styles below.
- Very specific: line 86
If rules/skill-rules.md and a template differ on page structure, the template wins.
- Distinctive: line 99
Write Skill text so that readers who are not native English speakers can understand it and act on it quickly.
- Distinctive: line 104
Use one idea per sentence.
- Distinctive: line 105
Use plain words and the active voice.
- Distinctive: line 106
Run, Check, Ask, Show, or Stop.
- Distinctive: line 107
Keep sentences simple. Avoid unneeded abbreviations, nested clauses, double negatives, and strings of MUST NOT.
- Distinctive: line 109
Keep technical terms, CLI commands, field names, code, and fixed enum values in English.
- Distinctive: line 133
When a paragraph contains three or more independent conditions, prohibitions, fields, or actions, rewrite it as a list.
≈ “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 guidance
This file is the canonical development guide for all coding agents in this
repository. CLAUDE.md only adds Claude Code specifics on top of it.
Development notes
- Do not use
cargo test --libbecausecli/is a binary-only Rust crate and has no library target.
Development flow
Follow these steps for every development change.
1. Align the requirement
Before treating a requirement as clear, explain the supplied requirement or
technical documents to the user: the goal, scope, and expected behavior. Use
AskUserQuestion to obtain the user's confirmation. Then compare that
confirmed understanding with the code. If the current behavior and the expected
behavior differ or are ambiguous, use AskUserQuestion to align with the user.
Do not start development until the user confirms the requirement.
2. Read the applicable development rules
After the requirement is clear, classify the change and finish the matching pre-read below before creating or modifying a file.
| Change type | Required first step |
| Skill-only | Read rules/skill-rules.md, then inspect templates/ and open the template that matches the target file type |
| CLI-only | Read rules/cli-io-rules.md |
| Mixed Skill + CLI | Read both sets of rules, and inspect templates/ for the Skill files |
Guidance-only (AGENTS.md, CLAUDE.md, rules/) | Read the source rules that the guidance describes, then change only the guidance files |
If you are unsure which row applies, treat the change as mixed.
3. Develop and verify
Implement the clear requirement. Repair only unit or integration tests that are directly related to it. Do not fix unrelated test failures as part of the change.
4. Independently review the change
Start an independent sub-agent code review after development. The reviewer must apply the CLI and Skill rules in this file to the changed scope.
Development domains
This repository has two development domains. A change can belong to one of them or to both.
| Domain | What it covers | Rules to read first |
| Skill development | SKILL.md, references/**, _shared/**, routing tables, Skill rules (including how Skills describe CLI commands), and the page templates in templates/ | rules/skill-rules.md and templates/README.md |
| CLI development | CLI behavior under cli/ and the CLI input/output rules (readable flag names, shared parsing helpers, JSON output) | rules/cli-io-rules.md |
User-facing interaction
When using AskUserQuestion, ask only for information needed to continue;
state the decision and why it matters, offer clear mutually exclusive options
with a default when possible, and never repeat information already known.
Write like a person in a chat thread. Keep casual conversation and straightforward answers short. Give more depth when the user or task needs it.
Focus user-facing updates on results, not internal tools or process. Report errors in plain language without obscuring the actual outcome. Hand over completed files or links in the same message.
Skill development
When you create or modify a Skill file (SKILL.md, a Router / Business-Policy /
CLI / Troubleshooting / Shared Reference, or a WebSocket Protocol Reference),
work template-first:
- Open the relevant template under
templates/before you write. - Choose the closest template for the target file type, using the page-type
table in
templates/README.md. - Keep the structure and the responsibilities that the template defines.
- Do not invent a new structure when a template exists. If no template fits, say so in your change description instead of improvising.
- Write the text by the Writing Styles below.
If rules/skill-rules.md and a template differ on page structure, the template wins.
CLI development
CLI-related work is governed by the CLI input/output rules in
rules/cli-io-rules.md. Read them before you change CLI
flags, input validation, or command output, and before you document any of these
in a Skill. Do not add CLI requirements that are not in those rules. When
CLI input or output changes, update the Skill pages that describe it in the same
change.
Writing Styles
Write Skill text so that readers who are not native English speakers can understand it and act on it quickly.
Language
- Use one idea per sentence. State one main action or one judgment in each sentence.
- Use plain words and the active voice. Start action steps with a verb such as Run, Check, Ask, Show, or Stop.
- Keep sentences simple. Avoid unneeded abbreviations, nested clauses, double negatives, and strings of MUST NOT.
- Keep technical terms, CLI commands, field names, code, and fixed enum values in English. Write everything else in natural, clear language.
- Explain a new term once. When a specialized term first appears, add one short sentence that says what it does.
- Say each rule once. Do not repeat a rule to sound strict. Put a shared constraint in one place, and link to it or refer to it briefly elsewhere.
Example:
| Hard to follow | Easy to follow |
| Do not proceed with the broadcast without the user's confirmation not having been obtained. | Ask the user to confirm. Broadcast only after the user confirms. |
Organizing information
Choose the Markdown structure by content:
| Content | Use |
| Steps that must run in order | Ordered list |
| Conditions, inputs, notes, or parallel options | Unordered list |
| A comparison of options, states, or field mappings | Short table |
| Commands, JSON, return values, and copyable templates | Code block |
When a paragraph contains three or more independent conditions, prohibitions, fields, or actions, rewrite it as a list. Keep a causal sequence in prose or an ordered list.
Review checklist
- Skill files follow the closest template under
templates/. - CLI-related text follows
rules/cli-io-rules.mdand adds no new CLI requirements.
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.

