arch-defi

arch-defi is a skill for Claude Code from alvin-reyes/better-agentic-ide. It costs 32 tokens per session (424 once invoked), scanned A, original, MIT.

A decentralised-finance design guide for systems such as automated market makers, lending markets, vaults and derivatives. It considers price feeds, forced position closures and ways the system could be attacked.

In plain words
What is it for?
Use it to compare DeFi mechanisms, plan their risk controls and document decisions about how the protocol should work.
Why use it?
It helps examine economic and security risks before building a financial protocol on a blockchain.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to compare DeFi mechanisms, plan their risk controls and document decisions about how the protocol should work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alvin-reyes/better-agentic-ide/arch-defi
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.

Any agent
npx skills add alvin-reyes/better-agentic-ide --skill arch-defi
Clone the repo
git clone --depth 1 https://github.com/alvin-reyes/better-agentic-ide

Made for: Claude Code.

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 arch-defi

README.md
[![agentmods](https://agentmods.dev/badge/skills/alvin-reyes/better-agentic-ide/arch-defi/github.svg)](https://agentmods.dev/skills/alvin-reyes/better-agentic-ide/arch-defi)
Your own site
<a href="https://agentmods.dev/skills/alvin-reyes/better-agentic-ide/arch-defi"><img src="https://agentmods.dev/badge/skills/alvin-reyes/better-agentic-ide/arch-defi/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 arch-defi

Your own site · 80×15
<a href="https://agentmods.dev/skills/alvin-reyes/better-agentic-ide/arch-defi"><img src="https://agentmods.dev/badge/skills/alvin-reyes/better-agentic-ide/arch-defi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 424 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.
Origin unknown 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.00032 $0.00424
Opus 5.5 $0.00013 $0.00170
Sonnet 5.5 $0.00006 $0.00085
Haiku 4.5 $0.00003 $0.00042

Measured today against content hash e263827d0356, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

arch-defi 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 today.

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.

claude-plugin/plugins/ade/skills/arch-defi/SKILL.md · 33 lines

What it actually says

Brainstorming Architect — DeFi Protocol Design

You are a brainstorming architect. We are designing, not coding — do not write or change application code unless I explicitly ask.

Start by asking up to five sharp questions about goals, users, constraints, scale, budget, timeline and risk tolerance. Do not propose anything until you understand what actually constrains the decision.

Then propose two or three genuinely different approaches — not one plan and two strawmen — and compare them in a table: complexity, cost, risk, time to ship, and what breaks first. Recommend one and explain why it wins for these constraints. Draw the recommended design as a mermaid diagram.

Challenge my assumptions and name what I have not considered. When we agree on a decision, record it as an ADR in .ade/context/decisions/ named NNNN-short-title.md with context, options considered, decision and consequences, and tell me the file path.

What you own

  • .ade/context/decisions/**

Boundaries

Building the thing belongs to Dev, and the build-ready component design belongs to the Architect — you stop at the decision and its rationale. Shipping, environments and rollback belong to DevOps.

Do not jump to a recommendation before you have asked your questions, do not present variations of one idea as genuine alternatives, and do not start writing code because the discussion feels settled.

Focus

The core mechanism and its invariants, pricing and oracle design, liquidation and bad-debt handling, risk parameters, fees and incentives, composability with other protocols, economic and flash-loan attack surfaces, MEV exposure, governance and upgrade control, and what must be proven or audited before launch.

The topic: $ARGUMENTS

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. today First seen · 33 lines · 32 tokens per session scan A e263827d0356

Subscribe to this mod's changes

arch-defi is a skill published in the GitHub repository alvin-reyes/better-agentic-ide (85 stars, last pushed 9d ago), licensed MIT. It adds 32 tokens to every session and 424 once invoked, about $0.0001 per session on Opus 5.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-10-26.

Related

Other skills, from other repositories

travel-expense-audit

A travel-expense review workflow that checks reimbursement claims against policy handbooks and rate tables. It covers items such as hotel, transport, and daily meal allowances.

vixues/LeAgent · 51 tokens

cost-efficiency-analyzer

Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for "are we spending too…

awslabs/agentcore-samples · 98 tokens

multi-quarter-trend-analysis

Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for "how are we trending", "show me the trend", "track performance over time", "quarter over quarter…

awslabs/agentcore-samples · 82 tokens

executive-financial-briefing

Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or "how is the business doing". Covers the full P&L picture in one page. Also…

awslabs/agentcore-samples · 95 tokens

quarterly-kpi-calculator

Calculates quarterly financial KPIs from P&L data. P&L figures can be provided directly by the user or fetched from the financial data MCP server. Use when the user wants KPI calculations such as Gross Margin %, EBITDA Margin %, Operating Expense Ratio, or Revenue Growth % QoQ. Also use for quarterly performance…

awslabs/agentcore-samples · 84 tokens

revenue-growth-analyst

Deep-dives into revenue growth patterns, growth rates, and growth quality. Use when the user asks specifically about revenue growth, top-line performance, sales growth, revenue acceleration or deceleration, growth trajectory, or wants to understand what is driving revenue changes. NOT for cost or margin analysis …

awslabs/agentcore-samples · 72 tokens