investigate-settlement-exception
Investigate a post-trade settlement exception using live Snowflake data, Cortex Search for SOP retrieval, and Cortex Analyst for business queries.
Skill by MADHANKUMAR98
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
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
- Runs as
- Node.js package
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 using live Snowflake data, Cortex Search for SOP retrieval, and Cortex Analyst for business queries. Produces a structured investigation summary with deterministic risk scoring and a human-approval-gated resolution recommendation.
- License
- MIT
- Instructions
- 232 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- run_investigation.mjs · scripts/
SKILL.md (first lines)
# ClearSet AI — Settlement Exception Investigation Skill
## Purpose
This skill orchestrates a complete post-trade settlement exception investigation for ClearSet AI.
It calls the live Express backend (running at `http://localhost:3001`) which is connected to
`CLEARSET_DB.CLEARSET_SCHEMA` in Snowflake.
**Never perform irreversible operational actions** (SWIFT message dispatch, trade modification,
email/phone notification) without explicit human analyst approval. This skill is analysis-only.
---
## How to Invoke
Ask in chat:
> "Investigate settlement exception TRD-92831"
> "Run a settlement investigation for trade TRD-92831"
> "Investigate the highest-risk settlement exception"
Or run the demonstration script directly:
```bash
node .kiro/skills/investigate-settlement-exception/scripts/run_investigation.mjs TRD-92831
```
---
## Investigation Workflow (10 Steps)
When asked to investigate a settlement exception, execute the following steps in order.
For each step, call the appropriate live endpoint or service. Do NOT hardcode any data values.
### Step 1 — Verify Backend Health
Before anything else, call `GET http://localhost:3001/api/health`.
- If `snowflake: true` → proceed with live Snowflake data.
- If `snowflake: false` → report that the backend is in local simulation mode and continue
with the local fallback data available in `src/data/syntheticData.ts`.
### Step 2 — Retrieve Exception Details
Call `GET http://localhost:3001/api/exceptions`.
Find the exception matching the requested trade ID. Extract:
- `EXCEPTION_ID`, `TRADE_ID`, `EXCEPTION_TYPE`, `RISK_SCORE`, `SEVERITY`
- `SSI_STATUS`, `EXCEPTION_STATUS`, `TRADE_VALUE`
- `COUNTERPARTY_NAME`, `CP_ID`
Expected for TRD-92831:
```
EXCEPTION_ID: EX-92831
TRADE_VALUE: 2400000
RISK_SCORE: 91
SEVERITY: CRITICAL
EXCEPTION_TYPE: Missing Instruction
SSI_STATUS: MISSING
CP_ID: CP-192
```
### Step 3 — Retrieve Trade Details
Call `GET http://localhost:3001/api/trades`.
Find TRD-92831 and extract: ticker, ISIN, asset class, depository, settlement type,
settlement status, instruction status, currency.
### Step 4 — Retrieve Settlement Events
Call `GET http://localhost:3001/api/settlement-events/{TRADE_ID}`.
List all SWIFT/depository events in chronological order. For TRD-92831, expect 5 live events
from Snowflake `SETTLEMENT_EVENTS` table including SWIFT MT541, MT548, and INTERNAL_ALERT types.
### Step 5 — Retrieve Counterparty Profile
Call `GET http://localhost:3001/api/counterparties/{CP_ID}`.
Extract: `NAME`, `BIC`, `CREDIT_RATING`, `PRIOR_FAILURES_30D`, `HISTORICAL_FAIL_RATE`,
`AVG_RESOLUTION_HOURS`, `PRIMARY_DESK_CONTACT`.
Expected for CP-192:
```
NAME: Apex Prime Clearing Ltd.
PRIOR_FAILURES_30D: 7
HISTORICAL_FAIL_RATE: 8.4
```
### Step 6 — Retrieve Applicable SOP via Cortex Search
Call `POST http://localhost:3001/api/cortex/search` with:
```json
{
"query": "missing settlement instruction expedited SSI repair close to cutoff",
"limit": 3
}
```
Extract the top matching policy document code, section, and title.
Expected top result:
```
DOC_CODE: SOP-3.2
POLICY_SECTION: Expedited SSI Repair
```
This uses Snowflake Cortex Search over the live `POLICY_CHUNKS` table.
### Step 7 — Query Cortex Analyst for Analytical Confirmation
Call `POST http://localhost:3001/api/cortex/analyst` with:
```json
{
"question": "Show me trade TRD-92831 with its trade value, settlement status, instruction status, risk score, and exception type."
}
```From MADHANKUMAR98/clearset-ai, MIT.
More from MADHANKUMAR98/clearset-ai
- 0.524score
investigate-settlement-exception
MADHANKUMAR98
Investigate a post-trade settlement exception for ClearSet AI.
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
determine_root_cause
MADHANKUMAR98
Synthesize structured trade attributes and unstructured policy context into an explainable root cause breakdown.
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.524score
investigate-settlement-exception
MADHANKUMAR98
Investigate a post-trade settlement exception for ClearSet AI.
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
Cite this page
investigate-settlement-exception skill. Agent Mart. https://agentmart.dev/skills/madhankumar98-investigate-settlement-exception (last updated 2026-10-24)