.agents/skills/api-doc-comments/SKILL.md
Guide for writing Rust doc comments that produce accurate generated contract documentation. Use when editing Instantiate/Execute/Query/Response types or any public schema-facing API.
npx skillsauth add axone-protocol/contracts api-doc-commentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The generated documentation is only as good as the Rust doc comments on schema-facing types.
Write the comments on the source types first, then regenerate docs with the doc-generation workflow.
Document all schema-facing public items:
Prefer comments that are:
Avoid comments that are:
Explain what the message or field means in the protocol, not only its Rust type.
Document constraints such as:
When the public API intentionally uses String or Binary, document the encoded format explicitly.
Examples from this repository include:
StringBinaryUse short examples when the payload format is not self-evident, especially for:
For Axone contracts, strong API comments often need to explain:
These semantics matter more than low-level implementation detail.
Good details to include:
governance:decide/3"Weak details to avoid:
api-design to shape the contract surface itself.doc-generation after comment changes to refresh generated artifacts.development
Patterns for Rust testing in Axone CosmWasm contracts. Use when adding unit tests, integration tests, data-driven cases, or coverage-oriented test scenarios.
development
Repository quality gates for Rust and generated artifacts. Use when validating changes locally or before committing Rust, schema, or documentation updates.
development
Domain-driven modeling patterns for Axone contracts. Use when introducing domain concepts, encoding invariants, or deciding boundaries between domain, handlers, services, gateways, queries, and state.
development
Guide for regenerating Axone contract schemas and rendered Markdown docs. Use when contract APIs or metadata change, when checking generated-doc drift, or when preparing documentation commits.