smart-contracts

A guide to building Stellar smart contracts in Rust. Stellar smart contracts are programs that run on the Stellar blockchain, and Soroban is the name still used by parts of their Rust toolkit.

In plain words
What is it for?
Use it to create, test, review, deploy, or debug Stellar contracts, including tokens, authorization, storage, upgrades, and finance applications.
Why use it?
It explains the project setup and points to guidance for contract behavior, testing, security, and troubleshooting.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/stellar/stellar-dev-skill/smart-contracts
Any agent
npx skills add stellar/stellar-dev-skill --skill smart-contracts
Clone the repo
git clone --depth 1 https://github.com/stellar/stellar-dev-skill

Made for: Claude Code, Codex.

Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00151 $0.02228
Opus 5 $0.00076 $0.01114
Sonnet 5 $0.00030 $0.00446
Haiku 4.5 $0.00015 $0.00223

Measured 2d ago against content hash 2561ecf13609, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 222 lines

How it starts

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

Stellar Smart Contracts

Guide for building Stellar smart contracts in Rust. Smart contracts on Stellar were formerly branded "Soroban" — the platform name is retired, but the Rust SDK (soroban-sdk) and several tool names keep the prefix.

This file covers setup and the core workflow. The deep dives live alongside it — read the file that matches the task:

Task File
Storage/TTL, authorization, constructors, cross-contract calls, tokens, events, errors, upgrades, factories, governance/DeFi patterns, fees/resources, troubleshooting development.md
Unit, integration, fuzz, property, fork, and mutation testing testing.md
Security review, vulnerability classes, checklists, audit prep, tooling security.md

When to use this skill

  • Writing a Stellar smart contract in Rust
  • Setting up contract tests (any layer)
  • Reviewing a contract for security issues
  • Architecting upgradeable contracts, factories, custom accounts, or DeFi primitives
  • Debugging a contract-specific error (auth, storage, archival, resource limits)
  • Asset issuance, trustlines, and SAC deployment → ../assets/SKILL.md
  • Frontend/wallets that call your contract → ../dapp/SKILL.md
  • Chain data queries (RPC/Horizon) → ../data/SKILL.md
  • ZK verification (BLS12-381, Groth16, Circom/Noir/RISC Zero) → ../zk-proofs/SKILL.md
  • SEP/CAP standards and ecosystem links → ../standards/SKILL.md

Versions

This skill was written against protocol 27 (soroban-sdk v27, rs-soroban-env v27, stellar-cli v27). Version numbers in examples are illustrative — resolve the current ones from these sources rather than trusting any doc:

  • soroban-sdk major version tracks the protocol version (SDK 27 ↔ protocol 27). This rule outlives any specific release.
  • Latest SDK release: crates.io/crates/soroban-sdk (or cargo add soroban-sdk, which resolves it). Pre-releases (-rc.x) exist only during a protocol rollout and must be pinned with the exact version string; GitHub releases lists them with changelogs.
  • Networks upgrade by validator vote, testnet before mainnet — pin the SDK major matching the network you deploy to. Live protocol version: RPC getVersionInfo or Stellar Lab.
  • Numeric network limits quoted here are mainnet settings at time of writing; they change by vote — Stellar Lab's Network Limits page and stellar network settings --network mainnet show the live values.

Read the full file on GitHub · 222 lines

Files

What ships with it

3 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. 2d ago First seen · 222 lines · 151 tokens per session scan A 2561ecf13609

Subscribe to this mod's changes

smart-contracts is a skill published in the GitHub repository stellar/stellar-dev-skill (51 stars, last pushed 4d ago), licensed Apache-2.0. It adds 151 tokens to every session and 2,228 once invoked, about $0.0008 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

jolt

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

a16z/jolt · 15 tokens

pinocchio-development

Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework. Covers account validation, CPI patterns, optimization techniques, and migration from Anchor.

sendaifun/skills · 44 tokens

arcium

Build and debug encrypted Solana applications with Arcium — data stays private during computation, no single party sees it. Use when writing Arcis circuits (#[encrypted], #[instruction]), wiring Anchor programs with init/queuecomputation/callback flows, choosing Shared vs Mxe encrypted state, encrypting inputs with…

sendaifun/skills · 134 tokens

solana-development

Build, test, deploy, and audit Solana programs with Anchor or native Rust, and build with ZK Compression (Light Protocol). Use when developing Solana smart contracts, implementing token operations, optimizing compute, deploying to networks, auditing programs for vulnerabilities, or creating compressed tokens/PDAs.

tenequm/skills · 63 tokens

aider

Tari Ootle development instructions for Aider.

tari-project/tari-ootle · 12 tokens

tari-manifest

This skill should be used when the user asks to "write a manifest", "create a transaction manifest", "submit a transaction", "call a component method", "call a template function", "interact with a Tari component", "write Ootle manifest", "authenticate with wallet daemon", or needs to construct Tari Ootle transaction…

tari-project/tari-ootle · 80 tokens