check-chain

A command that checks whether tastytrade’s listed options and delta-based strike choices work for the next relevant market expiration across configured symbols.

In plain words
What is it for?
Use it to test each configured symbol, choose today’s or the next trading day’s expiration based on Eastern Time, and report a result for each symbol.
Why use it?
It helps catch broken option data or strike-selection logic before trading decisions rely on them.

Command for Claude Code

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.

agentmods
npx agentmods add commands/joncovington/meicagent/check-chain
Clone the repo
git clone --depth 1 https://github.com/joncovington/MEICAgent

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01308
Opus 5 $0.00000 $0.00654
Sonnet 5 $0.00000 $0.00262
Haiku 4.5 $0.00000 $0.00131

Measured 2d ago against content hash 5865e514bff5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

check-chain 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 2d 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.

.claude/commands/check-chain.md · 125 lines

How it starts

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

Verify that the tastytrade option chain and delta-based strike selection are working for the relevant trading session, for every symbol in config.json's symbols list. Tests today's expiration if before 16:00 ET on a trading day; otherwise tests the next trading day. Repeat Steps 2–4 below once per symbol; report one row per symbol in the final table plus an overall verdict.


Step 1: Determine target expiration and symbol list

python -c "
import datetime, pytz, json
et = pytz.timezone('America/New_York')
now = datetime.datetime.now(et)
with open('config.json') as f:
    cfg = json.load(f)
year = str(now.year)
holidays = set(cfg.get('nyse_holidays_' + year, []))
def next_trading_day(d):
    d += datetime.timedelta(days=1)
    while d.weekday() >= 5 or str(d) in holidays:
        d += datetime.timedelta(days=1)
    return d
today = now.date()
today_is_trading = today.weekday() < 5 and str(today) not in holidays
if today_is_trading and now.hour < 16:
    target = today
    reason = 'today (market open or pre-cutoff)'
else:
    target = next_trading_day(today)
    reason = 'next trading day (market closed or after 16:00 ET)'
dte = (target - today).days
test_width = max(1, cfg['max_wing_width'] // 2)
symbols = cfg.get('symbols') or ([cfg['symbol']] if cfg.get('symbol') else ['XSP'])
print(json.dumps({'now_et': now.strftime('%H:%M %Z'), 'target_date': str(target), 'dte': dte, 'reason': reason, 'symbols': symbols, 'delta_target': cfg['delta_target'], 'test_wing_width': test_width}))
"

Record: target_date, dte, symbols (the full list to test), delta_target, test_wing_width, reason. Run Steps 2–4 once for each entry in symbols.


Step 2: Market overview

Call get_market_overview with symbols: [<symbol>].

Extract:

  • iv_rank and iv_percentile (strings — convert with float())
  • last underlying price to use as around_price in Steps 3 and 4

If last is absent or null (common after hours): proceed without around_price and note the omission — the chain window will center on the median strike rather than ATM.

Read the full file on GitHub · 125 lines

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. 2d ago First seen · 125 lines · 0 tokens per session scan A 5865e514bff5

Subscribe to this mod's changes

check-chain is a command published in the GitHub repository joncovington/MEICAgent (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,308 tokens. 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-31.