api-doc-comments

Standardizes doc comments for public schema-facing items in Rust CosmWasm contracts.

124|19|Updated Jul 11, 2022
One-click install
npx skills add https://github.com/axone-protocol/contracts --skill api-doc-comments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-doc-comments
Source: https://github.com/axone-protocol/contracts/tree/main/.agents/skills/api-doc-comments
Command: npx skills add https://github.com/axone-protocol/contracts --skill api-doc-comments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The API surface of Rust CosmWasm contracts often lacks consistent, domain-focused documentation. This skill guides writers to produce precise, semantics-driven doc comments for all public schema-facing items so generated contract docs are accurate and useful.

Core Features & Use Cases

  • Document all schema-facing public items: messages, enums, and every public field with clear semantics.
  • Explain preconditions, encoding formats, and domain-specific behavior to ensure the generated docs reflect real usage.
  • Support the doc-generation workflow by aligning comments with the contract surface (Instantiate/Execute/Query/Response types) across modules.

Quick Start

Write precise, domain-aware doc comments for every public schema item in a contract and regenerate the docs.

Frequently Asked Questions about api-doc-comments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document CosmWasm contract schemas for generated API docs?

To document CosmWasm contract schemas, you write precise, domain-aware doc comments for every public schema-facing item, ensuring generated API docs accurately reflect semantics, preconditions, and encoding formats.

What is the best way to standardize Rust doc comments across contract modules?

Standardizing Rust doc comments involves applying structured guidance to all Instantiate, Execute, Query, and Response types across contract modules, enforcing consistent API semantics and domain examples within the generated docs.

Do I need to document all public fields in a CosmWasm contract?

Yes, you need to document all public schema-facing fields in a CosmWasm contract. Clarifying semantics, preconditions, and domain-specific behavior for every field ensures the generated contract docs remain accurate and useful.

Can I use this approach to document Instantiate and Query message types?

Yes, this approach fully supports documenting Instantiate, Execute, Query, and Response types. It aligns comments directly with the contract surface to enforce structured guidance for encoding formats and domain examples.

Why does my generated Rust contract documentation lack domain context?

Generated Rust contract documentation lacks domain context when doc comments omit preconditions, encoding formats, and domain-specific behavior. Adding semantics-driven comments to all public schema items resolves this by making generated docs reflect real usage.

When should I not use standard doc comments for contract schema generation?

You should avoid generic doc comments when dealing with schema-facing public items if the generated docs require strict domain accuracy. Standard comments often fail to explain preconditions and encoding formats needed for complex contract modules.