Agent skill

API Doc Comments

by axone-protocol in axone-protocol/contracts

Guide for writing Rust doc comments that produce accurate generated contract documentation.

BSD-3-ClauseAuto-check passedDevelopment

Install API Doc Comments

skills CLI
$ npx skills add axone-protocol/contracts --skill api-doc-comments -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install axone-protocol/contracts api-doc-comments --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/axone-protocol/contracts.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/api-doc-comments .claude/skills/api-doc-comments && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-doc-comments
GitHub stars
123
Token cost
~849 tokens
SKILL.md length
416 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Guide for writing Rust doc comments that produce accurate generated contract documentation.

  • Editing Instantiate/Execute/Query/Response types
  • SKILL.md covers Core Rule, What must be documented, Writing Style and What good API comments should…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Any public schema-facing API

What it does

API Doc Comments is an agent skill from axone-protocol/contracts. 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.

Its SKILL.md is about 850 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. It works with Rust. The repository describes itself as: 📜 Smart contracts for the Axone protocol. The licence is BSD-3-Clause.

When your agent uses it

  • Editing Instantiate/Execute/Query/Response types
  • Any public schema-facing API

Example prompts

  • “/api-doc-comments”

What it can do on your machine

Read from SKILL.md and the folder at commit 02724f3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Doc Comments loads about 849 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 416 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~849

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from axone-protocol/contracts at commit 02724f3, republished under its BSD-3-Clause licence (© axone-protocol). 416 words, ~849 tokens.

Download SKILL.mdSave it as .claude/skills/api-doc-comments/SKILL.md (or your agent's skills folder).
name
api-doc-comments
description
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.
license
BSD-3-Clause
metadata.author
axone.xyz
metadata.version
1.0

API Doc Comments

Core Rule

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.

What must be documented

Document all schema-facing public items:

  • message structs and enums
  • execute/query variants
  • every public field in those messages
  • query response structs
  • domain-specific public enums surfaced through the schema

Writing Style

Prefer comments that are:

  • specific to the contract's domain
  • precise about behavior
  • concise, but not cryptic
  • written from the caller's point of view

Avoid comments that are:

  • generic restatements of the field name
  • implementation-oriented when the caller needs semantics
  • padded with filler text

What good API comments should explain

Semantics

Explain what the message or field means in the protocol, not only its Rust type.

Preconditions and invariants

Document constraints such as:

  • accepted formats
  • authorization requirements
  • default behaviors
  • ordering or pagination semantics
  • exact conditions under which an action is permitted
Encoded representations

When the public API intentionally uses String or Binary, document the encoded format explicitly.

Examples from this repository include:

  • Prolog case terms carried as String
  • constitutions carried as UTF-8 Prolog bytes in Binary
  • DIDs represented as canonical strings
  • hashes exposed as binary values with a named algorithm
Domain examples

Use short examples when the payload format is not self-evident, especially for:

  • Prolog terms
  • CAIP / DID-like identifiers
  • structured intent names
Show full SKILL.md (187 more words)Show less

Repo-Specific Guidance

For Axone contracts, strong API comments often need to explain:

  • how a resource relates to its host Abstract Account
  • what data is caller-provided versus injected by the contract
  • which keys are authoritative when contexts are merged
  • which governance intent is being evaluated
  • what a returned verdict or motivation represents

These semantics matter more than low-level implementation detail.

Top-level message types
  • one short summary line
  • one or more paragraphs for domain semantics
  • preconditions or protocol rules when relevant
Enum variants
  • what the action or query does
  • when it should be used
  • important side effects or gating rules
Fields
  • what the field contains
  • expected format or units
  • default or optional behavior if applicable

Examples of useful details

Good details to include:

  • "UTF-8 Prolog program bytes"
  • "exclusive pagination cursor"
  • "verdict returned by governance:decide/3"
  • "canonical Cosmos Bech32 account rendered in DID form"

Weak details to avoid:

  • "The title"
  • "A string value"
  • "Used for execution"

Relationship with other skills

  • Use api-design to shape the contract surface itself.
  • Use this skill to make that surface intelligible in generated documentation.
  • Use doc-generation after comment changes to refresh generated artifacts.

© axone-protocol, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/api-doc-comments of axone-protocol/contracts.

Open the folder on GitHubat commit 02724f3

Compare with similar skills

API Doc Comments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Doc Comments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Doc Comments this skillaxone-protocol/contracts123—~849Automated safety check: PassBSD-3-Clause
Deepwiki Rssopaco/deepwiki-rs3.1k—~748Automated safety check: PassMIT
Releasejaemk/self_update961—~2.2kAutomated safety check: PassMIT
Dev Rulesrust-dd/tako162—~810Automated safety check: PassMIT
Translate It Doc En Zhmxsm/rocketmq-rust1.5k—~1.2kAutomated safety check: PassApache-2.0
Codex Proxy RS Development Guidezyycn/codex-proxy-rs750—~618Automated safety check: PassApache-2.0

Similar skills

  • Deepwiki Rs

    sopaco/deepwiki-rs

    AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation.

    3.1k GitHub stars~748 tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Release

    jaemk/self_update

    Prepare a release (bump the crate version, update CHANGELOG.md with a migration guide for breaking changes, regenerate README, commit), or run a pre-release review.

    961 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Dev Rules

    rust-dd/tako

    General coding-style rules to apply to every project. An agent skill from rust-dd/tako.

    162 GitHub stars~810 tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Translate It Doc En Zh

    mxsm/rocketmq-rust

    Translate English IT and software engineering documents into professional, accurate Chinese.

    1.5k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Routes development, troubleshooting, review and documentation tasks on the Codex Proxy RS repository to the right section of its docs, instead of loading the whole architecture or contributing guide.

    750 GitHub stars~618 tokensUpdated today
    DevelopmentAuto-check passed
  • Signal Over Noise

    JamieMason/syncpack

    Maximize useful information per word by removing filler, obvious explanations, and hedging language.

    2.1k GitHub stars~1.5k tokensUpdated 11 days ago
    DevelopmentAuto-check passed

More from axone-protocol/contracts

All 9 skills in this repo
  • Conventional Commits

    axone-protocol/contracts

    Guide for writing conventional commit messages. An agent skill from axone-protocol/contracts.

    123 GitHub stars~909 tokensUpdated 12 days ago
    Auto-check passed
  • Rust Testing

    axone-protocol/contracts

    Patterns for Rust testing in Axone CosmWasm contracts. An agent skill from axone-protocol/contracts.

    123 GitHub stars~501 tokensUpdated 12 days ago
    Auto-check passed
  • Rust Quality Gates

    axone-protocol/contracts

    Repository quality gates for Rust and generated artifacts. An agent skill from axone-protocol/contracts.

    123 GitHub stars~248 tokensUpdated 12 days ago
    Auto-check passed
  • API Design

    axone-protocol/contracts

    Best practices for designing CosmWasm smart contract APIs. An agent skill from axone-protocol/contracts.

    123 GitHub stars~1.1k tokensUpdated 12 days ago
    Auto-check passed
  • Cosmwasm Contract

    axone-protocol/contracts

    Axone contract structure and Abstract SDK patterns. An agent skill from axone-protocol/contracts.

    123 GitHub stars~1.2k tokensUpdated 12 days ago
    Auto-check passed
  • Deployment

    axone-protocol/contracts

    Axone deployment workflows with cargo-make, cw-orch, and Abstract.

    123 GitHub stars~927 tokensUpdated 12 days ago
    Auto-check: notes

Works with

Questions about API Doc Comments

What does API Doc Comments do?

Guide for writing Rust doc comments that produce accurate generated contract documentation. API Doc Comments is an agent skill from axone-protocol/contracts. Guide for writing Rust doc comments that produce accurate generated contract documentation.

When should I use API Doc Comments?

API Doc Comments fits situations like: editing Instantiate/Execute/Query/Response types; any public schema-facing API.

How do I install API Doc Comments in Claude Code?

Run `npx skills add axone-protocol/contracts --skill api-doc-comments -a claude-code`. Or copy the skill folder (.agents/skills/api-doc-comments in axone-protocol/contracts) into .claude/skills/api-doc-comments in your project. Claude Code loads it when a task matches its description.

How do I install API Doc Comments in Codex?

Run `npx skills add axone-protocol/contracts --skill api-doc-comments -a codex`. Or copy the skill folder (.agents/skills/api-doc-comments in axone-protocol/contracts) into .agents/skills/api-doc-comments in your project. Codex loads it when a task matches its description.

Can I use API Doc Comments in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add axone-protocol/contracts --skill api-doc-comments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-doc-comments, .gemini/skills/api-doc-comments, .github/skills/api-doc-comments and .opencode/skills/api-doc-comments in your project.

What does API Doc Comments need to run?

SKILL.md names no scripts, command-line tools or credentials: API Doc Comments is instructions for the agent only.

Does API Doc Comments access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Doc Comments safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Doc Comments use?

API Doc Comments is published under the BSD-3-Clause licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Doc Comments use?

About 849 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Doc Comments?

Skills that share tags, products or a category with API Doc Comments: Deepwiki Rs (sopaco/deepwiki-rs, 3.1k stars), Release (jaemk/self_update, 961 stars), Dev Rules (rust-dd/tako, 162 stars) and Translate It Doc En Zh (mxsm/rocketmq-rust, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Doc Comments?

axone-protocol (a GitHub organization) maintains it in axone-protocol/contracts, which has 123 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 25, 2026.

Source: axone-protocol/contracts on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.