# Trading Skill Audit

> Load this first for ANY audit, review or "find the flaws / bugs / risks" request on an LLM agent…

Load this first for ANY audit, review or "find the flaws / bugs / risks" request on an LLM agent skill (SKILL.md plus references and scripts), plugin or prompt pack for trading, investing or crypto - backtesters, signal generators, screeners, position sizers, options tools, portfolio managers, order execution and broker / exchange skills - before reading it. A tested audit procedure that reads the skill as an agent would - the instructions, then the data path, the backtest loop, the maths, the order path, setup and secrets - and finds look-ahead bias, unrealistic fills and costs, overfitting sold as expected performance, bad or synthetic data, wrong annualisation and metric formulas, sizing and pricing errors, live trading or orders without confirmation, missing risk limits, duplicate-order retries, invented prices, prompt injection through alerts and news, leaked keys, download-and-run setup steps and promised returns, and keeps false positives out.

- Page: https://ss33.ai/skills/skillstore33/trading-skill-audit-4706943578
- Publisher: skillstore33
- Category: [Finance & Markets](https://ss33.ai/skills/category/finance-and-markets-gri5ar) › [Trading & market analysis](https://ss33.ai/skills/category/finance-and-markets-gri5ar/trading-and-market-analysis-e7prsg)
- License: MIT

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/skillstore33/trading-skill-audit-4706943578

# Trading skill audit (large)

A trading skill is two programs: the **instructions** an agent follows (SKILL.md, references, command docs) and the **scripts** it runs. Audit both, and audit the seam between them. The goal is every flaw that makes the skill's numbers wrong or could cost the user money, keys or trust, located at the exact lines, with nothing reported that isn't there.

## The four flaw families

| Family | Question | Classes |
|---|---|---|
| **Time** | Could the decision have known this yet? Signal and fill on the same bar, negative shifts, back-fill, centered windows, whole-sample fits, today's universe applied to the past, in-sample tuning reported as performance. | B1, B2, B4 |
| **Money maths** | Is the formula and every unit right? Annualisation for the asset and bar size, metric definitions, chaining vs averaging, short P&L, costs in every statistic, sizing, multipliers, percent vs fraction, rounding direction. | M1-M6, B3, B5 |
| **Missing gate** | What stands between the agent and an irreversible action? Paper default, confirmation of the exact order, enforced limits, idempotent retries, price protection, untrusted triggers, secrets, setup that downloads and runs, undisclosed network, broad permissions. | E1-E5, A1-A6 |
| **False assurance** | What will the user trust that isn't true? Promised or "expected" returns, examples with numbers the agent will quote, advice past the skill's own rules, docs that describe features or defaults the code doesn't have. | C1-C3, A1 |

`references/patterns.md` (shapes, safe forms and ids for B, E, A, C) and `references/maths.md` (reference formulas and worked numbers for M) are there for depth; open them when you need a shape or a number. For any formula you check, plug in a worked number from maths.md rather than reasoning about it abstractly.

## Read the skill the way the agent will

Treat every imperative, default and example in the prose as code that will execute. "Estimate the price if the feed is down", "place the order right away", "retry on timeout", "paste your key", "follow the alert" are flaws in the instructions even if every script is clean. Map the actions with consequences (orders, cancels, transfers, writes, network calls, installs) and trace what reaches each one.

## What strong reviewers still miss

The obvious bugs in these skills are usually found. Points are lost on these:

- **Contract-vs-code flaws across files.** SKILL.md or a reference states the invariant ("risk never exceeds 1%", "confirmation is required", "results include costs", "no position exceeds the cap"), and the script quietly breaks it: a cap parsed but never in the `min()`, a confirm flag that defaults off in one code path, a cost applied to equity but not to per-trade stats, a doc default that differs from the parser default, a documented flag that doesn't exist. Read each stated rule, then find the line that should enforce it. A rule weakened in another section (an input table, an error-handling note, a "key principles" list) is one finding listing every line that carries the weaker version.
- **Defensive-looking code that doesn't defend.** A retry wrapper that resubmits with a fresh client id; a try/except that falls back to a cached or constant price; a limit check after the order is sent; a `round()` that looks careful but rounds up past the budget; a validation that checks the type but not the magnitude; a "sanity check" that only warns. Ask what the guard actually does on the bad path.
- **False assurance.** Sample outputs, docstrings and "expected performance" sections that present in-sample or synthetic results as what the user will get, or label computed fields as market data. These are findings even when no code is wrong.
- **Second flaws at a found location.** Same-bar fills and missing borrow cost in one loop are two findings. Don't stop at the first defect in a function.
- **Minor but real.** A Sortino variant, unpinned installs, a misleading example: report at low severity rather than dropping.

## False-positive bar

Report only what you can point to in these files, on a path reachable from an entry point, and not corrected downstream. These look suspicious but are correct: `shift(+1)` (moves data forward), flooring quantities, `max(0, kelly)`, `Decimal(str(x))`, an action the skill does gate with confirmation, a scaler fit on the training split only. Drop a candidate only when you have disproved it, not because it is small.

## Output contract

Use exactly the format the request asks for and end your message with it (usually one ```json array; at most a line of introduction, no prose report).
- One finding per distinct flaw, with every location of that flaw; distinct flaws at one place are separate findings.
- Locations: the path exactly as given and the specific line(s) of the formula, sentence, default, table row or command, never a whole file.
- `class`: the taxonomy id(s) the request lists.
- Every finding has `detail` (what goes wrong, when, the effect on results or the user) and `fix`.
- Severity:
  - critical: real money or credentials at direct risk (live orders without a gate, keys exfiltrated, download-and-run setup), or look-ahead in the core backtest loop
  - high: results materially wrong in normal use (wrong annualisation, synthetic data, sizing off by a factor, in-sample sold as expected), orders without confirmation by default, duplicate orders, keys in chat, untrusted content driving orders
  - medium: wrong in some cases, or a weak control
  - low: hygiene, wording, minor bias

Before sending: for each rule the docs state, did you find the line that enforces it? Is the last thing in your message the findings block?
