alpacalyzer-algo-trader: Skill for Claude Code

.agents/skills/execution/SKILL.md

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

Development guidance for the part of a trading application that turns signals into orders and tracks open positions.

In plain words
What is it for?
Use it when modifying the execution engine, signal queue, position tracking, cooldowns, or order management.
Why use it?
It clarifies which files to change and preserves the rule that exits are handled before new entries, helping protect available trading capital.

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 →

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/execution/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 execution

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/execution/github.svg)](https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/execution)
Your own site
<a href="https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/execution"><img src="https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/execution/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 execution

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimrejstrom/alpacalyzer-algo-trader/execution"><img src="https://agentmods.dev/badge/skills/kimrejstrom/alpacalyzer-algo-trader/execution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 730 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.00033 $0.00730
Opus 5 $0.00016 $0.00365
Sonnet 5 $0.00007 $0.00146
Haiku 4.5 $0.00003 $0.00073

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

Security

Grade A, and why

execution 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 9d 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/execution/SKILL.md · 90 lines

How it starts

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

Scope Constraint

  • Execution files: src/alpacalyzer/execution/
  • Tests: tests/test_execution*.py

Architecture

ExecutionEngine
├── SignalQueue      — priority queue of pending signals
├── PositionTracker  — tracks open positions with P&L
├── CooldownManager  — rate limiting per ticker
└── OrderManager     — bracket orders (entry + stop + target)

Key invariant

Exits are ALWAYS processed before entries. This protects capital.

Steps

1. Study the execution cycle

Read src/alpacalyzer/execution/engine.py, focusing on run_cycle():

  1. Sync positions from broker
  2. Process exits (capital protection first)
  3. Process entries (new positions)
  4. Update cooldowns
  5. Emit summary event

2. Understand each component

Component File Key class
Engine src/alpacalyzer/execution/engine.py ExecutionEngine, ExecutionConfig
Signals src/alpacalyzer/execution/signal_queue.py SignalQueue, PendingSignal
Positions src/alpacalyzer/execution/position_tracker.py PositionTracker, TrackedPosition
Cooldowns src/alpacalyzer/execution/cooldown.py CooldownManager
Orders src/alpacalyzer/execution/order_manager.py OrderManager, OrderParams
State src/alpacalyzer/execution/state.py Shared state models

3. Make changes

Read the specific component file before modifying. Key patterns:

  • SignalQueue uses heapq (lower priority number = processed first)
  • PositionTracker uses dict for O(1) lookups, syncs from Alpaca each cycle
  • OrderManager submits bracket orders (entry + stop loss + target)
  • analyze_mode=True skips real order submission

4. Write tests

Follow patterns in existing execution tests. Always:

Read the full file on GitHub · 90 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. 9d ago First seen · 90 lines · 33 tokens per session scan A 7c7f4e3d0e29

Subscribe to this mod's changes

execution is a skill published in the GitHub repository kimrejstrom/alpacalyzer-algo-trader (2 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 730 once invoked, about $0.0002 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