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 plausibleventures/lattice --skill economygit clone --depth 1 https://github.com/plausibleventures/latticeWrote 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/plausibleventures/lattice/economy)<a href="https://agentmods.dev/skills/plausibleventures/lattice/economy"><img src="https://agentmods.dev/badge/skills/plausibleventures/lattice/economy/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/plausibleventures/lattice/economy"><img src="https://agentmods.dev/badge/skills/plausibleventures/lattice/economy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00080 | $0.03751 |
| Opus 5 | $0.00040 | $0.01876 |
| Sonnet 5 | $0.00016 | $0.00750 |
| Haiku 4.5 | $0.00008 | $0.00375 |
Grade A, and why
economy 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 9d 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 — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Economy
The whole package is one idea: everything is linear between commits. Gates, milestones, purchases, nightfall and a stock hitting zero are the discontinuities, and every one of them is a boundary — an instant at which the caller re-enters. That is what makes one integration of fourteen hours equal to fifty thousand integrations of one second, and it is why offline progress and live play are the same code path rather than two that drift.
There is no tick, no clock and no state of its own. Every call that moves the anchor takes a
required epoch timestamp, so a frame delta has nowhere to go — and a builder who sees dt in
update() and reaches for it will find no signature to put it in. That refusal is the design.
A whole economy
import { asEpochMillis } from '@latticekit/core';
import {
advance, buildFlow, costOfNext, createFlow, defineEconomy,
elapsedSeconds, maxBuyable, project, zeroStocks,
} from '@latticekit/sim';
import type { CostCurve, Ledger } from '@latticekit/sim';
type Node = 'lamp' | 'coin';
type Gate = 'night';
let reach = 1; // a banked total: it changes only when the player acts
const eco = defineEconomy<Node, Gate>({
// `nodes` is the SAVE'S FIELD ORDER and it never changes. Append in v4 and every v1 save
// still deserializes with its fields where they were.
nodes: ['lamp', 'coin'],
gates: ['night'],
edges: [
// A SOURCE — no `from`. This is what an idle game's headline rate usually is: the thing
// that pays while the player owns zero of everything.
{ to: 'coin', per: 2, gate: 'night' },
// A plain producer, with a rate that is any expression you like as long as it is
// piecewise constant in time. `scale` is evaluated ONCE PER buildFlow and frozen.
{ from: 'lamp', to: 'coin', per: 0.5, scale: () => Math.sqrt(reach) },
],
});
const flow = createFlow(eco);
const view = zeroStocks(eco);
let ledger: Ledger<Node> = {
stocks: { lamp: 3, coin: 0 },
atMs: asEpochMillis(1_700_000_000_000),
};
let dark = false;
/** The game owns the calendar. ONE call site, greppable, and never reaching a tile or a hash. */
const epochNow = (): ReturnType<typeof asEpochMillis> => asEpochMillis(Date.now());
/** In `render` (or in `update` for a HUD): read the economy at an instant. Moves nothing. */
export function read(): number {
project(eco, ledger, flow, epochNow(), view);
return view.coin;
}
/** In an action handler: commit what is owed, THEN change the rate. */
function commit(atMs: ReturnType<typeof asEpochMillis>): void {
ledger = advance(eco, ledger, flow, elapsedSeconds(ledger, atMs), atMs);
}
export function nightfall(nowDark: boolean): void {
const atMs = epochNow();
commit(atMs); // a gate is a BOUNDARY, not a curve
dark = nowDark;
buildFlow(eco, ledger.stocks, { night: dark ? 1.7 : 1 }, flow);
}
const LAMP: CostCurve = { base: 12, growth: 1.3 };
export function buyLamp(): boolean {
const atMs = epochNow();
commit(atMs);
const price = costOfNext(LAMP, ledger.stocks.lamp);
if (ledger.stocks.coin < price) return false; // compare EXACTLY. No epsilon
ledger = {
stocks: { lamp: ledger.stocks.lamp + 1, coin: ledger.stocks.coin - price },
atMs: ledger.atMs,
};
reach += 1;
// `reach` moved and `scale` is sampled once per buildFlow — so this rebuild is not
// bookkeeping, it is the only thing that makes the new lamp pay.
buildFlow(eco, ledger.stocks, { night: dark ? 1.7 : 1 }, flow);
return true;
}
/** The shop's "buy max". Closed form: 4,000 owned costs what 4 owned costs. */
export function affordable(): number {
return maxBuyable(LAMP, ledger.stocks.lamp, view.coin, 1_000_000);
}
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.
- 9d ago First seen · 308 lines · 80 tokens per session scan A eb9c3d5cf934
economy is a skill published in the GitHub repository plausibleventures/lattice (37 stars, last pushed 17d ago), licensed MIT. It adds 80 tokens to every session and 3,751 once invoked, about $0.0004 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-30.
Other skills, from other repositories
phaser3-engineer
!cat skills/shared/game-visual-foundations.md 2>/dev/null || echo "=== Visual Foundations not loaded ===" !cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat skills/shared/protocols/input-validation.md 2>/dev/null || true !cat skills/shared/protocols/tool-efficiency.md 2>/dev/null || true !cat…
asset-audit
Audits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.
defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.
assets-get-data
Get asset data from the asset file in the Unity project — every serializable field and property. Supports token-saving path-scoped reads via paths or viewQuery. Use 'assets-find' to find the asset first.
gameobject-set-parent
Reparent a batch of GameObjects under a new parent in the currently opened Prefab or active Scene. Per-item failures are reported in the returned status string instead of aborting the batch. Use 'gameobject-find' to locate the GameObjects first.
unity-version-split
Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).