api-design

Guide developers in designing CosmWasm contract APIs with InstantiateMsg, ExecuteMsg, and QueryMsg.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CosmWasm contract APIs often suffer from inconsistent naming, ambiguous data structures, and sparse documentation, leading to integration frictions and maintenance risk.

Core Features & Use Cases

  • Guidelines for designing InstantiateMsg, ExecuteMsg, and QueryMsg with clear field docs and serialization patterns.
  • Patterns for response types, pagination, and integration with Abstract SDK to auto-generate wrappers.
  • Best practices for documentation, typename consistency, and testing support across contracts.

Quick Start

Refactor a CosmWasm contract’s InstantiateMsg, ExecuteMsg, and QueryMsg to follow the API design guidelines.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design robust CosmWasm smart contract APIs?

Design CosmWasm APIs by defining InstantiateMsg, ExecuteMsg, and QueryMsg with clear field documentation and consistent serialization patterns. Enforce minimalism and clarity across response types to reduce integration frictions.

What are the best practices for documenting CosmWasm InstantiateMsg and ExecuteMsg?

Best practices for documenting CosmWasm InstantiateMsg and ExecuteMsg involve maintaining typename consistency, adding thorough field docs, and structuring clear serialization patterns. This approach minimizes ambiguity and prevents maintenance risks in smart contracts.

Can I auto-generate wrappers for CosmWasm QueryMsg and response types?

You can auto-generate wrappers for CosmWasm QueryMsg and response types by integrating with Abstract SDK. This pattern streamlines contract interactions and ensures response type structures remain consistent across your smart contracts.

Why does my CosmWasm contract API suffer from integration friction?

CosmWasm contract APIs suffer from integration friction due to inconsistent naming, ambiguous data structures, and sparse documentation. Refactoring messages to follow strict minimalism, clarity, and typename consistency resolves these maintenance risks.

Does this approach support pagination and testing for CosmWasm smart contracts?

This approach supports pagination and testing for CosmWasm smart contracts by providing established patterns for response types and integration. It ensures thorough documentation and consistent structures to facilitate reliable contract testing.