Skip to content

Guide · Agent skill

How to use the Strategy Generate agent skill (strategy-generate)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The strategy-generate skill is an agent skill from the Vibe-Trading project that lets an AI agent turn a trading idea into Python code, run it through a built-in backtest, and report the results. This guide is for readers who have never used agent skills and want to install it, ask for a backtest in plain language, and understand what it can and cannot tell you. By the end you will know how to set it up, what to ask for, and how to read its output with appropriate caution.

Strategy GenerateHKUDS/Vibe-Trading · MIT

Quick start

  1. 1Download and unzip. Download the strategy-generate ZIP from this page and unzip the folder.
  2. 2Place or upload the skill. Put the folder in ~/.claude/skills/ or a project's .claude/skills/, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  3. 3Confirm requirements. Check that Python is available and that your agent environment provides the backtest, bash and strategy evidence tools.
  4. 4Make a precise request. Name the instrument, the date range and the entry and exit rules in plain language.
  5. 5Answer any clarifying questions. If the agent asks for the instrument, period or data source, provide it rather than leaving it to a guess.
  6. 6Review the code and results. Read signal_engine.py and the metrics, and note any validation failures before drawing conclusions.

What is the Strategy Generate skill and what does it make the agent do?

An agent skill is a folder of instructions (a SKILL.md file, plus optional supporting files) that an AI agent loads when a task matches it. The strategy-generate skill covers creating, modifying and optimizing quantitative trading strategies, then backtesting and evaluating them.

When it is active, the agent parses your request for instrument codes, a time range and the entry and exit logic, writes a config.json file, and writes a signal_engine.py file that produces position signals. It then runs the built-in backtest tool and reads the structured metrics, validation results and artifact summary.

  • Turns a described trading idea into a Python signal engine
  • Runs the backtest tool, which loads market data and executes the test
  • Reports metrics such as returns and risk, and whether results pass the review criteria
  • Asks for missing details such as the instrument or date range instead of guessing
  • Reports poor results honestly rather than tuning until they look good

Install the Strategy Generate skill (ZIP download)

Download the strategy-generate ZIP from this page and unzip it. You have two options depending on how you use your agent.

For Claude Code or a similar local setup, unzip the folder into your personal skills directory ~/.claude/skills/, or into a project's .claude/skills/ directory to limit it to one project. For the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: place the folder in ~/.claude/skills/
  • Project install: place the folder in your project's .claude/skills/
  • Claude apps: upload the ZIP under Settings → Capabilities → Skills

Check what you need before you start

The skill needs Python, because the generated signal_engine.py is pure pandas and numpy. It also needs an agent environment that provides the backtest, bash and strategy evidence tools from Vibe-Trading.

Market data is loaded by the backtest tool. The skill files do not name a specific data provider or API key, so confirm data-source requirements in the wider Vibe-Trading repository before running it on your markets.

  • Python installed on the machine that runs the code
  • A Vibe-Trading agent environment with the backtest, bash and strategy evidence tools
  • Data-source and API key requirements confirmed in the wider repository

Trigger the skill with a natural request

You do not need special syntax. Describe the instrument, the period and the rule in plain words. The skill is designed to ask follow-up questions if something important is missing, such as which instrument you mean.

Instrument codes follow the normalization rules in the skill. For example, six-digit China A-share codes get a .SH or .SZ suffix, US tickers get .US, and Hong Kong codes get .HK. If you do not give dates, the default is the 10 years up to today.

  • Be specific: "Build an RSI strategy on AAPL, buy when RSI is below 30 and sell when above 70, backtest 2024"
  • Name the period: "backtest 2024" or "from 2020 to 2024"
  • Vague requests get options: asking for "a strategy" makes the agent offer two or three directions to choose from

Read the results and the review checks

After the backtest runs, the agent reads the structured metrics and validation output, and may read artifacts/metrics.csv if a specific figure is missing. It judges the run by the review criteria and states failures plainly.

A correctly implemented strategy with weak returns is a valid result, and the skill is instructed to report it and stop unless you asked for optimization or comparison. A successful backtest is not independent approval of a strategy.

  • Ask for optimization or comparison explicitly if you want candidates tested
  • Deeper attribution or robustness research happens only when you request it
  • Check the generated code yourself before relying on any number

Safety notes: scripts and network access

This skill runs scripts and uses the network. It writes and executes Python code, and the backtest tool loads market data. Review the generated signal_engine.py before running it, especially if you do not read code confidently.

Do not treat backtest output as a basis for live trading or investment decisions. The skill only backtests on historical data, and past results do not show future performance.

  • It executes generated Python, which can contain logic errors
  • It uses network access to load data
  • Run it in an environment you are comfortable with and keep sensitive credentials out of prompts

What people use it for

  • Prototyping a moving-average crossover on a single A-share stock over one year
  • Testing an RSI rule on a US stock such as AAPL over a chosen period
  • Adapting a registered strategy to a different set of instruments while keeping its signal logic
  • Getting a first-pass honest evaluation of an idea before spending more time on it

Frequently asked questions

How do I install the strategy-generate agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for a personal install, or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills instead.

Is the strategy-generate skill free?

The skill is published under the MIT licence, which is stated on this page. Check the licence file in the repository for the full terms before reusing it.

What do I need to run the strategy-generate skill?

You need Python, since the generated signal engine uses pandas and numpy, and an agent environment that provides the backtest, bash and strategy evidence tools. Data-source and API key requirements are not named in the skill files, so confirm them in the Vibe-Trading repository.

Can I use this skill for live trading?

No. The skill only backtests on historical data, and its files state that a successful backtest is not independent approval. Past results do not show future performance, so it is not designed for live trading or investment decisions.

How does strategy-generate compare with writing a backtest by hand?

The skill automates the steps: it writes the config, the signal code, a syntax check and the backtest run, then reads the metrics. Writing it yourself gives you full control over the code, while the skill gives a faster first pass that you still need to review.

Why did the agent ask me for more details?

The skill is instructed to ask for missing critical information, such as the instrument, rather than guess. Provide the code, the date range and the data source when asked, and the backtest will run on what you specified.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a quant researcher, student, developer or analyst who wants to prototype a trading idea quickly and get an honest first-pass backtest on historical data. Pick something else if you need a production trading system, live trading support, or if you cannot review generated Python code yourself.

Download the skill