Borrowing it
Nothing to install: this file belongs to sophonfinance-wq/finance-automation-portfolio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sophonfinance-wq/finance-automation-portfolio/main/.claude/skills/build-loop/SKILL.mdgit clone --depth 1 https://github.com/sophonfinance-wq/finance-automation-portfolioWrote 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/sophonfinance-wq/finance-automation-portfolio/build-loop)<a href="https://agentmods.dev/skills/sophonfinance-wq/finance-automation-portfolio/build-loop"><img src="https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/build-loop/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/sophonfinance-wq/finance-automation-portfolio/build-loop"><img src="https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/build-loop.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.00047 | $0.00580 |
| Opus 5.5 | $0.00019 | $0.00232 |
| Sonnet 5.5 | $0.00009 | $0.00116 |
| Haiku 4.5 | $0.00005 | $0.00058 |
Grade A, and why
build-loop 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 2mo 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 — 19 lines — stays where its author put it; the contents beside it link to each section on GitHub.
How to Build a Loop (house methodology)
Reference implementations: surplus_engine/loop.py (human-gated), close_engine/loop.py (autonomous+quarantine), recon_engine/loop.py (materiality), brain_engine/loop.py (verbatim-or-refuse), triangulate/loop.py (arithmetic-vs-judgment).
Recipe
- Scout the engine first: find the SENSOR (an existing independent check that yields named breaks) and the AUTHORITY (a deterministic re-derivation from the seeded source of record). If no sensor exists (brain case), build one that compares stored state to source.
- Pick the gate policy from the domain's discipline — never copy another engine's. Ask: what is this system entitled to decide on its own? What must it refuse to touch (quarantine/halt/escalate)?
- Loop core: while breaks remain and turns < budget: pick the EARLIEST failing scope (period/category/account/meeting/cell), resync it to authority, book every field change as an Adjustment, re-run the sensor. Frozen dataclasses ->
dataclasses.replace; mutable -> setattr. - Demo faults: 3-5 realistic drift injectors, each with a root-cause story, targeting scopes chosen dynamically from the baseline (don't hardcode IDs). Include at least one fault the loop must REFUSE to fix.
- Deterministic journal (frozen dataclasses): faults, initial findings, turns (before/after counts, adjustments), quarantined/held items, verdict.
render_markdown(journal)must be byte-stable. - CLI:
--demo,--budget,--out; verdict doubles as exit code (match the engine's existing convention — e.g. brain refusal=3). - Tests (~10-12, mirror
tests/test_loop.pyfiles): drift trips the sensor; loop converges; NEVER-INVENTS (settled state equals clean authority run exactly); the refusal boundary holds; clean input = zero turns; budget exhaustion fails; exit codes; determinism (two runs render identical markdown); CLI smoke with tmp_path. - README section: what/why, the five-stage loop line, verdict table with exit codes,
--democommand + real output excerpt. - Run the package suite AND the full portfolio (
python -m pytestper package, like CI) before pushing.
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.
- 2mo ago First seen · 19 lines · 47 tokens per session scan A e4006cad222a
build-loop is a skill published in the GitHub repository sophonfinance-wq/finance-automation-portfolio (16 stars, last pushed 27d ago), licensed MIT. It adds 47 tokens to every session and 580 once invoked, about $0.0002 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.
build-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| build-loopsophonfinance-wq/finance-automation-portfolio | Skill | 16 | 27d ago | MIT | A | 47 | Claude Code |
| developing-with-streamlitstreamlit/streamlit | Skill | 46k | today | Apache-2.0 | A | 146 | Claude Code, Codex |
| python-code-qualitymicrosoft/agent-framework | Skill | 15k | today | MIT | A | 40 | Claude Code, Codex |
| eveComposioHQ/composio | Skill | 31k | today | MIT | A | 47 | Claude Code, Codex |
| plugin-architecture-patternsxberg-io/xberg | Skill | 9.6k | today | MIT | A | 15 | Claude Code |
| test-corpusxberg-io/xberg | Skill | 9.6k | today | MIT | A | 15 | Claude Code, Codex |
| typescript-testingComposioHQ/composio | Skill | 31k | today | MIT | A | 92 | Claude Code, Codex |