Ethereum Smart Contract Vulnerability Analysis
tradecatlabs/vibe-coding-cn
Runs Slither and Mythril against Solidity contracts to find reentrancy, overflow and access-control bugs before mainnet deployment, then triages and reports findings.
Trigger Pattern SEP-41 token patterns detected (approve/transfer/transferfrom/allowance/balance) - Inject Into Breadth agents, depth-token-flow, depth-edge-case
$ npx skills add PlamenTSV/plamen --skill sep41-token-safety -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PlamenTSV/plamen sep41-token-safety --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/sep41-token-safety .claude/skills/sep41-token-safety && 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 "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .claude/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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/sep41-token-safetyType 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 sep41-token-safety -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PlamenTSV/plamen sep41-token-safety --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/sep41-token-safety .agents/skills/sep41-token-safety && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .agents/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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 sep41-token-safety -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PlamenTSV/plamen sep41-token-safety --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/sep41-token-safety .cursor/skills/sep41-token-safety && 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 "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .cursor/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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/sep41-token-safety--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 sep41-token-safety -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PlamenTSV/plamen sep41-token-safety --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/sep41-token-safety .gemini/skills/sep41-token-safety && 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 "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .gemini/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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 sep41-token-safetyInstalls 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 sep41-token-safety -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/sep41-token-safety .github/skills/sep41-token-safety && 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 "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .github/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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 sep41-token-safety -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 sep41-token-safety --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/sep41-token-safety .opencode/skills/sep41-token-safety && 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 "sep41-token-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/soroban/sep41-token-safety into .opencode/skills/sep41-token-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sep41-token-safety", 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.
sep41-token-safetyTrigger Pattern SEP-41 token patterns detected (approve/transfer/transferfrom/allowance/balance) - Inject Into Breadth agents, depth-token-flow, depth-edge-case
Sep41 Token Safety is an agent skill from PlamenTSV/plamen. Trigger Pattern SEP-41 token patterns detected (approve/transfer/transferfrom/allowance/balance) - Inject Into Breadth agents, depth-token-flow, depth-edge-case
Its SKILL.md is about 2.5k 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 and Ethereum. The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.
6 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 rust and 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.
Sep41 Token Safety loads about 2.5k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 1,045 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). 1,045 words, ~2,479 tokens.
.claude/skills/sep41-token-safety/SKILL.md (or your agent's skills folder).Trigger Pattern: SEP-41 token patterns detected (
approve/transfer/transfer_from/allowance/balance) Inject Into: Breadth agents, depth-token-flow, depth-edge-case Finding prefix:[ST-N]Rules referenced: R4, R5, R10, R11, R13, R15
SEP-41 is Soroban's token interface standard, analogous to ERC-20. It introduces Soroban-specific behaviors that differ from ERC-20: allowances use Temporary storage with expiration_ledger, the approve function can be front-run similarly to ERC-20, and the Stellar Asset Contract (SAC) bridges Stellar classic assets into Soroban with additional accounting complexity.
The approve(from, spender, amount, expiration_ledger) function overwrites the current allowance without checking the existing value. This is the ERC-20 approve race condition, present identically in SEP-41:
| Token Contract | approve Guarded? | Guard Type | Effective? |
|---|---|---|---|
{contract} | YES/NO | require!(current == 0) / none | YES/NO |
Attack sequence:
Soroban-specific note: Soroban does not have a traditional mempool — transaction ordering is determined by validators, not fee-based priority. However, multi-operation transactions and DEX routing can create ordering dependencies. The race condition is lower likelihood than on EVM but the vulnerability exists.
Check for:
approve allow setting non-zero over non-zero without an intermediate zero-set step?increaseAllowance / decreaseAllowance equivalents) to safely adjust allowances?SEP-41 allowances include an expiration_ledger parameter stored alongside the allowance amount. When the ledger passes expiration_ledger, the allowance is treated as zero. Verify expiry is handled correctly:
| Contract | Allowance Expiry Checked Before Use? | Expired Allowance Returns 0 or Panics? | Protocol Communicates Expiry to Users? |
|---|---|---|---|
{contract} | YES/NO | {behavior} | YES/NO |
Allowance storage: SEP-41 standard stores allowances in Temporary storage with TTL linked to expiration_ledger. When expiration_ledger passes, the Temporary entry may be pruned, and the allowance() call returns zero automatically.
Checks:
transfer_from now fails?expiration_ledger validated to be in the future when approve is called? Setting expiration_ledger in the past silently creates an already-expired allowanceEdge case: expiration_ledger = 0 behavior — verify whether the token contract treats 0 as "no expiry" or "expired at ledger 0" (already expired). Inconsistency here could cause silent allowance failures.
SEP-41 transfer(from, to, amount) requires from.require_auth(). transfer_from(spender, from, to, amount) requires spender.require_auth() and checks the allowance. Trace auth through the contract's transfer chains:
| Calling Function | Transfer Type | Auth Address | require_auth Called? | Correct Subject? |
|---|---|---|---|---|
{fn} | transfer / transfer_from | {from or spender} | YES/NO | YES/NO |
Patterns to check:
token.transfer(user, contract, amount) on behalf of a user — does it call user.require_auth() first, or does it rely on the token contract to enforce it?token.transfer inside a invoke_contract chain, is the AuthorizedInvocation tree constructed to include the token transfer?transfer_from where the spender is the calling contract itself (valid for vault patterns) — is the allowance actually set, or does the contract assume it already is?The Stellar Asset Contract (SAC) wraps Stellar classic XLM and issued assets as SEP-41 tokens. Contracts that interact with SAC face unique considerations:
| Concern | Addressed? | Evidence |
|---|---|---|
| SAC balance includes trust line state (frozen/unauthorized) | YES/NO | {fn:line or NONE} |
| Classic Stellar operations affecting SAC balance not reflected in Soroban state | YES/NO | {fn:line or NONE} |
| Clawback feature of issued assets handled | YES/NO | {fn:line or NONE} |
| Issuer authorization revocation handled | YES/NO | {fn:line or NONE} |
| Token address permanence (classic re-issuance / migration) | YES/NO | {fn:line or NONE} |
SAC-specific risks:
transfer to that account fails silently or panics. Contracts that assume all transfers succeed need to handle this.clawback to reduce a Soroban contract's balance without any Soroban transaction. This means a contract's balance() can decrease between two Soroban transactions with no on-Soroban event.When a contract accepts token deposits, it should verify the actual balance received rather than trusting the amount parameter:
| Function | Reads Balance After Transfer? | Trusts Amount Parameter? | Fee-on-Transfer Risk? |
|---|---|---|---|
{fn} | YES/NO | YES/NO | YES/NO |
Note: Standard Soroban tokens (non-SAC) do not support fee-on-transfer. However:
Safe pattern:
let balance_before = token.balance(env.current_contract_address());
token.transfer_from(&spender, &from, &env.current_contract_address(), &amount);
let balance_after = token.balance(env.current_contract_address());
let received = balance_after - balance_before;
// Use `received` not `amount` for accountingburn(from, amount) and burn_from(spender, from, amount) must enforce proper authorization:
| Function | Auth Check | Auth Subject | Correct? |
|---|---|---|---|
burn call at {file:line} | from.require_auth() | from | YES/NO |
burn_from call at {file:line} | spender.require_auth() + allowance check | spender | YES/NO |
Checks:
burn without require_auth on from → anyone can burn any user's tokensburn_from without allowance check → bypasses the approval mechanismburn to destroy tokens: verify they call from.require_auth() or that from is the calling contract itself (self-burn is always permitted)burn combined with minting: verify the net supply change is intentional and correctly accounted**ID**: [ST-N]
**Severity**: [Critical if token theft, High if allowance bypass or burn exploit, Medium if expiry/SAC risk, Low if approve race]
**Step Execution**: ✓1,2,3,4,5,6 | ✗(reasons) | ?(uncertain)
**Rules Applied**: [R4:✓/✗, R5:✓/✗, R10:✓/✗, R11:✓/✗, R13:✓/✗, R15:✓/✗]
**Location**: src/{contract}.rs:LineN
**Title**: {Approve race / Expired allowance / Auth bypass / SAC risk / Burn exploit} in `{fn_name}`
**Description**: [Specific SEP-41 interaction flaw with code reference]
**Impact**: [Token theft / silent transfer failure / incorrect accounting / unauthorized burn]| Section | Required | Completed? | Notes |
|---|---|---|---|
| 1. Approve Race Condition | YES | ✓/✗/? | All approve call sites |
| 2. Allowance Expiry | YES | ✓/✗/? | All transfer_from paths and approve expiration_ledger handling |
| 3. Transfer Auth Propagation | YES | ✓/✗/? | All transfer and transfer_from invocations |
| 4. SAC Interaction | IF SAC tokens are involved | ✓/✗(N/A)/? | Trust line, clawback, balance caching |
| 5. Balance Verification | IF contract accepts deposits | ✓/✗(N/A)/? | Balance-before vs balance-after pattern |
| 6. Burn Authorization | IF burn or burn_from present | ✓/✗(N/A)/? | Auth on all burn call sites |
© 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/sep41-token-safety of PlamenTSV/plamen.
Open the folder on GitHubat commit 795962b
Sep41 Token Safety 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 |
|---|---|---|---|---|---|---|
| Sep41 Token Safety this skillPlamenTSV/plamen | 303 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Ethereum Smart Contract Vulnerability Analysistradecatlabs/vibe-coding-cn | 17k | 1 repos | ~738 | Automated safety check: Pass | Apache-2.0 | |
| 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 |
tradecatlabs/vibe-coding-cn
Runs Slither and Mythril against Solidity contracts to find reentrancy, overflow and access-control bugs before mainnet deployment, then triages and reports findings.
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.
forefy/.context
Comprehensive smart contract security audit framework with multi-expert analysis.
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
Categories
Trigger Pattern SEP-41 token patterns detected (approve/transfer/transferfrom/allowance/balance) - Inject Into Breadth agents, depth-token-flow, depth-edge-case. Sep41 Token Safety is an agent skill from PlamenTSV/plamen.
Sep41 Token Safety fits situations like: pattern SEP-41 token patterns detected (approve/transfer/transferfrom/allowance/balance) - Inject Into Breadth agents; depth-token-flow; depth-edge-case.
Run `npx skills add PlamenTSV/plamen --skill sep41-token-safety -a claude-code`. Or copy the skill folder (agents/skills/soroban/sep41-token-safety in PlamenTSV/plamen) into .claude/skills/sep41-token-safety in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PlamenTSV/plamen --skill sep41-token-safety -a codex`. Or copy the skill folder (agents/skills/soroban/sep41-token-safety in PlamenTSV/plamen) into .agents/skills/sep41-token-safety 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 sep41-token-safety -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sep41-token-safety, .gemini/skills/sep41-token-safety, .github/skills/sep41-token-safety and .opencode/skills/sep41-token-safety in your project.
SKILL.md names no scripts, command-line tools or credentials: Sep41 Token Safety 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.
Sep41 Token Safety 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.5k tokens (SKILL.md is roughly 9.9k 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 Sep41 Token Safety: Ethereum Smart Contract Vulnerability Analysis (tradecatlabs/vibe-coding-cn, 17k stars), Soroban Contract Audit (sickn33/agentic-awesome-skills, 47k stars), Soroban Liquidity Pool (sickn33/agentic-awesome-skills, 47k stars) and Soroban Storage Ttl Lifecycle (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.