Agent skill

Rust Testing

by axone-protocol in axone-protocol/contracts

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

BSD-3-ClauseAuto-check passedTesting & QA

Install Rust Testing

skills CLI
$ npx skills add axone-protocol/contracts --skill rust-testing -a claude-code

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

GitHub CLI
$ gh skill install axone-protocol/contracts rust-testing --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/rust-testing .claude/skills/rust-testing && 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
rust-testing
GitHub stars
123
Token cost
~501 tokens
SKILL.md length
158 words
Files
3 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

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

  • Works in 6 steps: Isolate tests. Each test should set up… → Test contract behavior, not framework… → Assert exact errors when possible. → …
  • Adding unit tests
  • SKILL.md covers Coverage Targets, Minimum Cases to Cover, Running Tests and Viewing Coverage, plus 2 more sections
  • Calls cargo

What it does

Rust Testing is an agent skill from axone-protocol/contracts. Patterns for Rust testing in Axone CosmWasm contracts. Use when adding unit tests, integration tests, data-driven cases, or coverage-oriented test scenarios.

Its SKILL.md is about 500 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/integration-patterns.md` and `references/test-style.md`).

It sits in Testing & QA, covering Integration testing and Unit testing. 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

  • Adding unit tests
  • Integration tests
  • Data-driven cases
  • Coverage-oriented test scenarios

Example prompts

  • “Use the rust-testing skill to pattern for Rust testing in Axone CosmWasm contracts. An agent skill from axone-protocol/contracts”
  • “/rust-testing”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Isolate tests. Each test should set up its own environment.
  2. Test contract behavior, not framework internals.
  3. Assert exact errors when possible.
  4. Cover edge cases such as zero values, empty strings, and upper bounds.
  5. Prefer descriptive test names without a test_ prefix.
  6. Use tuple-driven cases for simple matrices and structs only when the case shape needs named fields.

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

    Shell commands in SKILL.md call:

    • cargo

    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

Rust Testing loads about 501 tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 43 tokens; SKILL.md has 158 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~501
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.8k

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). 158 words, ~501 tokens.

Download SKILL.mdSave it as .claude/skills/rust-testing/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
rust-testing
description
Patterns for Rust testing in Axone CosmWasm contracts. Use when adding unit tests, integration tests, data-driven cases, or coverage-oriented test scenarios.
license
BSD-3-Clause
metadata.author
axone.xyz
metadata.version
1.0

Rust Testing

Coverage Targets

ComponentTarget
Handlers100%
State operations100%
Error paths90%+
Message parsing80%+
Overall90%+

Minimum Cases to Cover

  • For handlers: cover the happy path, parameter variations, error paths, and resulting state changes.
  • For queries: cover empty state, populated state, pagination behavior, and non-existent items.
  • For state transitions: cover initial state, updates after execute, and persistence across operations.

Running Tests

bash
# Run all unit tests
cargo make test-unit

# Run all tests (includes integration)
cargo make test

# Run tests with coverage
cargo make test-coverage

# Run specific test
cargo test test_name -- --nocapture

Coverage output is written to lcov.info.

Viewing Coverage

bash
# Generate HTML report (requires lcov)
genhtml lcov.info --output-directory coverage/

# Or use cargo-llvm-cov directly
cargo llvm-cov --html --open

Test Design Rules

  1. Isolate tests. Each test should set up its own environment.
  2. Test contract behavior, not framework internals.
  3. Assert exact errors when possible.
  4. Cover edge cases such as zero values, empty strings, and upper bounds.
  5. Prefer descriptive test names without a test_ prefix.
  6. Use tuple-driven cases for simple matrices and structs only when the case shape needs named fields.

References

  • For cw-orch integration harness patterns and common integration scenarios, read integration-patterns.
  • For naming and data-driven test examples, read test-style.

© 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

SKILL.md and 2 other files (references) in .agents/skills/rust-testing of axone-protocol/contracts.

  • SKILL.md
  • references/integration-patterns.md
  • references/test-style.md

Open the folder on GitHubat commit 02724f3

Compare with similar skills

Rust Testing 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.

Rust Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust Testing this skillaxone-protocol/contracts123—~501Automated safety check: PassBSD-3-Clause
cargo-pgrx Commands and Testsyugabyte/yugabyte-db11k—~1.9kAutomated safety check: PassCustom licence
Testingstatic-web-server/static-web-server2.4k—~1.5kAutomated safety check: PassApache-2.0
Rust Testingkurealnum/dotfiles2906 repos~2.9kAutomated safety check: PassNone
Validationjosstei/maestro-orchestrate465—~2.3kAutomated safety check: PassApache-2.0
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0

Similar skills

  • cargo-pgrx Commands and Tests

    yugabyte/yugabyte-db

    Helps choose and run cargo-pgrx commands and decide whether a Rust test is a plain test or a pg_test, so code never crosses the Postgres boundary the wrong way.

    11k GitHub stars~1.9k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Testing

    static-web-server/static-web-server

    Write or review tests for the Static Web Server (SWS) project — unit tests, integration tests, test fixtures, and mocking strategies

    2.4k GitHub stars~1.5k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Rust Testing

    kurealnum/dotfiles

    Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage.

    290 GitHub starsUsed in 6 repos~2.9k tokens
    Testing & QAAuto-check passed
  • Validation

    josstei/maestro-orchestrate

    Cross-cutting validation methodology for verifying phase outputs and project integrity

    465 GitHub stars~2.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-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 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
  • API Doc Comments

    axone-protocol/contracts

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

    123 GitHub stars~849 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

Categories

Questions about Rust Testing

What does Rust Testing do?

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

When should I use Rust Testing?

Rust Testing fits situations like: adding unit tests; integration tests; data-driven cases; coverage-oriented test scenarios.

How do I install Rust Testing in Claude Code?

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

How do I install Rust Testing in Codex?

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

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

What does Rust Testing need to run?

Going by SKILL.md and its folder, Rust Testing needs the command-line tools its instructions call (cargo).

Does Rust Testing 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 Rust Testing 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 Rust Testing use?

Rust Testing 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 Rust Testing use?

About 501 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Rust Testing?

Skills that share tags, products or a category with Rust Testing: cargo-pgrx Commands and Tests (yugabyte/yugabyte-db, 11k stars), Testing (static-web-server/static-web-server, 2.4k stars), Rust Testing (kurealnum/dotfiles, 290 stars) and Validation (josstei/maestro-orchestrate, 465 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust Testing?

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.