margin-operations

margin-operations is a skill for Claude Code from JoelLewis/finance_skills. It costs 145 tokens per session (4,188 once invoked), scanned A, original, MIT.

A guide to lending money against brokerage-account investments and managing the related rules. It explains Regulation T, which sets the Federal Reserve's initial borrowing requirements, as well as maintenance requirements and margin calls.

In plain words
What is it for?
Use it to calculate buying power and margin requirements, assess portfolio-margin eligibility, and create or resolve margin calls.
Why use it?
It helps determine how much a customer may borrow, when an account falls below required equity, and what to do when more collateral is needed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

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

Good fit Use it to calculate buying power and margin requirements, assess portfolio-margin eligibility, and create or resolve margin calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/margin-operations
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 margin-operations
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 margin-operations

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/margin-operations"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/margin-operations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,188 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 18 Mar 2026
  • Snyk pass 18 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.00145 $0.04188
Opus 5 $0.00072 $0.02094
Sonnet 5 $0.00029 $0.00838
Haiku 4.5 $0.00015 $0.00419

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

Security

Grade A, and why

margin-operations 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 10d 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/margin-operations/SKILL.md · 142 lines

How it starts

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

Margin Operations

Core Concepts

Regulation T Initial Margin

The Federal Reserve's Regulation T establishes the initial margin requirement for purchasing securities on credit. Key provisions:

  • 50% initial margin requirement: An investor must deposit at least 50% of the purchase price of marginable securities. For a $100,000 purchase, the investor must deposit $50,000 (cash or marginable securities); the broker-dealer may lend the remaining $50,000.
  • Reg T buying power: The maximum dollar amount a client can purchase given their available equity. Buying power = SMA x 2 (for equity securities under Reg T). If a client deposits $100,000 cash in a new margin account, buying power is $200,000.
  • Special Memorandum Account (SMA): A bookkeeping entry that tracks the client's excess Reg T equity. SMA increases when: the account has excess equity above 50%, securities are sold, dividends or cash are deposited. SMA decreases when used to purchase securities or withdraw cash. SMA is a high-water mark — it does not decrease when market values decline (unless used).
  • Reg T extension procedures: When a client fails to meet the initial margin requirement by settlement date, the broker-dealer must request an extension from a self-regulatory organization (SRO). Extensions are typically granted for 1-5 business days. Failure to meet the call results in forced liquidation and a 90-day freeze (restricted account).
  • Exempt securities: U.S. government bonds, municipal bonds, and certain agency securities are exempt from Reg T margin requirements — they can be purchased with lower or no initial margin.
  • Day-trade margin: FINRA Rule 4210 provides pattern day traders (4+ day trades in 5 business days) with 4:1 intraday buying power (25% margin) but requires a minimum equity of $25,000 — day-trade buying power = (equity - $25,000 minimum) × 4. Overnight positions revert to standard 2:1 Reg T buying power.

Maintenance Margin

After the initial purchase, ongoing maintenance margin requirements determine the minimum equity the account must maintain:

Read the full file on GitHub · 142 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. 10d ago First seen · 142 lines · 145 tokens per session scan A a4aedb867e8c

Subscribe to this mod's changes

margin-operations is a skill published in the GitHub repository JoelLewis/finance_skills (184 stars, last pushed 1mo ago), licensed MIT. It adds 145 tokens to every session and 4,188 once invoked, about $0.0007 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

EU AI Act High-Risk Obligations

PASS/FAIL/N/A checklist for the high-risk AI obligations under Articles 8-15 of the EU AI Act, plus the quality management system, conformity assessment, registration, post-market monitoring, and incident reporting.

niels-emmer/myace · 52 tokens

EU AI Act Risk Classification

Decision tree for classifying an AI system into the EU AI Act risk tier (unacceptable/high/limited/minimal) and identifying the actor role (provider/deployer/importer/distributor).

niels-emmer/myace · 44 tokens

EU AI Act General-Purpose AI

Checklist for the general-purpose AI (GPAI) obligations under Articles 51-55 — technical documentation, copyright policy, training-data summary, and systemic-risk obligations (evaluation, adversarial testing, incident reporting, cybersecurity).

niels-emmer/myace · 53 tokens

EU AI Act Transparency

Checklist for the Article 50 transparency obligations — chatbot AI disclosure, machine-readable marking of synthetic content, emotion-recognition/biometric-categorisation notice, and deepfake/public-interest-text labelling.

niels-emmer/myace · 45 tokens

Exception Documentation

The template for documenting a deliberate, approved deviation from an infrastructure invariant — rationale, compensating control, approver, and expiry — instead of a silent workaround.

niels-emmer/myace · 35 tokens

fsi-compliance-checker

Maps code, architecture, and infrastructure changes to specific control IDs in PCI-DSS v4.0 and MAS TRM (Singapore financial regulator), producing an audit-traceable findings report with per-control remediation.

LiHongwei-cn/lihongwei-cn · 48 tokens