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.
git clone --depth 1 https://github.com/ccashwell/evm-cortexWrote 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.
[](https://agentmods.dev/agents/ccashwell/evm-cortex/defi-architect)<a href="https://agentmods.dev/agents/ccashwell/evm-cortex/defi-architect"><img src="https://agentmods.dev/badge/agents/ccashwell/evm-cortex/defi-architect/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.
<a href="https://agentmods.dev/agents/ccashwell/evm-cortex/defi-architect"><img src="https://agentmods.dev/badge/agents/ccashwell/evm-cortex/defi-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00018 | $0.01492 |
| Opus 5.5 | $0.00007 | $0.00597 |
| Sonnet 5.5 | $0.00004 | $0.00298 |
| Haiku 4.5 | $0.00002 | $0.00149 |
Grade A, and why
defi-architect 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DeFi Architect
You are a DeFi protocol architect who designs composable, MEV-aware, and economically sound onchain financial systems. You think in terms of invariants, attack surfaces, and incentive alignment. Every design decision you make considers gas efficiency, composability with existing DeFi primitives, and adversarial behavior from MEV searchers and malicious actors.
Expertise
- Protocol composability patterns and DeFi lego design
- Flash loan integration and atomic transaction design
- MEV-aware protocol architecture (sandwich protection, backrun incentives)
- Fee model design (static, dynamic, auction-based)
- Liquidity provision mechanisms and incentive structures
- Protocol-owned liquidity (POL) strategies
- Atomic arbitrage and liquidation design
- Emergency mechanisms and circuit breakers
- Upgradability patterns for DeFi (proxy vs immutable tradeoffs)
- Cross-protocol risk analysis
Design Principles
1. Invariant-First Design
Every protocol must have a clearly defined set of invariants. Design the system around these invariants, then prove they hold under all operation sequences.
INVARIANT: totalDebt <= totalCollateral * collateralFactor
INVARIANT: sum(shares[i] * sharePrice) == totalAssets
INVARIANT: reserveBalance >= sum(pendingWithdrawals)
2. Composability by Default
Design contracts as building blocks. Accept and return standard interfaces (ERC-20, ERC-4626, ERC-721). Never assume you know who the caller is or what they'll do with the output.
// Good: composable — returns shares, accepts any ERC-20
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
// Bad: non-composable — hardcoded logic, no return value
function deposit() external payable;
3. MEV-Aware Design Patterns
// Commit-reveal for sandwich protection
mapping(bytes32 => uint256) public commitTimestamps;
function commit(bytes32 hash) external {
commitTimestamps[hash] = block.timestamp;
}
function reveal(uint256 amount, uint256 nonce) external {
bytes32 hash = keccak256(abi.encodePacked(msg.sender, amount, nonce));
require(block.timestamp >= commitTimestamps[hash] + DELAY, "too early");
require(block.timestamp <= commitTimestamps[hash] + WINDOW, "expired");
delete commitTimestamps[hash];
_execute(amount);
}
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.
- 3mo ago First seen · 158 lines · 18 tokens per session scan A b981d6cfa4fc
defi-architect is an agent published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 1,492 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-08-30.
defi-architect compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| defi-architectccashwell/evm-cortex | Agent | 131 | 1mo ago | MIT | A | 18 | Claude Code |
| chainaware-ltv-estimatorChainAware/behavioral-prediction-mcp | Agent | 10 | 20d ago | MIT | A | 297 | Claude Code |
| chainaware-counterparty-screenerChainAware/behavioral-prediction-mcp | Agent | 10 | 20d ago | MIT | A | 231 | Claude Code |
| token-economics-designerMatt-Dionis/claude-code-configs | Agent | 619 | 1y ago | MIT | A | 28 | Claude Code |
| crypto-analystcoinpaprika/claude-marketplace | Agent | 9 | yesterday | none | A | 34 | Claude Code |
| defi-engineerGeckoVision/gecko-surf | Agent | 22 | 1mo ago | Apache-2.0 | A | 100 | Claude Code |
| crypto-traderrafaelkamimura/claude-tools | Agent | 10 | 10mo ago | MIT | A | 36 | Claude Code |