CommunityProductivity & Collaborationgithub.com

lrafasouza/solana-peg-risk-skill

Claude Code skill: depeg-risk safety gate for Solana stablecoins & LSTs — assess peg health before integrating/listing and emit pasteable risk parameters. MIT.

Works withClaude Code~Codex CLI~Cursor
npx skills add lrafasouza/solana-peg-risk-skill

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

peg-risk — Collateral & Listing Safety Gate

This skill answers one question before you ship: is this pegged asset safe to integrate right now, and what parameters should govern it? It is a pre-integration safety gate — not a monitoring dashboard. The output is a pasteable RISK-PARAMS block (asset class, warn/refuse/liquidate thresholds in bps, oracle staleness bound, direction sensitivity) you can drop directly into lending protocol config, listing logic, or routing guards. The methodology is derived from a public, MIT-licensed peg-risk framework (github.com/lrafasouza/pegana-replay) that has been running in production on Solana mainnet since 2026-05-29.


Why this is not the same as adjacent tools

Other skills/toolsThis skill
Pyth / Switchboard skills — give you a priceJudges whether that price has broken peg relative to intrinsic value
Token-intel / rug scanners — mint, honeypot, holder safetyJudges the asset's peg mechanism risk (market-vs-intrinsic spread, NAV/CR)
jupiter-lend / kamino — a borrower's LTV / liquidation healthJudges the collateral asset's own peg integrity before you accept it

Operating Procedure

What you needGo to
Understand the 5 states and per-class thresholdspeg-states.md
Understand why naive depeg checks lie (and the 5 real guards)failure-modes.md
Get intrinsic + market prices for a specific asset classcomputing-spread.md
Run the full gate and produce a RISK-PARAMS verdictassess.md
Links to APIs, methodology source, operationalization pointerresources.md

Progressive Disclosure

  • peg-states.md — 8 asset classes, 5 states, per-class threshold tables (bps + CR path), constants, and how to recalibrate defaults per asset.
  • failure-modes.md — The 5 ways a naive depeg check lies, with the guard for each and the real mainnet incident that proved it.
  • computing-spread.md — How to compute intrinsic and market for each class using 2026 APIs (Pyth Hermes, Jupiter, Helius DAS, Sanctum, @solana/kit). Includes Tier 1 runnable adapters and Tier 2 on-chain-read recipes.
  • assess.md — The gate workflow: classify asset → pull spread → run classifier → emit VERDICT + pasteable RISK-PARAMS block. Includes a worked jitoSOL example.
  • resources.md — Canonical links to methodology source, Pyth, Helius, Jupiter, Sanctum, Switchboard, plus a 3-line "run this continuously" pointer.

Command & Agent

  • Command: /peg-assess <mint> — runs the gate end-to-end for a given mint address.
  • Agent: peg-risk-analyst (model: opus) — performs the full classification workflow.

This skill is read-only. All on-chain interactions are reads only. The skill never signs transactions, never sends funds, and never requests a private key. Always use your own HELIUS_API_KEY; the kit's bundled key returns 401. Thresholds in this skill are defaults derived from production data — treat them as starting points and recalibrate per asset.

Related Skills

microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelera

The Multi-Agent Custom Automation Engine Solution Accelerator is an AI-driven system that manages a group of AI agents to accomplish tasks based on user input. Powered by Microsoft Agent Framework, Azure Foundry, Azure Cosmos DB, and infrastructure services, it provides a reference application, allowing you to hit the ground running.

community

wshobson/hybrid-search-implementation

Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.

community

Varnan-Tech/opendirectory

AI Agent Skills built for GTM, Technical Marketing, and growth automation.

community

Textualize/textual

Python TUI framework used to build terminal interfaces showing agent thought-loops, tool status, and execution streams.

community

wshobson/scan

Scans the codebase to generate project-doc.md and AGENTS.md. Use when bootstrapping a new agent-driven repo, refreshing project documentation after architectural changes, or running a delta scan to detect drift. Runs a full scan on first use and a smart delta scan on subsequent runs. Uses understand-anything + context-mode when available, falls back to native tools otherwise. Only updates AGENTS.md on detected architectural changes with human confirmation.

community

Garenaof2462/browser-ops

Run browser tasks for OpenClaw with HITL control, incident recovery, and native browser ops automation

community