question2report

A workflow that turns a natural-language financial question into a self-contained HTML report. It covers choosing the scope, obtaining and cleaning data, calculating results, and adding charts and tables.

In plain words
What is it for?
Use it for questions comparing investments, funds, indexes, or strategies when the result should be a polished HTML report.
Why use it?
It organizes the work needed to answer financial comparisons consistently instead of leaving data collection and analysis undefined.

Skill for Claude CodeCodex

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 skills/refraction-ray/xalpha/question2report
Any agent
npx skills add refraction-ray/xalpha --skill question2report
Clone the repo
git clone --depth 1 https://github.com/refraction-ray/xalpha

Made for: Claude Code, Codex.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,002 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.00075 $0.03002
Opus 5 $0.00037 $0.01501
Sonnet 5 $0.00015 $0.00600
Haiku 4.5 $0.00007 $0.00300

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

Security

Grade A, and why

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

.agents/skills/question2report/SKILL.md · 248 lines

How it starts

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

Question → Report Skill

Transform a user's free-form financial question into a production-quality, self-contained HTML report with embedded charts and tables.

Pipeline

User Question
     │
     ▼
┌──────────────────┐
│ 1. ANALYZE       │  Parse intent, identify assets, metrics, time range
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ 2. CONFIRM       │  Present analysis plan to user; agree on scope
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ 3. DISCOVER API  │  Explore the xalpha codebase to find suitable APIs
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ 4. FETCH & CLEAN │  Write & run a Python script; handle errors & NaN
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ 5. ANALYZE DATA  │  Compute metrics appropriate to the question
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ 6. GENERATE HTML │  Build a beautiful, self-contained HTML report
└──────────────────┘

Step 1 — Analyze the Question

Parse the user's natural-language question and extract:

  • Subject: What assets, funds, indices, or strategies are being discussed?
  • Comparison / benchmark: Is there a reference to compare against?
  • Time range: Explicit dates, or implied ("last 3 years", "since inception"). Default to the most recent 3 full calendar years if unspecified.
  • Desired output: What kind of insights does the user want? (rankings, trend comparison, risk analysis, prediction accuracy, etc.)

If fund codes or asset identifiers are not given, research them via web search or by exploring the xalpha codebase for relevant list/search APIs.

Step 2 — Confirm Scope

Before any data work, present a concise plan to the user:

📋 Analysis Plan
─────────────────────────────────
Subject   : <what is being analyzed>
Assets    : <list of codes / tickers>
Period    : <start> → <end>
Analysis  : <what metrics / comparisons will be computed>
Charts    : <what visualizations will be included>
─────────────────────────────────
Shall I proceed, or would you like to adjust?

Read the full file on GitHub · 248 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 248 lines · 75 tokens per session scan A 8644d4e6ed65

Subscribe to this mod's changes

question2report is a skill published in the GitHub repository refraction-ray/xalpha (2,688 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 3,002 once invoked, about $0.0004 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.