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.
npx agentmods add commands/austron24/kalshi-trader-plugin/finalizegit clone --depth 1 https://github.com/austron24/kalshi-trader-pluginWrote 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.
[](https://agentmods.dev/commands/austron24/kalshi-trader-plugin/finalize)<a href="https://agentmods.dev/commands/austron24/kalshi-trader-plugin/finalize"><img src="https://agentmods.dev/badge/commands/austron24/kalshi-trader-plugin/finalize.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00017 | $0.03240 |
| Opus 5 | $0.00009 | $0.01620 |
| Sonnet 5 | $0.00003 | $0.00648 |
| Haiku 4.5 | $0.00002 | $0.00324 |
Grade A, and why
finalize 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 442 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Finalize - Investment Recommendations
THIS COMMAND IS DIFFERENT FROM ALL OTHERS.
You are NOT spawning subagents. YOU are the final analyst. You will read ALL research documents directly in your context, synthesize everything, and advise the user on exactly what to do with their money.
This is the most critical step in the entire workflow. The user is about to move real money based on your analysis.
Your Role
You are the user-facing investment analyst. Your job is to:
- Read ALL research for the top EVENTS completely (in YOUR context, not subagents)
- Check the user's current portfolio and cash
- Recommend specific positions with sizing (using the recommended bracket/ticker from research)
- Explain each recommendation in plain language
- Wait for user approval
- Execute approved trades via kalshi CLI
Phase 1: Identify Top Events
First, check what events to analyze. Either:
From /score output in conversation:
Look at previous messages for the ranked list from /score. Each score includes the recommended ticker.
Or from score files:
for dir in research/events/*/; do
event=$(basename "$dir")
if [ -f "${dir}score.txt" ]; then
score_line=$(cat "${dir}score.txt")
score=$(echo "$score_line" | cut -d'|' -f1)
ticker=$(echo "$score_line" | cut -d'|' -f2)
echo "${score}|${event}|${ticker}"
fi
done | sort -t'|' -k1 -rn | head -10
$ARGUMENTS may specify which events to analyze (e.g., "KXCPI-25DEC KXFED-26JAN").
Phase 2: Read ALL Research Completely
CRITICAL: You must read every research file for each event. Not summaries. Not excerpts. The full files.
For each top event:
ls research/events/<EVENT_TICKER>/
Then use the Read tool to read EVERY file in that folder completely:
- initial-research.md (contains bracket analysis and recommended trade)
- creative-research.md (if exists)
- senior-review.md (if exists)
- Any other research files
The initial research includes a "Recommended Trade" section with the specific bracket/ticker to trade.
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.
- 4d ago First seen · 442 lines · 17 tokens per session scan A 4ac72cf243ca
finalize is a command published in the GitHub repository austron24/kalshi-trader-plugin (12 stars, last pushed 8mo ago), licensed MIT. It adds 17 tokens to every session and 3,240 once invoked, about $0.0001 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.
Other commands, from other repositories
data-activity
Access user trading activity, transaction history, and order events.
data-positions
Query user positions, portfolio holdings, and calculate P&L metrics.
ws-intro
Polymarket provides WebSocket APIs for real-time streaming of market data, orderbook updates, trades, and user-specific events. Use WebSockets to build responsive trading interfaces and live data dashboards.
data-intro
The Data API provides access to user-specific data, portfolio information, trading activity, and leaderboard rankings. Unlike the CLOB API which focuses on trading operations, the Data API is designed for analytics, portfolio tracking, and user insights.
clob-intro
The Central Limit Order Book (CLOB) API is Polymarket's core trading infrastructure. It provides endpoints for.
performance
Generate a strategy performance report with key metrics.