pre-trade-compliance

pre-trade-compliance is a skill for Claude Code from JoelLewis/finance_skills. It costs 125 tokens per session (7,053 once invoked), scanned A, original, MIT.

Guidance for designing systems that check investment orders before they are sent for execution. These checks can allow an order, block it, or flag it for human review.

In plain words
What is it for?
Use it when building rule engines for registered investment advisers or broker-dealers, including hard and soft blocks and sequential or parallel rule evaluation.
Why use it?
It clarifies how compliance rules, restricted lists, watch lists, and material nonpublic information restrictions can affect an order before trading occurs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the trading-operations plugin — 8 skills shipped together

not rated 184repo +5 1mo ago A scan Socket: passSnyk: warnSkillSpector: pass 125 tokens original MIT

Good fit Use it when building rule engines for registered investment advisers or broker-dealers, including hard and soft blocks and sequential or parallel rule evaluation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/pre-trade-compliance
Install

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.

Any agent
npx skills add JoelLewis/finance_skills --skill pre-trade-compliance
Clone the repo
git clone --depth 1 https://github.com/JoelLewis/finance_skills

Made for: Claude Code.

Or install trading-operations, the plugin that ships this one along with the rest of its 8 skills.

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 pre-trade-compliance

README.md
[![agentmods](https://agentmods.dev/badge/skills/joellewis/finance_skills/pre-trade-compliance/github.svg)](https://agentmods.dev/skills/joellewis/finance_skills/pre-trade-compliance)
Your own site
<a href="https://agentmods.dev/skills/joellewis/finance_skills/pre-trade-compliance"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/pre-trade-compliance/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 pre-trade-compliance

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/pre-trade-compliance"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/pre-trade-compliance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,053 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. Third-party audits
  • Socket pass 19 Mar 2026
  • Snyk warn 19 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00125 $0.07053
Opus 5 $0.00063 $0.03527
Sonnet 5 $0.00025 $0.01411
Haiku 4.5 $0.00013 $0.00705

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

Security

Grade A, and why

pre-trade-compliance 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.

plugins/trading-operations/skills/pre-trade-compliance/SKILL.md · 261 lines

How it starts

The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pre-Trade Compliance

Core Concepts

Pre-Trade Compliance Architecture

The pre-trade compliance system intercepts orders after generation by the portfolio management system or order entry interface and before routing to custodians or execution venues. The system evaluates each order against a set of rules and either permits the order to proceed, blocks it entirely (hard block), or flags it for review (soft block).

Rule engine design — sequential vs. parallel evaluation:

  • Sequential evaluation: Rules are evaluated in a defined order, and processing stops at the first failure. This approach is efficient when early rules are likely to catch the majority of violations (e.g., checking whether the account is frozen before evaluating concentration limits). Sequential evaluation reduces latency for orders that fail early but provides incomplete diagnostic information — the trader sees only the first violation, not all violations.
  • Parallel evaluation: All rules are evaluated simultaneously, and the system returns the complete set of results. This approach provides comprehensive diagnostic output — the trader sees every rule that the order violates in a single pass. Parallel evaluation is preferred for advisory workflows where orders are reviewed before submission and the compliance team benefits from seeing the full picture. The tradeoff is higher computational cost per order, though for typical advisory order volumes this is negligible.
  • Hybrid approach: Critical rules (account status, restricted list) are evaluated first as a fast-fail gate. If the order passes these, the remaining rules are evaluated in parallel. This balances latency with diagnostic completeness.

Order interception points:

  • Pre-routing: The compliance check occurs before the order is transmitted to the custodian or execution venue. This is the primary interception point and catches violations before any market interaction. The order exists only within the firm's systems at this stage.
  • Pre-execution: For firms with direct market access or algorithmic execution capabilities, a second compliance check may occur after routing but before the order is released for execution. This catches issues that arise from market conditions between routing and execution (e.g., a rapidly changing position that now breaches a limit).
  • Post-aggregation, pre-routing: For block trades, compliance checks should be applied both at the individual account level (does this account violate its concentration limit?) and at the aggregate block level (does the total block size exceed the security's average daily volume threshold?).

Read the full file on GitHub · 261 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 261 lines · 125 tokens per session scan A 41fa474bce20

Subscribe to this mod's changes

pre-trade-compliance is a skill published in the GitHub repository JoelLewis/finance_skills (184 stars, last pushed 1mo ago), licensed MIT. It adds 125 tokens to every session and 7,053 once invoked, about $0.0006 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

fiscaliste

Fiscaliste IA pour la fiscalité personnelle des particuliers français : optimisation et déclaration de l'impôt sur le revenu, IFI, revenus du capital, revenus fonciers, equity salarial, crypto-actifs et PER. Couvre le calcul de l'IR (barème, quotient familial, décote, PAS, CEHR, revenus exceptionnels), la déclaration…

romainsimon/paperasse · 302 tokens

controleur-fiscal

Inspecteur des finances publiques IA. Simule un contrôle fiscal DGFIP complet sur les comptes d'une entreprise française (SASU, EURL, SAS, SARL). Analyse le FEC, la liasse fiscale, les charges déduites, le compte courant d'associé, la TVA, l'IS selon 8 axes de vérification. Identifie les chefs de redressement…

romainsimon/paperasse · 136 tokens

commissaire-aux-comptes

Commissaire aux comptes IA pour l'audit des comptes annuels d'entreprises françaises. Applique la démarche NEP en 7 phases : prise de connaissance, contrôle du FEC, vérification du bilan, du compte de résultat, de la balance, de la liasse fiscale, et contrôles transversaux. Émet une opinion motivée sur la fiabilité…

romainsimon/paperasse · 123 tokens

hr-payroll

Help HR operations specialists, payroll administrators, and compensation teams understand, design, and run payroll processing, compliance, and payroll-related HR operations. Use when asked to set up a payroll process, run a payroll compliance audit, design a payroll calendar, handle a payroll discrepancy, build a…

tuanductran/hr-skills · 88 tokens

hr-retirement-benefits

Help compensation and benefits teams design, communicate, and administer retirement and pension benefits. Use when asked to design our retirement benefit offering, explain 401(k)/pension options to employees, compare retirement plan providers, communicate a retirement plan change, or help an employee understand their…

tuanductran/hr-skills · 63 tokens

tax-calendar-proactive

A proactive tax calendar for Russian individual entrepreneurs and small limited companies. From a few business details, it identifies upcoming deadlines, estimated payments, and important thresholds such as VAT and the simplified-tax-system limit.

ilyautov/small-business-ru · 167 tokens