Prediction Market Risk Review
affaan-m/ECC
Review prediction-market, basket, oracle, and trading-agent workflows for compliance, safety, data-quality, privacy, and execution risk.
Turn a natural-language financial question into a polished, self-contained HTML report.
$ npx skills add refraction-ray/xalpha --skill question2report -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install refraction-ray/xalpha question2report --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/question2report .claude/skills/question2report && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .claude/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2reportType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add refraction-ray/xalpha --skill question2report -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install refraction-ray/xalpha question2report --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/question2report .agents/skills/question2report && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .agents/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add refraction-ray/xalpha --skill question2report -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install refraction-ray/xalpha question2report --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/question2report .cursor/skills/question2report && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .cursor/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/refraction-ray/xalpha.git --path .agents/skills/question2report--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add refraction-ray/xalpha --skill question2report -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install refraction-ray/xalpha question2report --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/question2report .gemini/skills/question2report && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .gemini/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install refraction-ray/xalpha question2reportInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add refraction-ray/xalpha --skill question2report -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/question2report .github/skills/question2report && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .github/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add refraction-ray/xalpha --skill question2report -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install refraction-ray/xalpha question2report --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/refraction-ray/xalpha.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/question2report .opencode/skills/question2report && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "question2report" agent skill from https://github.com/refraction-ray/xalpha/tree/master/.agents/skills/question2report into .opencode/skills/question2report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "question2report", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
question2reportTurn a natural-language financial question into a polished, self-contained HTML report.
Question2report is an agent skill from refraction-ray/xalpha. Turn a natural-language financial question into a polished, self-contained HTML report. Covers the full pipeline: requirement analysis → scope negotiation → data fetching → data cleaning → quantitative analysis → visualization → beautiful HTML output. Use when the user asks for any financial data comparison, fund screening, index analysis, or strategy back-test that should end with a deliverable report.
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `examples/sample_report_structure.md`).
It sits in Data & Analytics, covering Data cleaning, Trading and backtesting and HTML artifacts. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a072712. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Question2report loads about 3.2k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 1,414 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from refraction-ray/xalpha at commit a072712, republished under its MIT licence (© refraction-ray). 1,414 words, ~3,203 tokens.
.claude/skills/question2report/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Transform a user's free-form financial question into a production-quality, self-contained HTML report with embedded charts and tables.
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
└──────────────────┘Parse the user's natural-language question and extract:
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.
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?Wait for user confirmation before proceeding. Adjust scope if requested.
Do NOT assume which xalpha APIs to use. Instead:
xalpha/__init__.py, outlines of key modules like
universal.py, info.py, toolbox.py, evaluate.py, indicator.py, etc.start in __init__).To accelerate discovery, prioritize these common interfaces in the xalpha package:
xalpha.universal)xa.get_daily(code, start=None, end=None): The "universal" historical data fetcher.
SH600000 (prefix SH/SZ + 6-digit code).HK00700.AAPL, MSFT.F000001 (unit net value), T000001 (accumulated net value).peb-SH000300 (Index PE/PB, requires JQData), peb-600000 (Stock PE/PB, handles 6-digit codes automatically, no JQ required).xa.get_rt(code): Fetches real-time price and basic metadata (name, market, etc.).
xalpha.info)xa.fundinfo(code, path=None, priceonly=True): Core class for fund data..price: DataFrame with date and netvalue..get_holdings(year, season): Quarterly holdings data.xalpha.trade, xa.multiple)xa.trade(fund_obj, status_df): Backtests a single fund/asset based on a transaction table (status_df).xa.itrade(fund_obj, status_df): For exchange-traded assets (stocks/ETFs).xa.multiple(trade_list): Aggregates multiple trade/itrade objects into a portfolio..v_totvalue(): Visualizes the portfolio total value curve..combsummary(): Generates a summary table of the portfolio performance.xalpha.evaluate, xa.toolbox)xa.evaluate(asset_obj): Provides comprehensive performance metrics (Sharpe, Max Drawdown).xa.compare(list_of_objs, start=None): Compares multiple assets/strategies on a normalized (1.0) scale.xalpha.indicator)xa.indicator(daily_df): Wraps a daily price DataFrame to compute indicators like MA, RSI, MACD.Write a single self-contained Python script that:
xalpha and any needed stdlib/pandas/numpy modules.test_api.py, diag.py) or temporary files to debug, create them directly in the target report folder or move them there immediately.datetime64.Run the script using the user's specified Python/conda environment. If not specified, use the system default.
Compute metrics appropriate to the user's question. Do not blindly apply a fixed set of metrics. Choose what makes sense:
The agent should determine which metrics are relevant based on the question context.
Apply these principles to avoid common pitfalls in quantitative reporting:
This is the most important step for user experience. The report must be:
cdn.jsdelivr.net or cdnjs.cloudflare.com). ECharts is strongly recommended for financial data because of its native support for data zoom sliders, interactive legends, crosshairs, CJK tooltips, and high-quality styling.<script> block. This allows the browser to perform calculations (such as dynamic start/end date selection and real-time return metrics calculation).Follow the design system in templates/report_style.css:
#27ae60), negative in red (#e74c3c).Every report should include (adapt as needed):
All generated artifacts—including the fetching/analysis Python scripts, intermediate data files (JSON/CSV), and the final HTML report—must be organized into a dedicated folder.
<project_root>/doc/samples/reports/<descriptive_name>_<YYYYMMDD>/The folder structure should look like this:
<report_folder>/
├── <fetch_and_analyze_script>.py
├── <generate_report_script>.py
├── <data_results>.json
└── <final_report>.htmlAfter the report is generated successfully:
test_fetch.py, diag.py, data.csv) in the project root.TypeError in xalpha.multiple or ZeroDivisionError in combsummary), document the patch you applied in the Methodology Note of the report.© refraction-ray, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in .agents/skills/question2report of refraction-ray/xalpha.
Open the folder on GitHubat commit a072712
Question2report next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Question2report this skillrefraction-ray/xalpha | 2.7k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Prediction Market Risk Reviewaffaan-m/ECC | 274k | 1 repos | ~471 | Automated safety check: Pass | MIT | |
| Cja Dimension Analysisadobe/skills | 195 | — | ~3.3k | Automated safety check: Pass | Apache-2.0 | |
| Openbb Data Fetchermonarchjuno/vibe-investing | 299 | — | ~2.9k | Automated safety check: Notes | MIT | |
| Polymarketmachina-sports/sports-skills | 242 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Feature Engineeringagiprolabs/claude-trading-skills | 410 | — | ~2.7k | Automated safety check: Pass | MIT |
affaan-m/ECC
Review prediction-market, basket, oracle, and trading-agent workflows for compliance, safety, data-quality, privacy, and execution risk.
adobe/skills
Comprehensive dimension analysis and reporting for CJA. An agent skill from adobe/skills.
monarchjuno/vibe-investing
Fetch financial, market, economic, fundamental, news, options, crypto, ETF, index, and macro data through the OpenBB Python interface instead of the OpenBB MCP server.
machina-sports/sports-skills
Polymarket sports prediction markets — read-only live odds, prices, order books, events, series, and market search.
agiprolabs/claude-trading-skills
Feature construction from market data for ML trading models including price, volume, on-chain, and microstructure features
agiprolabs/claude-trading-skills
Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions
Categories
Turn a natural-language financial question into a polished, self-contained HTML report. Question2report is an agent skill from refraction-ray/xalpha. Turn a natural-language financial question into a polished, self-contained HTML report.
Question2report fits situations like: the user asks for any financial data comparison; strategy back-test that should end with a deliverable report.
Run `npx skills add refraction-ray/xalpha --skill question2report -a claude-code`. Or copy the skill folder (.agents/skills/question2report in refraction-ray/xalpha) into .claude/skills/question2report in your project. Claude Code loads it when a task matches its description.
Run `npx skills add refraction-ray/xalpha --skill question2report -a codex`. Or copy the skill folder (.agents/skills/question2report in refraction-ray/xalpha) into .agents/skills/question2report in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add refraction-ray/xalpha --skill question2report -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/question2report, .gemini/skills/question2report, .github/skills/question2report and .opencode/skills/question2report in your project.
SKILL.md names no scripts, command-line tools or credentials: Question2report is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Question2report is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Question2report: Prediction Market Risk Review (affaan-m/ECC, 274k stars), Cja Dimension Analysis (adobe/skills, 195 stars), Openbb Data Fetcher (monarchjuno/vibe-investing, 299 stars) and Polymarket (machina-sports/sports-skills, 242 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
refraction-ray (a GitHub user) maintains it in refraction-ray/xalpha, which has 2,720 GitHub stars. The repository was last updated on July 25, 2026.
Source: refraction-ray/xalpha on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.