smart-contracts

smart-contracts is a skill for Claude Code from rylsherdamz-rgb/stellar-forge. It costs 44 tokens per session (1,912 once invoked), scanned A, original, MIT.

A guide for building Stellar smart contracts in Rust with the Soroban SDK. Smart contracts are programs that run on a blockchain, and the guide covers their structure, storage, permissions, calls between contracts, events, errors, upgrades, and tests.

In plain words
What is it for?
Use it to set up Soroban projects, write contracts and SEP-41 tokens, manage storage and time-to-live, implement authorization and cross-contract calls, and create unit or integration tests.
Why use it?
It provides project patterns for implementing contract behavior and checking authorization, state changes, events, tokens, and other failure cases.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/deploy-contract.sh \.

Part of the stellar-forge plugin — 31 skills, 4 commands, 6 agents, 4 MCP servers shipped together

Good fit Use it to set up Soroban projects, write contracts and SEP-41 tokens, manage storage and time-to-live, implement authorization and cross-contract calls, and create unit or integration tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rylsherdamz-rgb/stellar-forge
agentmods
npx agentmods add skills/rylsherdamz-rgb/stellar-forge/smart-contracts

Made for: Claude Code.

Or install stellar-forge, the plugin that ships this one along with the rest of its 31 skills, 4 commands, 6 agents, 4 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smart-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/rylsherdamz-rgb/stellar-forge/smart-contracts/github.svg)](https://agentmods.dev/skills/rylsherdamz-rgb/stellar-forge/smart-contracts)
Your own site
<a href="https://agentmods.dev/skills/rylsherdamz-rgb/stellar-forge/smart-contracts"><img src="https://agentmods.dev/badge/skills/rylsherdamz-rgb/stellar-forge/smart-contracts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smart-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/rylsherdamz-rgb/stellar-forge/smart-contracts"><img src="https://agentmods.dev/badge/skills/rylsherdamz-rgb/stellar-forge/smart-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,912 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 263
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 236
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 238
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 241
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 289
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01912
Opus 5 $0.00022 $0.00956
Sonnet 5 $0.00009 $0.00382
Haiku 4.5 $0.00004 $0.00191

Measured 11d ago against content hash d58914cd06a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

smart-contracts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/smart-contracts/SKILL.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Smart Contracts (Soroban)

Source Files

File Contents
contracts/hello-world/src/lib.rs Minimal contract scaffold
contracts/hello-world/src/test.rs Unit + auth + event tests
contracts/token/src/lib.rs Full SEP-41 token
contracts/token/src/test.rs Token unit + integration tests

Testing Guide

Setup

#![cfg(test)]
extern crate std;
use soroban_sdk::{
    testutils::{Address as _, Events},
    Address, Env, String, Symbol,
};

Pattern 1: Unit Test with Setup Helper

Extract shared setup into a helper function:

fn setup() -> (Env, Address, Address, MyContractClient<'static>) {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let user = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin, 1000u32));
    let client = MyContractClient::new(&env, &contract_id);
    (env, admin, user, client)
}

#[test]
fn test_initial_state() {
    let (_, _, _, client) = setup();
    assert_eq!(client.get_count(), 0);
}

Pattern 2: Auth Testing (without mock_all_auths)

Test that only authorized callers can invoke privileged functions:

#[test]
fn test_auth_required() {
    let env = Env::default();
    // Do NOT call mock_all_auths() — test auth failures
    let admin = Address::generate(&env);
    let attacker = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin,));
    let client = MyContractClient::new(&env, &contract_id);

    let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
        client.admin_only(&attacker); // attacker has no auth
    }));
    assert!(result.is_err());
}

#[test]
fn test_auth_passes() {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin,));
    let client = MyContractClient::new(&env, &contract_id);

    client.admin_only(&admin); // should not panic
}

Read the full file on GitHub · 291 lines

Files

What ships with it

27 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 291 lines · 44 tokens per session scan A d58914cd06a1

Subscribe to this mod's changes

smart-contracts is a skill published in the GitHub repository rylsherdamz-rgb/stellar-forge (17 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,912 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

edge-python

Write, run, test and package Edge Python programs with the edge CLI. Use when editing .py files in an Edge Python project or when the user asks for Edge Python code.

dylan-sutton-chavez/edge-python · 39 tokens

klever-dev

End-to-end Klever blockchain development — smart contracts (Rust/WASM), transaction building (@klever/connect, klever-go-sdk), deployment via ksc + koperator, and on-chain interaction via MCP tools. Use when the task involves KLV, KDA tokens, klv1 addresses, Klever smart contracts, or Klever node/API interaction.

klever-io/mcp-klever-vm · 76 tokens

solana-dev

Solana development: Anchor and Pinocchio programs, Kit clients, wallet flows, testing. Use when building a Solana dapp or program (e.g. write Anchor escrow, create SPL token, wallet-standard login, debug PDA, deploy to devnet).

Starchild-ai-agent/official-skills · 57 tokens

jolt

Wrap a Rust function in a Jolt zero-knowledge proof.

a16z/jolt · 15 tokens

solana

Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…

quicknode/solana-finance-claude-plugin · 76 tokens

cargo-fuzz

Sets up and runs cargo-fuzz, the standard fuzzing tool for Cargo-based Rust projects. Covers cargo fuzz init, the nightly toolchain requirement, fuzztarget! harnesses, Arbitrary-derived structured inputs, sanitizer options, cargo fuzz coverage, and reproducing a crash artifact. Use when fuzzing a Rust crate, writing a…

trailofbits/skills · 90 tokens