investigate-settlement-exception
Investigate a post-trade settlement exception for ClearSet AI.
Skill by MADHANKUMAR98
Chalk Labs
Need help deploying investigate-settlement-exception?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/madhankumar98-investigate-settlement-exception-6edae0
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/investigate-settlement-exception
What's inside
- Skill name
investigate-settlement-exception- Description
- Investigate a post-trade settlement exception for ClearSet AI. Retrieves live trade, exception, counterparty, and settlement event data from Snowflake, uses Cortex Search to retrieve the applicable SOP procedure, uses Cortex Analyst to confirm structured trade analytics, applies a deterministic 5-factor risk scoring formula, and produces a human-approval-gated resolution recommendation. Use when asked to investigate a settlement exception, investigate a trade, or analyse a failed or at-risk settlement.
- License
- MIT
- Instructions
- 305 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# ClearSet AI — Settlement Exception Investigation
## Overview
ClearSet AI is a post-trade settlement operations application backed by
`CLEARSET_DB.CLEARSET_SCHEMA` in Snowflake. This skill orchestrates a complete
10-step settlement exception investigation using live Snowflake data.
**Snowflake objects used by this skill:**
| Object | Type | Purpose |
|---|---|---|
| `V_EXCEPTIONS_ENRICHED` | Semantic view | Exception details, risk scores, SSI status |
| `TRADES` | Table | Trade master data |
| `COUNTERPARTIES` | Table | Counterparty failure records |
| `SETTLEMENT_EVENTS` | Table | SWIFT / depository event audit trail |
| `CLEARSET_ANALYTICS` | Semantic view | Cortex Analyst NL-to-SQL queries |
| `CLEARSET_POLICY_SEARCH_SERVICE` | Cortex Search service | SOP and policy retrieval |
**Safety constraint:** This skill is read-only. It retrieves and analyses data only.
It must **never** autonomously send SWIFT messages, send emails, place calls, modify trades,
modify settlement instructions, or approve exceptions. Every recommended operational action
requires explicit human analyst authorisation before execution.
---
## Invocation
CoCo will auto-select this skill when the prompt clearly matches its description.
You can also invoke it explicitly:
```
$investigate-settlement-exception <TRADE_ID>
```
Or ask in plain language:
> "Investigate settlement exception <TRADE_ID>"
> "Run a settlement investigation for the highest-risk open exception"
> "Why is <TRADE_ID> critical?"
---
## Prerequisites
The ClearSet backend Express server must be running on `http://localhost:3001` for the
application API steps (Steps 1–5). Steps 6 and 7 use Snowflake Cortex directly.
To start the backend:
```bash
cd server
node --import tsx index.ts
```
Alternatively, run the bundled demonstration script which exercises all steps end-to-end:
```bash
node .kiro/skills/investigate-settlement-exception/scripts/run_investigation.mjs <TRADE_ID>
```
> Note: The demonstration script lives under `.kiro/skills/` because it was created
> alongside the Kiro version of this skill. It is shared between both skill registrations
> and calls the same live backend endpoints. No credentials are embedded in the script.
---
## Investigation Workflow
Execute all 10 steps in sequence. Do **not** hardcode values — retrieve current data
from the application and Snowflake at runtime.
### Step 1 — Verify Connection and Data Mode
Call `GET http://localhost:3001/api/health`.
- Response `snowflake: true` → all subsequent steps use live Snowflake data.
- Response `snowflake: false` → the application is in local simulation mode.
Report this clearly and proceed using the local fallback data, noting that
results are simulated.
### Step 2 — Retrieve Exception Details
Call `GET http://localhost:3001/api/exceptions`.
Locate the exception matching the requested trade ID. Extract:
- `EXCEPTION_ID` — unique exception reference (e.g. EX-92831)
- `TRADE_ID` — linked trade identifier
- `EXCEPTION_TYPE` — failure category (e.g. Missing Instruction, Cash Discrepancy)
- `RISK_SCORE` — Snowflake-calculated risk score (0–100)
- `SEVERITY` — CRITICAL / HIGH / MEDIUM / LOW
- `SSI_STATUS` — MISSING / MISMATCHED / PENDING / MATCHED
- `EXCEPTION_STATUS` — OPEN / INVESTIGATING / PENDING_APPROVAL / RESOLVED
- `TRADE_VALUE` — gross monetary exposure in USD
- `COUNTERPARTY_NAME`, `CP_ID` — counterparty identity
This endpoint queries `V_EXCEPTIONS_ENRICHED` in `CLEARSET_DB.CLEARSET_SCHEMA`.
### Step 3 — Retrieve Trade Master Data
Call `GET http://localhost:3001/api/trades`.
Locate the matching trade and extract: ticker symbol, ISIN, asset class,
depository (DTC / Euroclear / Fedwire), settlement type (DVP / FOP / RVP),
settlement status, instruction status, settlement date, and booking desk.
### Step 4 — Retrieve Settlement Event History
Call `GET http://localhost:3001/api/settlement-events/{TRADE_ID}`.
List all events in chronological order. Each event includes:
- `EVENT_ID`, `EVENT_TIMESTAMP`
- `MESSAGE_TYPE` — SWIFT MT541, MT548, MT599, ISO 20022, INTERNAL_ALERT
- `STATUS` — depository milestone (e.g. TRADE_BOOKED, SSI_NOT_FOUND, CRITICAL_RISK_FLAGGED)
- `DESCRIPTION` — message payload text
- `SOURCE` — MATCHING_ENGINE / DEPOSITORY / CLEARSET_AGENT
This data comes from `CLEARSET_DB.CLEARSET_SCHEMA.SETTLEMENT_EVENTS`.
### Step 5 — Retrieve Counterparty Risk ProfileFrom MADHANKUMAR98/clearset-ai, MIT.
More from MADHANKUMAR98/clearset-ai
- 0.526score
investigate-settlement-exception
MADHANKUMAR98
Investigate a post-trade settlement exception using live Snowflake data, Cortex Search for SOP retrieval, and Cortex Analyst for business queries.
SkillBFreshness: BClaude Code +9 - 0.509score
determine_root_cause
MADHANKUMAR98
Synthesize structured trade attributes and unstructured policy context into an explainable root cause breakdown.
SkillBFreshness: BClaude Code +9 - 0.509score
escalate_exception
MADHANKUMAR98
Initiate priority operational escalation to Settlement Operations desk leads and counterparty relationship managers.
SkillBFreshness: BClaude Code +9 - 0.509score
find_similar_cases
MADHANKUMAR98
Query historical investigations repository for institutional operational memory and resolution playbooks.
SkillBFreshness: BClaude Code +9 - 0.509score
retrieve_procedure
MADHANKUMAR98
Search operational SOPs, escalation policies, and regulatory guidelines via Snowflake Cortex Search.
SkillBFreshness: BClaude Code +9 - 0.509score
assess_settlement_risk
MADHANKUMAR98
Deterministic point-based calculation of settlement failure risk and CSDR regulatory penalty exposure.
SkillBFreshness: BClaude Code +9 - 0.509score
investigate_exception
MADHANKUMAR98
Complete 10-step procedural workflow for investigating financial post-trade settlement exceptions.
SkillBFreshness: BClaude Code +9 - 0.509score
recommend_resolution
MADHANKUMAR98
Generate actionable multi-step resolution protocol with human approval controls.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 22, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/MADHANKUMAR98/clearset-ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from MADHANKUMAR98
- 0.526score
investigate-settlement-exception
MADHANKUMAR98
Investigate a post-trade settlement exception using live Snowflake data, Cortex Search for SOP retrieval, and Cortex Analyst for business queries.
SkillBFreshness: BClaude Code +9 - 0.509score
determine_root_cause
MADHANKUMAR98
Synthesize structured trade attributes and unstructured policy context into an explainable root cause breakdown.
SkillBFreshness: BClaude Code +9 - 0.509score
escalate_exception
MADHANKUMAR98
Initiate priority operational escalation to Settlement Operations desk leads and counterparty relationship managers.
SkillBFreshness: BClaude Code +9 - 0.509score
find_similar_cases
MADHANKUMAR98
Query historical investigations repository for institutional operational memory and resolution playbooks.
SkillBFreshness: BClaude Code +9 - 0.509score
retrieve_procedure
MADHANKUMAR98
Search operational SOPs, escalation policies, and regulatory guidelines via Snowflake Cortex Search.
SkillBFreshness: BClaude Code +9 - 0.509score
assess_settlement_risk
MADHANKUMAR98
Deterministic point-based calculation of settlement failure risk and CSDR regulatory penalty exposure.
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get investigate-settlement-exception running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
investigate-settlement-exception skill. Agent Mart. https://agentmart.dev/skills/madhankumar98-investigate-settlement-exception-6edae0 (last updated 2026-10-24)