Agent skill

X2strategy

by ALAGENT-HKU in ALAGENT-HKU/x2strategy

ALAGENT X2Strategy: any research input (PDF paper, Markdown draft, DOCX report, text notes, or keyword search) → structured strategy specification → executable Backtrader code → backtest → diagnosis…

No licenceAuto-check: notesDocuments & Office

Install X2strategy

skills CLI
$ npx skills add ALAGENT-HKU/x2strategy --skill x2strategy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ALAGENT-HKU/x2strategy x2strategy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
x2strategy
GitHub stars
277
Token cost
~4.2k tokens
SKILL.md length
1,503 words
Files
79 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
None found

At a glance

ALAGENT X2Strategy: any research input (PDF paper, Markdown draft, DOCX report, text notes, or keyword search) → structured strategy specification → executable Backtrader code → backtest → diagnosis…

  • Works in 3 steps: Workspace Location → LLM API Key → Python Environment
  • The user wants to analyze a quant paper
  • SKILL.md covers Capabilities, Interaction Principles, First-Run Setup and Single Workflow, plus 7 more sections
  • Runs Python scripts from its folder; calls uv, just and pip; reaches platform.deepseek.com and openrouter.ai; needs DEEPSEEK_API_KEY and OPENROUTER_API_KEY

What it does

X2strategy is an agent skill from ALAGENT-HKU/x2strategy. ALAGENT X2Strategy: any research input (PDF paper, Markdown draft, DOCX report, text notes, or keyword search) → structured strategy specification → executable Backtrader code → backtest → diagnosis report. Two core capabilities: (1) paper2spec extracts multi-strategy specs from any document via 5-layer LLM extraction, and (2) spec2code generates validated Backtrader code, runs backtests, and compares against paper metrics. Use this skill whenever the user wants to analyze a quant paper, extract trading…

Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 83 other files, including scripts, reference files and assets (for example `README.md`, `README_CN.md` and `assets/backtrader_template.py`).

It sits in Documents & Office, covering Trading and backtesting and Word documents. It works with Microsoft Word. The repository describes itself as: Extract structured strategy specifications from quantitative finance research papers — Agent Skill for GitHub Copilot & Claude Code.

When your agent uses it

  • The user wants to analyze a quant paper
  • Extract trading strategies
  • Generate strategy code
  • Search for papers

Example prompts

  • “look at this paper”
  • “what strategies does this use”
  • “implement this strategy”
  • “/x2strategy”

Requirements

  • Python 3
  • A credential in DEEPSEEK_API_KEY
  • A credential in OPENROUTER_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Workspace Location
  2. LLM API Key
  3. Python Environment

What it can do on your machine

Read from SKILL.md and the folder at commit e9cd907. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships 1 file in scripts/ (Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • just
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • platform.deepseek.com
    • openrouter.ai

    Also links to:

    • docs.litellm.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DEEPSEEK_API_KEY
    • OPENROUTER_API_KEY
    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

X2strategy loads about 4.2k tokens when it runs, and up to ~29k if it reads all its reference files. Until then it costs about 249 tokens; SKILL.md has 1,503 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~249
When it runs · the whole SKILL.md, loaded when a task matches
~4.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~29k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:134
    implementation. Persist all choices to `.env` (gitignored) for session stability.
  • NoteMentions a .env fileSKILL.md:142
    ER2SPEC_LIBRARY_PATH=/absolute/path` to `.env`.
  • NoteMentions a .env fileSKILL.md:158
    received, write key + matching model to `.env`, then verify:
  • NoteMentions a .env fileSKILL.md:162
    `.env` format examples per provider.
  • NoteMentions a .env fileSKILL.md:199
    1. **Setup** — verify `.env`, library path, API key if needed, Python environment, and user-selected scope.
  • NoteMentions a .env fileSKILL.md:302
    Full config + .env examples: [references/skill-internals.md](references/skill-internals.md)
  • NoteMentions a .env fileSKILL.md:314
    nals.md) — Script flags, output formats, .env examples, library management, project structure

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); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 1,503 words (~4,195 tokens).

“Any finance-related input → Strategy spec → Executable code → Backtest → Diagnosis.”

— opening of SKILL.md by ALAGENT-HKU
name
x2strategy
argument-hint
[paper.pdf | strategy.md | report.docx | search query]
metadata.version
0.6.1
metadata.author
ALAGENT AI (alagent-ai)
metadata.tags
quantitative-finance, paper-parsing, strategy-extraction, code-generation, backtesting

Read the full SKILL.md on GitHub

Files

SKILL.md and 78 other files (scripts, references, assets) in the repository root of ALAGENT-HKU/x2strategy.

  • SKILL.md
  • .env.example
  • .gitignore
  • .python-version
  • README.md
  • README_CN.md
  • assets/alagent_logo.png
  • assets/alagent_logo.svg
  • assets/backtrader_template.py
  • assets/wechat_QR.jpg
  • docs/ARCHITECTURE.md
  • examples/upsa/README.md
  • examples/upsa/input/P10_Kelly_Malamud_Pourmohammadi_Trojani_2025_NBER.pdf
  • examples/upsa/input/jkp_factors_long.csv
  • examples/upsa/input/jkp_factors_wide.csv
  • examples/upsa/input/sample_instruction.md
  • … and 63 more

Open the folder on GitHubat commit e9cd907

Compare with similar skills

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

X2strategy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
X2strategy this skillALAGENT-HKU/x2strategy277—~4.2kAutomated safety check: NotesNone
Officecli Commonly TemplatesTeam-Commonly/commonly1.4k—~1.7kAutomated safety check: PassApache-2.0
Financial Reportmonarchjuno/vibe-investing299—~1.3kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Docx4jplutext/docx4j2.4k—~2.5kAutomated safety check: PassNone
Cyber Pptcrazyykhllc-bit/CyberPPT1.8k—~10kAutomated safety check: PassMIT

Similar skills

  • Officecli Commonly Templates

    Team-Commonly/commonly

    A skill your agent uses when producing a polished, Commonly-branded deliverable (.docx brief / memo, .xlsx data matrix, .pptx deck) and you do not have specific brand guidance from the user.

    1.4k GitHub stars~1.7k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Financial Report

    monarchjuno/vibe-investing

    Package investing analysis into a publishable financial-report style with institutional section flow, thesis framing, valuation context, catalysts, risks, tables, and financial charts.

    299 GitHub stars~1.3k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Docx4j

    plutext/docx4j

    A skill your agent uses when writing Java code that creates, reads or edits Word (.docx), PowerPoint (.pptx) or Excel (.xlsx) files with docx4j — including generating documents, editing existing…

    2.4k GitHub stars~2.5k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Cyber Ppt

    crazyykhllc-bit/CyberPPT

    当用户需要把 DOCX、PDF、TXT、XLSX、研究报告、业务材料或原始数据转成高密度、可编辑、咨询风格 PPTX 时使用;也适用于需要 SCR 论证、视觉风格探索、详细图表和渲染质检的 PPT。

    1.8k GitHub stars~10k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Turns a vague, high-level stakeholder ask into a structured set of intelligence requirements for a CTI team, complete with Essential Elements of Information, collection guidance, success criteria…

    3.8k GitHub stars~6k tokensUpdated today
    Documents & OfficeAuto-check passed

Works with

Questions about X2strategy

What does X2strategy do?

ALAGENT X2Strategy: any research input (PDF paper, Markdown draft, DOCX report, text notes, or keyword search) → structured strategy specification → executable Backtrader code → backtest → diagnosis…. X2strategy is an agent skill from ALAGENT-HKU/x2strategy. ALAGENT X2Strategy: any research input (PDF paper, Markdown draft, DOCX report, text notes, or keyword search) → structured strategy specification → executable Backtrader code → backtest → diagnosis report.

When should I use X2strategy?

X2strategy fits situations like: the user wants to analyze a quant paper; extract trading strategies; generate strategy code; search for papers.

How do I install X2strategy in Claude Code?

Run `npx skills add ALAGENT-HKU/x2strategy --skill x2strategy -a claude-code`. Or copy the skill folder (the ALAGENT-HKU/x2strategy repository) into .claude/skills/x2strategy in your project. Claude Code loads it when a task matches its description.

How do I install X2strategy in Codex?

Run `npx skills add ALAGENT-HKU/x2strategy --skill x2strategy -a codex`. Or copy the skill folder (the ALAGENT-HKU/x2strategy repository) into .agents/skills/x2strategy in your project. Codex loads it when a task matches its description.

Can I use X2strategy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ALAGENT-HKU/x2strategy --skill x2strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/x2strategy, .gemini/skills/x2strategy, .github/skills/x2strategy and .opencode/skills/x2strategy in your project.

What does X2strategy need to run?

Going by SKILL.md and its folder, X2strategy needs Python for the scripts in its folder, the command-line tools its instructions call (uv, just and pip) and credentials named DEEPSEEK_API_KEY, OPENROUTER_API_KEY, OPENAI_API_KEY and ANTHROPIC_API_KEY. Our summary lists: Python 3; A credential in DEEPSEEK_API_KEY; A credential in OPENROUTER_API_KEY.

Does X2strategy access the network?

SKILL.md names 3 domains. In commands or code: platform.deepseek.com and openrouter.ai; the agent is likely to contact these when it follows the instructions. As links in the text: docs.litellm.ai. This is read from the text; nothing was executed.

Is X2strategy safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does X2strategy use?

No licence was found for X2strategy or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does X2strategy use?

About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 24k tokens, read only when the agent opens those files.

What are the alternatives to X2strategy?

Skills that share tags, products or a category with X2strategy: Officecli Commonly Templates (Team-Commonly/commonly, 1.4k stars), Financial Report (monarchjuno/vibe-investing, 299 stars), Markitdown (ImCa0/just-laws, 781 stars) and Docx4j (plutext/docx4j, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains X2strategy?

ALAGENT-HKU (a GitHub organization) maintains it in ALAGENT-HKU/x2strategy, which has 277 GitHub stars. The repository was last updated on June 12, 2026.

Source: ALAGENT-HKU/x2strategy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.