Agent skill

Cosmwasm Contract

by axone-protocol in axone-protocol/contracts

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

BSD-3-ClauseAuto-check passedDevelopment

Install Cosmwasm Contract

skills CLI
$ npx skills add axone-protocol/contracts --skill cosmwasm-contract -a claude-code

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

GitHub CLI
$ gh skill install axone-protocol/contracts cosmwasm-contract --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/cosmwasm-contract .claude/skills/cosmwasm-contract && 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
cosmwasm-contract
GitHub stars
123
Token cost
~1.2k tokens
SKILL.md length
396 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

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

  • Refactoring contracts
  • SKILL.md covers Companion Skills, Repository Structure, Minimal Contract Skeleton and Optional Layers Already Used…, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Deciding layer boundaries

What it does

Cosmwasm Contract is an agent skill from axone-protocol/contracts. Axone contract structure and Abstract SDK patterns. Use when scaffolding or refactoring contracts, deciding layer boundaries, wiring AppContract entrypoints, or adding module metadata and replies.

Its SKILL.md is about 1.2k 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 Project scaffolding and Refactoring. It works with Rust and WebAssembly. The repository describes itself as: 📜 Smart contracts for the Axone protocol. The licence is BSD-3-Clause.

When your agent uses it

  • Refactoring contracts
  • Deciding layer boundaries
  • Wiring AppContract entrypoints
  • Adding module metadata and replies

Example prompts

  • “/cosmwasm-contract”

What it can do on your machine

Read from SKILL.md and the folder at commit 6d65fea. 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 (its code samples are rust).

    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

Cosmwasm Contract loads about 1.2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 396 words of instructions outside code blocks.

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

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 6d65fea, republished under its BSD-3-Clause licence (© axone-protocol). 396 words, ~1,232 tokens.

Download SKILL.mdSave it as .claude/skills/cosmwasm-contract/SKILL.md (or your agent's skills folder).
name
cosmwasm-contract
description
Axone contract structure and Abstract SDK patterns. Use when scaffolding or refactoring contracts, deciding layer boundaries, wiring AppContract entrypoints, or adding module metadata and replies.
license
BSD-3-Clause
metadata.author
axone.xyz
metadata.version
1.0

CosmWasm Contract Structure

Companion Skills

Use rust-contract-domain-modeling for invariant-heavy domain design, api-design for message surfaces, api-doc-comments for schema-facing documentation, rust-testing for tests, and rust-quality-gates for validation gates.

Repository Structure

The repository has:

  • a workspace-level Makefile.toml for shared tasks
  • a contract-level Makefile.toml in each contract for local helpers
  • one directory per contract under contracts/

Minimal Contract Skeleton

Start from this minimal shape:

text
contracts/<contract-name>/
├── Cargo.toml
├── Makefile.toml
├── README.md
├── metadata.json
├── src/
│   ├── lib.rs
│   ├── contract.rs
│   ├── msg.rs
│   ├── state.rs
│   ├── error.rs
│   ├── handlers/
│   │   ├── mod.rs
│   │   ├── instantiate.rs
│   │   ├── execute.rs
│   │   ├── query.rs
│   │   └── migrate.rs
│   └── bin/
│       ├── schema.rs
│       ├── publish.rs
│       └── install.rs
└── tests/
    └── integration.rs

Add extra layers only when they clarify boundaries.

Optional Layers Already Used In This Repo

Current repository layers include:

  • domain/ for explicit business concepts and invariants
  • services/ for orchestration and environment-aware composition
  • gateway/ for external module interaction and protocol I/O
  • queries/ for query string / payload builders
  • replies/ for reply handlers

axone-gov is the reference example for the richer layered shape.

Layer Boundaries

  • msg.rs defines the public contract surface.
  • contract.rs wires the AppContract entrypoints and module metadata.
  • handlers/ should stay thin: decode messages, call domain/services, build responses.
  • domain/ should own invariants and canonical representations.
  • services/ should coordinate enriched flows or external calls without becoming a second handler layer.
  • gateway/ should isolate external query / module plumbing.
  • state.rs should persist and reconstruct values, not silently redefine business rules.

lib.rs Pattern

Keep module identity constants explicit:

rust
pub const AXONE_NAMESPACE: &str = "axone";
pub const CONTRACT_NAME: &str = "my-contract";
pub const CONTRACT_ID: &str = const_format::concatcp!(AXONE_NAMESPACE, ":", CONTRACT_NAME);
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");

contract.rs Pattern

The baseline AppContract wiring looks like this:

rust
use abstract_app::AppContract;

pub type MyContract = AppContract<
    MyContractError,
    MyContractInstantiateMsg,
    MyContractExecuteMsg,
    MyContractQueryMsg,
    MyContractMigrateMsg,
>;

const APP: MyContract = MyContract::new(CONTRACT_ID, APP_VERSION, None)
    .with_instantiate(handlers::instantiate_handler)
    .with_execute(handlers::execute_handler)
    .with_query(handlers::query_handler)
    .with_migrate(handlers::migrate_handler)
    .with_dependencies(&[]);

#[cfg(feature = "export")]
abstract_app::export_endpoints!(APP, MyContract);

abstract_app::cw_orch_interface!(APP, MyContract, MyContractInterface);

Repository-specific refinements:

  • Use Some(APP_METADATA_URL) when the contract publishes metadata from a tagged GitHub URL.
  • Add .with_replies(...) when the contract has reply-driven flows.
  • Keep .with_dependencies(&[]) explicit unless real module dependencies exist.
  • Add the non-wasm DependencyCreation impl when the interface needs the standard installation path used in this repo.
Show full SKILL.md (147 more words)Show less

Message Wiring

Use abstract_app::app_msg_types!(...) in msg.rs when following the repository's Abstract app pattern.

Keep message docs and response typing aligned with:

  • api-design
  • api-doc-comments

Error Design

Error enums should include the standard conversion layers used by the contract and then domain-specific errors.

Do not hide domain invariants in generic StdError messages if a dedicated error variant would make the failure explicit.

Replies and Metadata

Two patterns matter in this repository:

  • metadata.json is part of the contract deliverable and should stay aligned with the module identity.
  • reply handlers are normal when contract setup involves follow-up callbacks or submessage completion.

Treat both as first-class contract structure, not optional afterthoughts.

Construction Rules

  • Put invariant checks close to domain object creation.
  • Keep handler branches short; move validation-heavy logic out of handlers.
  • Prefer explicit constructors such as new, try_new, or from_state.
  • Reuse canonical domain types rather than passing partially validated strings across layers.

© 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/cosmwasm-contract of axone-protocol/contracts.

Open the folder on GitHubat commit 6d65fea

Compare with similar skills

Cosmwasm Contract 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.

Cosmwasm Contract compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cosmwasm Contract this skillaxone-protocol/contracts123—~1.2kAutomated safety check: PassBSD-3-Clause
Rust Hygiene Audittsz-org/tsz577—~1.5kAutomated safety check: PassApache-2.0
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
PonytailDavidObando/gsharp5657 repos~1.7kAutomated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Run a deep DRY + code-hygiene audit of the Rust workspace and turn the findings into verified, deduplicated, hierarchical GitHub tech-debt issues.

    577 GitHub stars~1.5k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 7 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Reviews RTK's Rust code for over-engineering and verbose patterns, applying idioms like iterator chains and early returns while protecting a specific list of constraints from being simplified away.

    83k GitHub stars~1.1k tokensUpdated today
    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 today
    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 today
    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 today
    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 today
    Auto-check passed
  • API Doc Comments

    axone-protocol/contracts

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

    123 GitHub stars~849 tokensUpdated today
    Auto-check passed
  • Deployment

    axone-protocol/contracts

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

    123 GitHub stars~927 tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Cosmwasm Contract

What does Cosmwasm Contract do?

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

When should I use Cosmwasm Contract?

Cosmwasm Contract fits situations like: refactoring contracts; deciding layer boundaries; wiring AppContract entrypoints; adding module metadata and replies.

How do I install Cosmwasm Contract in Claude Code?

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

How do I install Cosmwasm Contract in Codex?

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

Can I use Cosmwasm Contract 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 cosmwasm-contract -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cosmwasm-contract, .gemini/skills/cosmwasm-contract, .github/skills/cosmwasm-contract and .opencode/skills/cosmwasm-contract in your project.

What does Cosmwasm Contract need to run?

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

Does Cosmwasm Contract 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 Cosmwasm Contract 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 Cosmwasm Contract use?

Cosmwasm Contract 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 Cosmwasm Contract use?

About 1.2k tokens (SKILL.md is roughly 4.9k 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 Cosmwasm Contract?

Skills that share tags, products or a category with Cosmwasm Contract: Rust Hygiene Audit (tsz-org/tsz, 577 stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Ponytail (DavidObando/gsharp, 565 stars) and Rust Best Practices (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cosmwasm Contract?

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 October 9, 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.