Agent skill

Counterparty Risk

by JoelLewis in JoelLewis/finance_skills

Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event…

MITAuto-check passedBusiness, Finance & HR

Install Counterparty Risk

skills CLI
$ npx skills add JoelLewis/finance_skills --skill counterparty-risk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JoelLewis/finance_skills counterparty-risk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/trading-operations/skills/counterparty-risk .claude/skills/counterparty-risk && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
counterparty-risk
GitHub stars
206
Token cost
~4.3k tokens
SKILL.md length
2,175 words
Files
2 (incl. references)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event…

  • Works in 6 steps: Identify the legal entity and verify… → Assess credit quality from three angles.… → Determine the trading channel: cleared… → …
  • Measuring current
  • SKILL.md covers Core Concepts, Worked Examples, Common Pitfalls and Cross-References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Counterparty Risk is an agent skill from JoelLewis/finance_skills. Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event, and executing a default close-out. Use when measuring current or potential future exposure to a counterparty, setting or reviewing counterparty credit limits, evaluating ISDA Master Agreement netting and close-out mechanics, designing CSA collateral terms or uncleared margin compliance (VM/IM, SIMM), assessing central…

Its SKILL.md is about 4.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).

It sits in Business, Finance & HR, covering Trading and backtesting and Banking and insurance. The repository describes itself as: Claude Code skill plugins for financial services — 81 skills across 7 domain plugins covering investment management, compliance, advisory practice, trading, and operations. The licence is MIT.

When your agent uses it

  • Measuring current
  • Potential future exposure to a counterparty
  • Reviewing counterparty credit limits
  • Evaluating ISDA Master Agreement netting and close-out mechanics

Example prompts

  • “/counterparty-risk”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the legal entity and verify netting enforceability. Map the exact legal entity (not the corporate group), its jurisdiction, and…
  2. Assess credit quality from three angles. External ratings are a baseline but a lagging indicator — they typically reprice after the market…
  3. Determine the trading channel: cleared vs. bilateral. Standardized interest rate swaps in major currencies and index CDS must clear under…
  4. Negotiate documentation. ISDA Master Agreement (the 2002 version uses the Close-out Amount methodology; many legacy relationships remain…
  5. Set the credit limit. Tier by credit quality, with sub-limits by product and tenor (long-dated exposure is more uncertain) and a…
  6. Stand up measurement and monitoring. Compute current exposure CE = max(V, 0); PFE at 95-97.5% confidence via Monte Carlo (simulate…

What it can do on your machine

Read from SKILL.md and the folder at commit 5c498ea. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Counterparty Risk loads about 4.3k tokens when it runs, and up to ~7.6k if it reads all its reference files. Until then it costs about 214 tokens; SKILL.md has 2,175 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~214
When it runs · the whole SKILL.md, loaded when a task matches
~4.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JoelLewis/finance_skills at commit 5c498ea, republished under its MIT licence (© JoelLewis). 2,175 words, ~4,275 tokens.

Download SKILL.mdSave it as .claude/skills/counterparty-risk/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
counterparty-risk
description
Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event, and executing a default close-out. Use when measuring current or potential future exposure to a counterparty, setting or reviewing counterparty credit limits, evaluating ISDA Master Agreement netting and close-out mechanics, designing CSA collateral terms or uncleared margin compliance (VM/IM, SIMM), assessing central clearing mandates under Dodd-Frank or EMIR and CCP default waterfalls, monitoring creditworthiness via CDS spreads or ratings, quantifying wrong-way risk, or computing EAD, SA-CCR, and CVA. For Reg T and FINRA Rule 4210 brokerage margin see margin-operations; for settlement risk, DVP, and CLS see settlement-clearing.

Counterparty Risk

Core Concepts

Workflow A: Assessing a New Counterparty
  1. Identify the legal entity and verify netting enforceability. Map the exact legal entity (not the corporate group), its jurisdiction, and entity type. Confirm close-out netting enforceability via ISDA netting opinions for that jurisdiction and entity-type combination before counting any netting benefit — where enforceability is uncertain, risk and capital must be measured gross. Apply the sovereign ceiling for counterparties in jurisdictions with material sovereign risk.
  2. Assess credit quality from three angles. External ratings are a baseline but a lagging indicator — they typically reprice after the market has. Internal scoring: for banks, focus on CET1 (strong banks hold >12%), leverage ratio (well-capitalized banks target 5%+), LCR/NSFR (minimum 100%), and NPL trend; for corporates, debt/EBITDA, interest coverage (below 2x signals stress), free cash flow, and Altman Z-score, plus qualitative factors (management, franchise, regulatory standing). Market-implied: CDS spreads react fastest — annual PD ≈ CDS_spread / (1 − recovery); a 200bp spread at 40% recovery implies roughly 3.3% annual default probability.
  3. Determine the trading channel: cleared vs. bilateral. Standardized interest rate swaps in major currencies and index CDS must clear under Dodd-Frank Title VII / EMIR (end-user hedging exemptions exist). Non-mandated products stay bilateral under the uncleared margin rules: zero VM threshold, IM threshold up to $50 million per counterparty group, and IM held segregated at a third-party custodian with no rehypothecation. Client clearing adds clearing-member risk: evaluate portability provisions and maintain a backup clearing member.
  4. Negotiate documentation. ISDA Master Agreement (the 2002 version uses the Close-out Amount methodology; many legacy relationships remain on the 1992 version's Market Quotation/Loss — know which governs each relationship), Schedule elections (governing law, Specified Entities, cross-default thresholds, additional termination events such as NAV triggers), and CSA terms: threshold, minimum transfer amount, independent amount/IM, eligible collateral and haircuts, valuation frequency (daily is standard), and dispute resolution. Link the CSA threshold to ratings so it steps down — ideally to zero — on downgrade.
  5. Set the credit limit. Tier by credit quality, with sub-limits by product and tenor (long-dated exposure is more uncertain) and a settlement limit separate from the pre-settlement limit. Apply explicit add-ons or reduced limits for wrong-way risk, where exposure and counterparty credit quality are positively correlated (general WWR: PD correlated with market factors; specific WWR: structural, e.g., a put written on the counterparty's own stock).
  6. Stand up measurement and monitoring. Compute current exposure CE = max(V, 0); PFE at 95-97.5% confidence via Monte Carlo (simulate risk-factor paths, revalue the netting set at each time step, take the percentile of max(value, 0)); EE/EPE as the capital basis; EAD = 1.4 × (RC + PFE add-on) under SA-CCR; CVA = LGD × Σ EE_i × PD_i × DF_i. Aggregate across all desks, products, and legal entities facing the counterparty — a trade missing from the counterparty risk system is unmeasured exposure. Wire pre-deal limit checks into order flow, monitor post-trade for market-driven breaches, alert at ~80% utilization, and hard-block at 100%. Review cadence: annual full review for top-tier names, semi-annual for lower tiers, monthly (or more) for the watch list.
Workflow B: Responding to a Credit-Deterioration Event

Early-warning thresholds that should put a counterparty on the watch list before any downgrade: sustained CDS widening (e.g., 50bp over 30 days, or absolute spread above 300bp), stock price decline >30% over 60 days, negative rating outlook, covenant breaches, regulatory enforcement actions, accounting restatements, or significant client withdrawals.

  1. Confirm and classify the trigger. Initiate a formal credit review: temporary setback (a bad quarter, a one-time loss) or structural deterioration (capital erosion, rising NPLs, franchise decline)? Review the latest financials, disclosures, and analyst coverage.
  2. Enforce CSA downgrade provisions. Check for ratings-linked threshold step-downs and additional termination events; call any collateral the CSA now permits (a threshold stepping to zero converts the prior threshold amount into an immediate collateral call).
  3. Reduce the credit limit. Convene the credit committee and re-tier the counterparty. If current exposure now exceeds the reduced limit, document the breach and a dated remediation plan.
  4. Reduce exposure. In rough order of cost: let maturing trades roll off without replacement; execute offsetting trades; novate trades to other counterparties (requires consent); unwind by agreement with a close-out payment. Prioritize long-dated, high-PFE trades for novation or unwind; short-dated trades maturing within weeks rarely justify early-termination costs.
  5. Restrict new trading. Hold on exposure-increasing trades; require credit-officer approval for any new trade, which must be flat or exposure-reducing.
  6. Escalate monitoring to daily — exposure, CDS, collateral disputes, news — and explicitly stress wrong-way risk by jointly shocking the exposure drivers and the counterparty's default (e.g., a European bank counterparty and euro depreciation that inflates FX-forward exposure simultaneously).
  7. Pre-position for default. Pre-calculate close-out amounts and collateral adequacy, identify replacement counterparties for critical hedges, and confirm which agreement version and close-out methodology governs.
  8. Document everything — committee decisions, limit rationale, the reduction plan, and communications — as evidence of prudent risk management for internal audit and examiners.
Workflow C: Default Close-Out Playbook

Maintain this playbook pre-built for every watch-list counterparty: pre-drafted Event of Default and termination notices, pre-identified valuation sources (dealer panels, pricing services, internal marks), pre-computed exposure and collateral figures, and a contact tree (legal, credit, trading, operations). Close-out must execute in days, not weeks — every day of delay is unhedged market risk on the terminated portfolio.

  1. Confirm the Event of Default under the governing Master Agreement (failure to pay, credit support default, cross-default above the threshold, bankruptcy, merger without assumption). Distinguish from Termination Events (illegality, force majeure, tax events, ATEs), which may permit termination of only the affected transactions.
  2. Deliver the default notice using the pre-drafted form, observing the agreement's notice mechanics and grace periods.
  3. Designate the Early Termination Date (same day or a future date, as the agreement permits).
  4. Value the terminated transactions using commercially reasonable procedures — 2002 ISDA Close-out Amount (flexible but more subjective) or 1992 Market Quotation/Loss — drawing on the pre-identified valuation sources. Document quotes and marks contemporaneously; valuation disputes are the most litigated part of close-outs.
  5. Net to a single Early Termination Amount. The single-agreement provision defeats cherry-picking by the bankruptcy estate: all transactions terminate together and net to one claim, including unpaid amounts. This is where the netting-enforceability verification from Workflow A pays off.
  6. Apply collateral held under the CSA against the net amount. Expect exposure drift over the margin period of risk (regulatory MPOR ~10 business days bilateral, ~5 days cleared) between the last margin collection and final close-out — this is the exposure IM was sized to cover.
  7. Re-hedge the terminated portfolio immediately. The close-out crystallizes the claim, but the market risk of the vanished trades is live until replaced.
  8. For cleared trades, the CCP runs default management instead. The default waterfall applies resources in order: (1) the defaulter's initial margin, (2) the defaulter's default fund contribution, (3) the CCP's own capital (skin-in-the-game), (4) non-defaulting members' default fund contributions, (5) capped supplemental assessments, (6) recovery tools (variation margin gains haircutting, partial tear-up). CCPs size resources to the Cover 1 / Cover 2 standard — the default of the largest one or two members under extreme but plausible conditions. Clients of a defaulted clearing member should trigger porting of positions and margin to a backup member within one to two days.
Show full SKILL.md (975 more words)Show less
Core Reference

Exposure measures (one line each). Current exposure: CE = max(V, 0), where V is the net mark-to-market of the netting set. PFE: the high-percentile (95-97.5%) simulated exposure profile over time — rising with horizon, then rolling off as trades mature. EE/EPE: average exposure at a date / time-averaged EE, the basis for regulatory capital under SA-CCR and IMM. EAD (SA-CCR): 1.4 × (RC + PFE add-on). CVA: the market value of counterparty credit risk — LGD × Σ(EE_i × PD_i × DF_i), where LGD = 1 − recovery rate, EE_i is expected exposure at time i, PD_i the default probability in period i, and DF_i the discount factor — a separate Basel III capital charge that raises the cost of bilateral OTC trades. Market-implied PD can be backed out of CDS spreads as spread / (1 − recovery rate). Limit utilization is monitored as current exposure / credit limit. Wrong-way risk: standard PFE models assume exposure-default independence — add joint stress scenarios where they correlate.

Netting. Payment netting reduces settlement flows; close-out netting is the credit-risk tool. Netting benefit = gross exposure − net exposure; netting ratio = net/gross (a ratio of 0.3 means netting cut exposure 70%). CCP multilateral netting nets across all clearing members and can exceed any bilateral result.

Collateral. VM covers current exposure (daily exchange, typically title transfer and reusable); IM covers close-out-period exposure (posted at inception, segregated, no rehypothecation under the uncleared margin rules). Collateralized exposure = max(V − haircut-adjusted collateral, 0); with a CSA threshold, residual uncollateralized exposure = max(V − threshold, 0) − collateral held. ISDA SIMM (sensitivity-based, recalibrated annually) generally produces lower IM than the regulatory schedule because it recognizes hedging and diversification. Typical haircuts: cash 0%; Treasuries 0.5-4% by maturity; investment-grade corporates 5-10%; equities 15-25%; plus ~8% FX haircut for non-domestic-currency collateral. Valuation disputes are routine — transfer the undisputed amount while escalating per the CSA.

CCP margin methodology. CCPs compute IM with historical-simulation VaR or Expected Shortfall at 99%+ confidence over the MPOR (typically 5 days for cleared swaps, 2 days for listed futures), plus concentration, liquidity, and wrong-way add-ons; VM is exchanged daily or intraday. Clearing concentrates risk in the CCP itself — CCPs are designated SIFMUs with heightened supervision, and members should assess each CCP's default waterfall adequacy.

Settlement risk. Settlement risk mechanics — DVP, PvP/CLS, Herstatt risk — are owned by the settlement-clearing skill (trading-operations); the counterparty-risk implication is that settlement limits must be set separately from pre-settlement limits because the exposure is full notional, not mark-to-market.

Worked Examples

Two worked examples are in references/examples.md — load for an end-to-end scenario: (1) setting up a counterparty credit limit framework with tiering, sub-limits, and governance, (2) designing collateral management for bilateral OTC trades under the uncleared margin rules.

Common Pitfalls

  • Relying solely on credit ratings as the primary indicator of counterparty creditworthiness — ratings are lagging indicators that often reflect deterioration only after the market has repriced the risk; CDS spreads and equity-implied metrics provide more timely signals
  • Failing to verify netting enforceability in each counterparty's jurisdiction before counting netting benefits in exposure calculations — unenforced netting provides no risk reduction and regulators require gross exposure treatment where enforceability is uncertain
  • Neglecting wrong-way risk in exposure measurement — standard PFE models assume independence between exposure and default probability, which can dramatically underestimate risk when the two are positively correlated
  • Setting counterparty credit limits at inception but failing to reduce them when credit quality deteriorates — limits must be dynamic, with formal processes for downward revision triggered by early warning indicators
  • Using a single aggregate credit limit without sub-limits by product type and tenor — a counterparty with a $200 million limit concentrated entirely in 30-year interest rate swaps presents fundamentally different risk than one with the same limit spread across short-dated FX forwards
  • Treating the CSA threshold as a static parameter without linking it to the counterparty's credit rating — thresholds should step down (or reduce to zero) upon rating downgrade to ensure additional collateral is posted as credit quality weakens
  • Failing to calculate and maintain pre-computed close-out amounts for counterparties on the watch list — if a counterparty defaults, the firm needs to act within hours, not days, to terminate and hedge
  • Ignoring settlement risk for currencies not covered by CLS — the full notional of the first-delivered leg is exposed during the time-zone gap (mechanics in settlement-clearing)
  • Assuming that central clearing eliminates counterparty risk entirely — clearing reduces but does not eliminate risk; the firm still faces clearing member default risk (for client clearers) and CCP tail risk, and must contribute to the default fund
  • Permitting rehypothecation of initial margin received for uncleared derivatives — this violates uncleared margin rules and, even where not prohibited, introduces a chain of credit risk that defeats the purpose of initial margin
  • Not stress testing the collateral portfolio for scenarios where collateral values decline simultaneously with exposure increases — a concentrated collateral portfolio of corporate bonds may lose value in the same market stress that increases derivative exposure
  • Maintaining ISDA documentation with outdated Schedules that reference superseded regulations or contain stale credit thresholds, creating legal uncertainty about close-out mechanics and collateral obligations during a default event

Cross-References

  • settlement-clearing (trading-operations plugin): Owns settlement risk mechanics — DVP/PvP, CLS, Herstatt risk, and fail management; clearing and settlement infrastructure are the structural mitigants for counterparty exposure.
  • margin-operations (trading-operations plugin): Owns Reg T and FINRA Rule 4210 brokerage margin; margin call workflows are the operational implementation of the collateral concepts in this skill.
  • trade-execution (trading-operations plugin): Pre-deal credit limit checks must be integrated into the trade execution workflow to prevent trades that would breach counterparty exposure limits.
  • order-lifecycle (trading-operations plugin): Counterparty selection and credit validation are pre-execution steps in the order lifecycle.
  • operational-risk (trading-operations plugin): Counterparty default events require documented escalation, remediation, and loss attribution processes.
  • forward-risk (wealth-management plugin): PFE calculation shares Monte Carlo risk-factor simulation techniques and infrastructure with forward-looking portfolio risk analysis.
  • fixed-income-corporate (wealth-management plugin): Credit analysis of corporate bond issuers uses many of the same financial metrics and rating frameworks applied to counterparty credit assessment.

© JoelLewis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/trading-operations/skills/counterparty-risk of JoelLewis/finance_skills.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit 5c498ea

Compare with similar skills

Counterparty Risk next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Counterparty Risk compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Counterparty Risk this skillJoelLewis/finance_skills206—~4.3kAutomated safety check: PassMIT
Solana Payments Wallets Tradingnpc-live/clawfirm1561 repos~4.7kAutomated safety check: PassMIT
Metamask Agent Walletnirholas/three.ws230—~4.5kAutomated safety check: PassMIT
Aomi Transactjeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: PassMIT
Trader SimulatorLeoYeAI/openclaw-master-skills2.2k—~2.3kAutomated safety check: PassMIT
Metamask Agent Workflowsnirholas/three.ws229—~1.1kAutomated safety check: PassMIT

Similar skills

  • Pay people in SOL or USDC, buy and sell tokens, check prices, discover trending and new tokens, create and manage Solana wallets, stake SOL, earn yield through lending and managed vaults, borrow…

    156 GitHub starsUsed in 1 repo~4.7k tokens
    Business, Finance & HRAuto-check passed
  • Metamask Agent Wallet

    nirholas/three.ws

    A skill your agent uses when the user asks anything about blockchain wallets, transactions, signing, token transfers, supported chains, wallet balances, perpetual futures trading, prediction…

    230 GitHub stars~4.5k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Aomi Transact

    jeremylongshore/tons-of-skills-marketplace

    Build natural-language crypto agents, web3 assistants, and trading bots that read and write EVM chain state.

    2.8k GitHub stars~2.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Trader Simulator

    LeoYeAI/openclaw-master-skills

    🤖 OpenClaw Skill /skills | 炒股大师模拟器 | 股市模拟交易练习 | A股/港股/美股投资学习 | 化身文主任/股神老徐/炒股养家/孙宇晨等各位大师学习投资思路 | 多智能体股票讨论群 | AI Agent | Trading Simulator | 量化投资 | 金融科技 | FinTech

    2.2k GitHub stars~2.3k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Metamask Agent Workflows

    nirholas/three.ws

    A skill your agent uses when the user needs to perform multi-step operations with the MetaMask Agentic CLI such as onboarding, login, swapping tokens, bridging across chains…

    229 GitHub stars~1.1k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Kamino

    sendaifun/skills

    Complete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading.

    130 GitHub starsUsed in 1 repo~6.8k tokens
    Business, Finance & HRAuto-check: notes

More from JoelLewis/finance_skills

All 91 skills in this repo
  • Asset Allocation

    JoelLewis/finance_skills

    Determine how to distribute capital across asset classes using strategic and tactical allocation frameworks.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Bet Sizing

    JoelLewis/finance_skills

    Determine how much capital to allocate to individual positions within a portfolio.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Commodities

    JoelLewis/finance_skills

    Analyze commodity markets including futures curve dynamics, roll yield, and supply/demand fundamentals.

    206 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Currencies And Fx

    JoelLewis/finance_skills

    Analyze currency markets, exchange rate mechanics, and FX risk management for international portfolios.

    206 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Debt Management

    JoelLewis/finance_skills

    Provide frameworks for managing and paying off personal debt effectively.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Diversification

    JoelLewis/finance_skills

    Build diversified portfolios using correlation analysis, efficient frontier construction, and factor-based diversification.

    206 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Counterparty Risk

What does Counterparty Risk do?

Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event…. Counterparty Risk is an agent skill from JoelLewis/finance_skills. Guide counterparty credit risk measurement and management for OTC and securities trading, organized around three workflows: assessing a new counterparty, responding to a credit-deterioration event, and executing a default close-out.

When should I use Counterparty Risk?

Counterparty Risk fits situations like: measuring current; potential future exposure to a counterparty; reviewing counterparty credit limits; evaluating ISDA Master Agreement netting and close-out mechanics.

How do I install Counterparty Risk in Claude Code?

Run `npx skills add JoelLewis/finance_skills --skill counterparty-risk -a claude-code`. Or copy the skill folder (plugins/trading-operations/skills/counterparty-risk in JoelLewis/finance_skills) into .claude/skills/counterparty-risk in your project. Claude Code loads it when a task matches its description.

How do I install Counterparty Risk in Codex?

Run `npx skills add JoelLewis/finance_skills --skill counterparty-risk -a codex`. Or copy the skill folder (plugins/trading-operations/skills/counterparty-risk in JoelLewis/finance_skills) into .agents/skills/counterparty-risk in your project. Codex loads it when a task matches its description.

Can I use Counterparty Risk in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JoelLewis/finance_skills --skill counterparty-risk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/counterparty-risk, .gemini/skills/counterparty-risk, .github/skills/counterparty-risk and .opencode/skills/counterparty-risk in your project.

What does Counterparty Risk need to run?

SKILL.md names no scripts, command-line tools or credentials: Counterparty Risk is instructions for the agent only.

Does Counterparty Risk access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Counterparty Risk safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Counterparty Risk use?

Counterparty Risk is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Counterparty Risk use?

About 4.3k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.3k tokens, read only when the agent opens those files.

What are the alternatives to Counterparty Risk?

Skills that share tags, products or a category with Counterparty Risk: Solana Payments Wallets Trading (npc-live/clawfirm, 156 stars), Metamask Agent Wallet (nirholas/three.ws, 230 stars), Aomi Transact (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Trader Simulator (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Counterparty Risk?

JoelLewis (a GitHub user) maintains it in JoelLewis/finance_skills, which has 206 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on July 18, 2026.

Source: JoelLewis/finance_skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.