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.
npx skills add gblinproject/gblin-treasury-risk-regime --skill agent-self-fundinggit clone --depth 1 https://github.com/gblinproject/gblin-treasury-risk-regimeWrote 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/skills/gblinproject/gblin-treasury-risk-regime/agent-self-funding)<a href="https://agentmods.dev/skills/gblinproject/gblin-treasury-risk-regime/agent-self-funding"><img src="https://agentmods.dev/badge/skills/gblinproject/gblin-treasury-risk-regime/agent-self-funding/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/skills/gblinproject/gblin-treasury-risk-regime/agent-self-funding"><img src="https://agentmods.dev/badge/skills/gblinproject/gblin-treasury-risk-regime/agent-self-funding.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.00052 | $0.01273 |
| Opus 5 | $0.00026 | $0.00636 |
| Sonnet 5 | $0.00010 | $0.00255 |
| Haiku 4.5 | $0.00005 | $0.00127 |
Grade A, and why
agent-self-funding 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 12d 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 — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Self-Funding AI Agent Architecture
When this skill applies
Trigger when the user describes:
- "Build an agent that pays for its own hosting"
- "Self-sustaining AI agent"
- "Agent that earns and reinvests"
- "Make my bot economically viable"
- "Autonomous economic loop"
The core loop
A self-funding agent has three phases that cycle continuously:
EARN (x402 endpoint) → PRESERVE (treasury) → SPEND (operational costs)
↑ ↓
└──────────── repeat ─────────────────────────┘
If EARN > SPEND over a rolling window, the agent grows. If SPEND > EARN, it dies (treasury depletes to zero).
Minimum economic viability
Before writing code, calculate whether the agent can be viable:
function isViable(params: {
pricePerCall: number;
expectedCallsPerDay: number;
hostingCostPerDay: number;
llmCostPerCall?: number;
txFeesPerDay?: number;
}): { viable: boolean; marginPerDay: number; daysToBreakeven: number } {
const dailyRevenue = params.pricePerCall * params.expectedCallsPerDay;
const dailyVariableCost = (params.llmCostPerCall || 0) * params.expectedCallsPerDay;
const dailyFixedCost = params.hostingCostPerDay + (params.txFeesPerDay || 0);
const marginPerDay = dailyRevenue - dailyVariableCost - dailyFixedCost;
return {
viable: marginPerDay > 0,
marginPerDay,
daysToBreakeven: marginPerDay > 0 ? params.hostingCostPerDay / marginPerDay : Infinity,
};
}
Example viability check:
const check = isViable({
pricePerCall: 0.01,
expectedCallsPerDay: 50,
hostingCostPerDay: 0, // Vercel free tier
llmCostPerCall: 0.002,
txFeesPerDay: 0.05,
});
// → { viable: true, marginPerDay: 0.35, daysToBreakeven: 0 }
If marginPerDay < $0.10, the agent is too marginal to survive temporary outages or LLM price changes. Aim for marginPerDay > $0.50 minimum.
Architecture
self-funding-agent/
├── src/pages/api/
│ ├── service.ts # x402-paywalled endpoint (REVENUE)
│ ├── cron.ts # Treasury management (PRESERVE)
│ └── stats.ts # Public dashboard data
├── src/lib/
│ ├── x402-paywall.ts # Payment middleware
│ ├── treasury.ts # Auto-invest / auto-redeem logic
│ └── service-logic.ts # The actual value-add of the agent
└── vercel.json # Cron schedule
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.
- 12d ago First seen · 135 lines · 52 tokens per session scan A a93b974fe2bb
agent-self-funding is a skill published in the GitHub repository gblinproject/gblin-treasury-risk-regime (1 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 1,273 once invoked, about $0.0003 per session on Opus 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-31.
Other skills, from other repositories
wealthville
Score Solana and EVM liquidity pools before providing liquidity. Returns a 0-100 pool score, an ENTER/HOLD/EXIT/REDUCE/AVOID verdict with calibrated confidence, and a public miss-inclusive track record. Use when a user asks whether a pool is worth LPing into, which pools currently look best, or how the scores have…
pump-swarm
Coordinated multi-wallet trading on Pump.fun.
backtest
Test trading strategies on historical data with Monte Carlo simulation.
bridge
Cross-chain token transfers using Wormhole and CCTP.
hyperliquid
Hyperliquid L1 perps DEX (69% market share).
bags
Bags.fm - Complete Solana token launchpad with creator monetization.