Claude Skills & Developer Tools
Relevant source files
The following files were used as context for generating this wiki page:
Claude Skills and Developer Tools comprise the agentic execution and diagnostic infrastructure within the OpenAlgo platform. These tools enable AI coding agents (such as Claude) to interact with the trading platform through specialized skill packages and provide developers with robust diagnostic surfaces to monitor system health, latency, and operational logs.
The system is designed to facilitate "agentic trading," allowing AI assistants to perform complex tasks like executing multi-market backtests, custom indicator charting, and live order execution via a Model Context Protocol (MCP) interface. Developers benefit from centralized diagnostic pages that aggregate host info, hardware usage, and structured error logs.
Sources: CLAUDE.md:31-35, okf/overview.md:20-22, README.md:126-130
Claude Skill Packages
OpenAlgo provides dedicated skill packages located in .claude/skills/ that provide detailed procedures for Claude Code when working in the repository. These skills teach AI agents how to perform specific high-level operations.
| Skill | Purpose | Key Functionality |
|---|---|---|
| Execution | Agentic Execution | Order execution, custom algorithms, scanners, and streaming. |
| Indicators | Technical Analysis | Charting, custom indicators, and live feeds. |
| Backtesting | Strategy Validation | VectorBT integration for multi-market backtests with realistic costs. |
| fd-audit | Resource Hygiene | Mandatory audit run after changes to DB, WebSockets, threads, or sockets. |
| version-bump | Release Management | Handling platform releases or bumping pinned SDK versions. |
| broker-integration | Plugin Development | Adding or modifying broker-specific plugins. |
Sources: CLAUDE.md:22-29, okf/log.md:8-9, okf/overview.md:22
Model Context Protocol (MCP) Infrastructure
The MCP implementation allows AI assistants to execute trades and retrieve data using natural language commands. It operates through two primary remote-facing surfaces: blueprints/mcp_http.py (Remote MCP) and blueprints/mcp_oauth.py (OAuth surface).
Architecture and Data Flow
The HTTP transport for Remote MCP uses a streamable JSON-RPC 2.0 dispatcher for tool calls and a Server-Sent Events (SSE) stream for keepalives and notifications.
This diagram shows the flow from an external AI assistant through the Remote MCP dispatcher to the local broker API.
Sources: blueprints/mcp_http.py:16-30, CLAUDE.md:43-46
Security and Rate Limiting
Remote MCP enforces a strict security model:
- Scope Verification: Access is restricted by scope (e.g.,
read:orders,write:orders). - Audit Logging: Every tool call is appended to
log/mcp.jsonlwith timestamps, JTI, and client IDs. - Kill Switch: Admins can atomically revoke every refresh token via the dashboard.
- Write Notifications: A pre-write Telegram notification is triggered before execution of orders.
Sources: blueprints/mcp_http.py:25-34, 153-167, blueprints/admin.py:868-874
System Diagnostics and Monitoring
Developers access system health via the /admin/diagnostics surface, which provides real-time insights into host environment, hardware utilization, and log aggregation.
Diagnostic Probes
The platform includes active probes to measure internal latency and connectivity.
The sequence above illustrates the button-triggered latency probe workflow.
Sources: blueprints/admin.py:650-700, frontend/src/pages/admin/Diagnostics.tsx:103-115
Logs and Error Tracking
OpenAlgo uses a structured JSONL logging system to track errors and system events:
- errors.jsonl: Centralized error log truncated to the last 1000 entries at startup.
- mcp.jsonl: Audit trail for AI tool calls.
- Fingerprinting: Errors are aggregated by fingerprint (module + exception class) to group recurring issues.
Sources: CLAUDE.md:144-150, blueprints/admin.py:465-475, 520-530
Developer Workspace
The workspace/ directory serves as a personal working area for developers to store research, scratch data, and indicator scripts without affecting the main repository.
workspace/
├── indicators/ # Generated by indicator skills
│ ├── charts/ # Chart scripts (/indicator-chart)
│ ├── scanners/ # Scanner scripts (/indicator-scanner)
│ ├── custom/ # Indicator modules (/custom-indicator)
│ └── output/ # Rendered .html / .png / .csv
├── research/ # Ad-hoc analysis and notebooks
└── backtests/ # Backtest runs and results
Sources: workspace/readme.md:5-18
Operational Invariants
Developers must adhere to specific runtime constraints:
- Single Worker: Gunicorn must run with
-w 1because Flask-SocketIO state is in-process. - ZMQ Bus: ZeroMQ publishers must always
connect()to the bound SUB proxy; they must neverbind(). - Database Hygiene: All SQLite engines must use
NullPoolto prevent connection leakage.
Sources: CLAUDE.md:60-65, 83-90, 118-120
Summary
Claude Skills and Developer Tools provide a bridged environment where AI-driven strategy execution meets traditional system administration. By combining specialized AI skill instructions with robust remote-execution protocols (MCP) and comprehensive diagnostic surfaces, the platform ensures that both agents and human developers have the necessary visibility and control over production trading environments.
Sources: CLAUDE.md:1-10, README.md:1-10