Soroban Contract Audit
sickn33/agentic-awesome-skills
Soroban smart contract security audit register: authorization checks, panic pathways, integer overflows, and storage footprint verification for Stellar.
Trigger Pattern Any env.invokecontract() or env.tryinvokecontract() detected in contract - Inject Into Breadth agents
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .claude/skills/external-precondition-audit && rm -rf skills-srcUse ~/.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/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .claude/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-auditType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .agents/skills/external-precondition-audit && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .agents/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .cursor/skills/external-precondition-audit && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .cursor/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PlamenTSV/plamen.git --path agents/skills/soroban/external-precondition-audit--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .gemini/skills/external-precondition-audit && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .gemini/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PlamenTSV/plamen external-precondition-auditInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .github/skills/external-precondition-audit && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .github/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PlamenTSV/plamen --skill external-precondition-audit -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PlamenTSV/plamen external-precondition-audit --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/skills/soroban/external-precondition-audit .opencode/skills/external-precondition-audit && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "external-precondition-audit" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/external-precondition-audit into .opencode/skills/external-precondition-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "external-precondition-audit", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
external-precondition-auditTrigger Pattern Any env.invokecontract() or env.tryinvokecontract() detected in contract - Inject Into Breadth agents
External Precondition Audit is an agent skill from PlamenTSV/plamen. Trigger Pattern Any env.invokecontract() or env.tryinvokecontract() detected in contract - Inject Into Breadth agents
Its SKILL.md is about 2.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 Security, covering Smart contract auditing. It works with Stellar. The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 795962b. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
External Precondition Audit loads about 2.2k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 999 words of instructions outside code blocks.
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.
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.
The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 999 words, ~2,201 tokens.
.claude/skills/external-precondition-audit/SKILL.md (or your agent's skills folder).Trigger Pattern: Any
env.invoke_contract()orenv.try_invoke_contract()detected in contract Inject Into: Breadth agents Finding prefix:[EPA-N]Rules referenced: R1, R4, R8, R10, R16 Constraint: Interface-level inference only — no production fetch required
invoke_contract|try_invoke_contract|contractimport!|ContractClient|
external_contract|token::Client|token_contract|SorobanInterfaceFor every external contract the protocol invokes:
| External Contract | Address Source | Hardcoded? | Validated Against Constant? | Upgradeable? | Risk if Substituted |
|---|
Address validation check: For each invoke_contract call, is the target contract address:
Upgradeability assessment: Soroban contracts can be upgraded via update_current_contract_wasm() if the contract has an upgrade entry point. Is the external contract upgradeable?
contractimport! macro risk: Contracts imported via contractimport! bind the caller to the interface of the external contract at compile time. If the external contract upgrades and changes its interface, calls will fail. More critically, if the imported interface definition does not match the deployed contract's actual interface, calls may succeed with incorrect semantics (wrong argument order, wrong return type interpretation).
Soroban provides two call modes with fundamentally different error semantics:
| Call Site | Mode Used | Error Handled? | On Panic: | Risk |
|---|---|---|---|---|
| {location} | invoke_contract / try_invoke_contract | YES/NO | propagates trap / returns Err | {describe} |
invoke_contract (trap mode): If the external call fails (panic, host error), the ENTIRE transaction reverts. This is safe against partial state corruption but means any external contract can DoS the protocol by reverting.
try_invoke_contract (Result mode): Returns Ok(val) or Err(...). The calling contract's state changes are NOT automatically reverted on error — the calling contract must handle the error explicitly and decide whether to revert or continue.
Critical check for try_invoke_contract:
Err branch handled explicitly?Attack pattern (partial state corruption):
try_invoke_contract to external tokenErr)| Call Site | Return Type | Protocol Uses Return Value? | Failure Mode if Unexpected |
|---|
For each return value:
try_invoke_contract returns Err? Does the protocol handle this case explicitly?| Protocol State | Depends on External Contract State | External State Can Change Without Our Knowledge? |
|---|
For each dependency: model what happens when the external contract state changes between our contract's read and use.
Soroban-specific concerns:
| Oracle Address | Type | Confidence Checked? | Staleness Checked? | Address Validated? |
|---|
Checks:
timestamp field against env.ledger().timestamp() with max age)Tag: [TRACE:oracle read → price={X} at timestamp={T} vs current={U} → {accepted/rejected}]
After each external call that modifies storage:
| External Call | Creates/Extends Storage? | Who Pays TTL Extension Fees? | TTL Sufficient? |
|---|
Soroban-specific: External contracts may create or extend storage entries on behalf of the calling contract. Storage entries have TTLs; if not extended, data expires and is wiped. If an external call creates state that the calling contract later depends on, but the TTL is not extended, that state may vanish.
XLM reserve for contract instances: Each deployed contract and each storage entry requires XLM held in reserve. If the protocol relies on an external contract maintaining state, verify that the external contract's reserve is adequate and not drainable by an attacker.
**ID**: [EPA-N]
**Verdict**: CONFIRMED / PARTIAL / REFUTED / CONTESTED
**Step Execution**: (see checklist below)
**Rules Applied**: [R1:___, R4:___, R8:___, R10:___]
**Severity**: Critical/High/Medium/Low/Info
**Location**: src/{file}.rs:LineN
**Title**: {missing call validation / partial state on try_invoke error / stale external state}
**Description**: {specific issue with code reference}
**Impact**: {what attacker can achieve via the external call weakness}| Section | Required | Completed? | Notes |
|---|---|---|---|
| 1. External Call Target Inventory and Validation | YES | Address source for every invoke_contract | |
| 2. invoke_contract vs try_invoke_contract Error Handling | YES | Every try_invoke_contract error branch checked | |
| 3. Return Value Consumption | IF return value used | ||
| 4. State Dependency Mapping | YES | ||
| 4b. Oracle Data Quality Checks | IF oracle consumed | Price bounds, staleness, TTL expiry | |
| 5. XLM Reserve and Storage TTL | YES | Storage entries created by external calls |
If any step skipped, document valid reason (N/A, no external calls, immutable target with no state dependency).
© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agents/skills/soroban/external-precondition-audit of PlamenTSV/plamen.
Open the folder on GitHubat commit 795962b
External Precondition Audit 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| External Precondition Audit this skillPlamenTSV/plamen | 303 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Soroban Contract Auditsickn33/agentic-awesome-skills | 47k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Soroban Liquidity Poolsickn33/agentic-awesome-skills | 47k | 1 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Soroban Storage Ttl Lifecyclesickn33/agentic-awesome-skills | 47k | 1 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Soroban Token Mintersickn33/agentic-awesome-skills | 47k | 1 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Stellar DevVelaPayments/vela-payments | 131 | — | ~1.8k | Automated safety check: Pass | MIT |
sickn33/agentic-awesome-skills
Soroban smart contract security audit register: authorization checks, panic pathways, integer overflows, and storage footprint verification for Stellar.
sickn33/agentic-awesome-skills
Automated market maker liquidity pool register: constant-product invariant curves, swap fee tiers, and LP token shares for Soroban DeFi.
sickn33/agentic-awesome-skills
Soroban ledger state rent and TTL extension register: live state tracking, bump thresholds, rent fee reserves, and archive boundaries.
sickn33/agentic-awesome-skills
Soroban SEP-41 token contract architecture register: admin control, supply caps, metadata standard, and transfer event emissions on Stellar.
VelaPayments/vela-payments
End-to-end Stellar development playbook. An agent skill from VelaPayments/vela-payments.
Soneso/stellar-ios-mac-sdk
Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.
PlamenTSV/plamen
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…
PlamenTSV/plamen
Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)
PlamenTSV/plamen
Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents
Works with
Categories
Trigger Pattern Any env.invokecontract() or env.tryinvokecontract() detected in contract - Inject Into Breadth agents. External Precondition Audit is an agent skill from PlamenTSV/plamen.
External Precondition Audit fits situations like: pattern Any env.invokecontract(); env.tryinvokecontract() detected in contract - Inject Into Breadth agents.
Run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a claude-code`. Or copy the skill folder (agents/skills/soroban/external-precondition-audit in PlamenTSV/plamen) into .claude/skills/external-precondition-audit in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a codex`. Or copy the skill folder (agents/skills/soroban/external-precondition-audit in PlamenTSV/plamen) into .agents/skills/external-precondition-audit in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill external-precondition-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/external-precondition-audit, .gemini/skills/external-precondition-audit, .github/skills/external-precondition-audit and .opencode/skills/external-precondition-audit in your project.
SKILL.md names no scripts, command-line tools or credentials: External Precondition Audit is instructions for the agent only.
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.
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.
External Precondition Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with External Precondition Audit: Soroban Contract Audit (sickn33/agentic-awesome-skills, 47k stars), Soroban Liquidity Pool (sickn33/agentic-awesome-skills, 47k stars), Soroban Storage Ttl Lifecycle (sickn33/agentic-awesome-skills, 47k stars) and Soroban Token Minter (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.
Source: PlamenTSV/plamen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.