finance-automation-portfolio: Skill for Claude Code

.claude/skills/build-loop/SKILL.md

build-loop is a skill for Claude Code from sophonfinance-wq/finance-automation-portfolio. It costs 47 tokens per session (580 once invoked), scanned A, original, MIT.

A guide for adding a self-healing workflow to a new engine. A self-healing workflow detects a broken result, rebuilds it from trusted source data, records the change, and checks the result again.

In plain words
What is it for?
Use it when building a new engine that needs independent checks, trusted data reconstruction, approval gates, and realistic fault demonstrations.
Why use it?
It provides a repeatable way to repair drift without guessing or copying the wrong approval rules from another system.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is sophonfinance-wq/finance-automation-portfolio's own configuration. It tells Claude Code how to work on finance-automation-portfolio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything finance-automation-portfolio configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sophonfinance-wq/finance-automation-portfolio/main/.claude/skills/build-loop/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sophonfinance-wq/finance-automation-portfolio

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 build-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/build-loop/github.svg)](https://agentmods.dev/skills/sophonfinance-wq/finance-automation-portfolio/build-loop)
Your own site
<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.

agentmods 80×15 button for build-loop

Your own site · 80×15
<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>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 580 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 original 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.00047 $0.00580
Opus 5 $0.00023 $0.00290
Sonnet 5 $0.00009 $0.00116
Haiku 4.5 $0.00005 $0.00058

Measured 11d ago against content hash e4006cad222a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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 11d 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.

.claude/skills/build-loop/SKILL.md · 19 lines

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

  1. 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.
  2. 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)?
  3. 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.
  4. 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.
  5. Deterministic journal (frozen dataclasses): faults, initial findings, turns (before/after counts, adjustments), quarantined/held items, verdict. render_markdown(journal) must be byte-stable.
  6. CLI: --demo, --budget, --out; verdict doubles as exit code (match the engine's existing convention — e.g. brain refusal=3).
  7. Tests (~10-12, mirror tests/test_loop.py files): 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.
  8. README section: what/why, the five-stage loop line, verdict table with exit codes, --demo command + real output excerpt.
  9. Run the package suite AND the full portfolio (python -m pytest per package, like CI) before pushing.

Read the full file on GitHub · 19 lines

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. 11d ago First seen · 19 lines · 47 tokens per session scan A e4006cad222a

Subscribe to this mod's changes

build-loop is a skill published in the GitHub repository sophonfinance-wq/finance-automation-portfolio (11 stars, last pushed 15d ago), licensed MIT. It adds 47 tokens to every session and 580 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens

debugging-executions

Debug failed or wrong-output workflow executions using executions tools. Load when the user reports execution failures, unexpected node output, empty parameter values after a successful run, or a node showing a red or failed expression error.

n8n-io/n8n · 48 tokens

atmos-schemas

JSON Schema for Atmos: stack-manifest and atmos.yaml config schemas, IDE auto-completion, validate stacks/schema/config, SchemaStore integration.

cloudposse/atmos · 32 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens

therapeutic-ifs

Unified inner work engine: Schema deconstruction (diagnosis) + IFS therapy (treatment). Absorbs: schema-deconstruction.

winstonkoh87/Athena-Public · 34 tokens