alpacalyzer-algo-trader: Skill for Claude Code

.agents/skills/observability/SKILL.md

observability is a skill for Claude Code, Codex from kimrejstrom/alpacalyzer-algo-trader. It costs 26 tokens per session (1,200 once invoked), scanned A, original, MIT.

A tool for reading structured runtime records from a trading application. It summarizes language-model calls, trades, errors, scans, costs, and recent runs.

In plain words
What is it for?
Use it to inspect model usage and cost, trade results, scanner activity, execution errors, response times, and overall run status.
Why use it?
It replaces guesswork and manual log reading with organized data about what the application did and where it failed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is kimrejstrom/alpacalyzer-algo-trader's own configuration. It tells Claude Code and Codex how to work on alpacalyzer-algo-trader itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything alpacalyzer-algo-trader configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/agent_metrics_summary.py.

Reuse

Borrowing it

Nothing to install: this file belongs to kimrejstrom/alpacalyzer-algo-trader. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kimrejstrom/alpacalyzer-algo-trader/main/.agents/skills/observability/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kimrejstrom/alpacalyzer-algo-trader

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for observability

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/observability/github.svg)](https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/observability)
Your own site
<a href="https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/observability"><img src="https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/observability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for observability

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/observability"><img src="https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,200 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00026 $0.01200
Opus 5 $0.00013 $0.00600
Sonnet 5 $0.00005 $0.00240
Haiku 4.5 $0.00003 $0.00120

Measured 11d ago against content hash 89d44ff9dc91, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

observability 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 11d 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.

.agents/skills/observability/SKILL.md · 138 lines

How it starts

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

Observability Skill

How It Works

All runtime metrics flow through the structured event system (events.jsonl). Every trading event, LLM call, and error is emitted as a typed Pydantic model via emit_event() and written as JSON lines to logs/events.jsonl by the FileEventHandler.

The metrics summary script reads this structured data directly — no regex parsing of free-text logs.

Running the Metrics Summary

python scripts/agent_metrics_summary.py

This outputs structured JSON with:

  • LLM metrics: Call count, latency, token usage, cost per agent
  • Trade metrics: Fills, rejects, entries, exits, PnL
  • Error metrics: Error rates by type and component
  • Scan metrics: Scanner activity by source
  • Last run info: Timestamp, duration, cycle count

Event Types

Event Source Key Fields
SCAN_COMPLETE Scanners source, tickers_found, duration
SIGNAL_GENERATED Execution engine ticker, action, confidence, strategy
SIGNAL_EXPIRED Signal queue ticker, created_at, reason
ENTRY_TRIGGERED Execution engine ticker, side, quantity, entry_price, stop_loss
EXIT_TRIGGERED Execution engine ticker, pnl, pnl_pct, reason
ORDER_SUBMITTED Order manager ticker, order_type, quantity
ORDER_FILLED Trade update handler ticker, side, filled_qty, avg_price
ORDER_REJECTED Trade update handler ticker, reason
POSITION_OPENED Execution engine ticker, side, entry_price, strategy
POSITION_CLOSED Execution engine ticker, pnl, pnl_pct, exit_reason
COOLDOWN_STARTED Cooldown manager ticker, duration
COOLDOWN_ENDED Cooldown manager ticker
CYCLE_COMPLETE Execution engine entries/exits triggered, duration
LLM_CALL LLMClient.complete_structured() agent, model, tier, latency_ms, tokens, cost
AGENT_REASONING show_agent_reasoning() agent, tickers, reasoning
ERROR Any component error_type, component, message

Read the full file on GitHub · 138 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. 11d ago First seen · 138 lines · 26 tokens per session scan A 89d44ff9dc91

Subscribe to this mod's changes

observability is a skill published in the GitHub repository kimrejstrom/alpacalyzer-algo-trader (2 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 1,200 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens