starknet-agentic
AGENTS.md80 starsChanged 7 months agoMITView on GitHub
This is the single canonical instruction file for automated coding agents in this repository. Keep behavior and workflow directives here. Compatibility policy: - AGENTS.md is canonical. - Any tool-specific file (for example CLAUDE.md) must be a thin adapter or reference layer, not a conflicting instruction source. Build production-grade Starknet agent infrastructure: secure Cairo contracts, reliable runtimes, and high-signal skills that external developers can install and use with minimal friction. This repository includes: - Cairo contracts (contracts/**) - TypeScript packages and…
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 repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- website/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- starknet-agentic-skillsSkill
- account-abstractionSkill
- cairo-auditorSkill
- cairo-contract-authoringSkill
- cairo-deploySkill
- cairo-optimizationSkill
- cairo-testingSkill
- controller-cliSkill
- huginn-onboardSkill
- snip-36Skill
- starknet-anonymous-walletSkill
- starknet-defiSkill
- starknet-identitySkill
- starknet-jsSkill
- starknet-mini-paySkill
- starknet-network-factsSkill
- starknet-tongoSkill
- starknet-walletSkill
- starkzap-sdkSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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 28
Keep normative process guidance in this file only.
- Distinctive: line 29
Do not duplicate behavioral rules across multiple root files.
- Distinctive: line 31
Prefer narrow diffs with explicit acceptance checks.
- Distinctive: line 33
Treat key handling, policy enforcement, and upgrade paths as critical.
- Distinctive: line 35
Use pinned refs for install docs and deterministic validation scripts.
- Distinctive: line 37
Use authoring -> testing -> optimization -> auditor flow for Cairo work.
- Distinctive: line 66
Keep changes focused and reversible.
- Distinctive: line 72
Verify interface compatibility and security posture.
- Very specific: line 95
Use conventional commits (feat:, fix:, docs:, chore:, test:, refactor:, ci:).
- Distinctive: line 97
Test on Sepolia before any mainnet deployment.
- Distinctive: line 109
run the relevant deterministic benchmark command
- Distinctive: line 110
if touching benchmark/eval policy, update scorecards and gate docs
≈ “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
AGENTS.md - Canonical Agent Instructions
This is the single canonical instruction file for automated coding agents in this repository. Keep behavior and workflow directives here.
Compatibility policy:
AGENTS.mdis canonical.- Any tool-specific file (for example
CLAUDE.md) must be a thin adapter or reference layer, not a conflicting instruction source.
Mission
Build production-grade Starknet agent infrastructure: secure Cairo contracts, reliable runtimes, and high-signal skills that external developers can install and use with minimal friction.
Scope
This repository includes:
- Cairo contracts (
contracts/**) - TypeScript packages and examples (
packages/**,examples/**) - public installable skills (
skills/**) - quality/security gates (
scripts/quality/**, CI workflows)
Core Operating Principles
- Single source of truth:
- Keep normative process guidance in this file only.
- Do not duplicate behavioral rules across multiple root files.
- Small, testable changes:
- Prefer narrow diffs with explicit acceptance checks.
- Security-first for high-risk paths:
- Treat key handling, policy enforcement, and upgrade paths as critical.
- Reproducibility:
- Use pinned refs for install docs and deterministic validation scripts.
- Explicit handoffs:
- Use authoring -> testing -> optimization -> auditor flow for Cairo work.
Roles and Boundaries
| Role | Owns | Does Not Own |
| Coordinator | Scope, plan, sequencing | Large feature implementation |
| Contracts Executor | Cairo contracts/tests/deploy scripts | Unrelated UX changes |
| Runtime Executor | MCP/A2A/adapters/tool runtime | Silent ABI/policy shape changes |
| Skills Executor | skills/**, references, install UX docs | Contract logic changes without coordination |
| Reviewer | Correctness, security regressions, release gates | Initial implementation |
Task Lifecycle
todo -> inprogress -> inreview -> done
The blocked state can be entered from any state when waiting on a dependency or decision.
Work Protocol
1) Investigation (Coordinator)
- Identify touched files/interfaces and risk class.
- Define acceptance checks before implementation.
- Mark parallelizable vs serialized work.
2) Execution (Executor)
- Implement only approved scope.
- Keep changes focused and reversible.
- Surface blockers immediately.
3) Review (Reviewer)
- Run relevant checks.
- Verify interface compatibility and security posture.
- Confirm acceptance criteria are satisfied.
Parallelization Rules
Safe to parallelize:
packages/**orexamples/**vscontracts/**when interfaces are stable- independent skill docs under different
skills/<name>/ - docs work while long test suites run
Must serialize:
- Any shared interface change (ABI, calldata shape, policy fields)
- changes to
scripts/**and CI workflows - concurrent edits to the same skill directory
Conflict resolution:
- Detect overlap early (
rgon touched files). - Pause dependent work if overlap exists.
- Land interface change first with tests.
- Rebase/adjust dependents, then re-verify.
Git and Deployment
- Use conventional commits (
feat:,fix:,docs:,chore:,test:,refactor:,ci:). - Branch from
mainfor every change. - Test on Sepolia before any mainnet deployment.
Required Validation by Change Type
Skills/install UX changes:
python3 scripts/quality/validate_skills.pypython3 scripts/skills_manifest.py --checkpython3 scripts/quality/check_codex_distribution.pypython3 -m unittest scripts/quality/test_codex_distribution.pypython3 scripts/quality/validate_marketplace.py
Cairo skill benchmark/eval changes:
- run the relevant deterministic benchmark command
- if touching benchmark/eval policy, update scorecards and gate docs
Contract changes:
scarb buildandsnforge testin impacted contract package(s)
TypeScript package changes:
- package build + tests for impacted workspace packages
Escalation Rules
Escalate when:
- public interfaces or policy schema change
- security-sensitive behavior changes (keys, approvals, upgrade authority)
- deployment credentials/funding/network access are required
- contradictory requirements block progress
Escalation format:
## Escalation: [Title]
**Blocker**: [...]
**Options**:
1. [...]
2. [...]
**Recommendation**: [...]Canonical References
- Skills spec and format:
references/agentskills/** - System architecture and boundaries:
docs/SPECIFICATION.md - Security policy:
SECURITY.md - Cairo skill cutover (legacy name mapping):
skills/README.md("Cairo Skill Cutover") - Skills distribution docs:
skills/README.md
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.

