Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

setup设置

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

15,891

周安装

676

GitHub Stars

127

下载量

5,570
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:setup(设置)
来源仓库:https://github.com/marketcalls/vectorbt-backtesting-skills
仓库路径:skills/setup
安装命令:
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setup

简介

Complete Python backtesting environment setup with OS detection, virtual environment, dependencies, and configuration.

  • Detects operating system (macOS, Linux, Windows) and installs TA-Lib system dependencies accordingly
  • 使用 pip Upgrade 创建隔离的 Python 虚拟环境,并安装 15 个以上的软件包,包括 vectorbt、openalgo、plotly、ta-lib、duckdb 和 quantstats
  • 提示用户选择市场数据源(通过 OpenAlgo 或 DuckDB 的印度市场、通过 yfinance 的美国市场或通过 CCXT 的加密货币)并配置 .env
  • 包含 API 密钥或数据库路径的文件
  • Creates backtesting folder structure and verifies all package installations with version output
  • 添加.env
  • 到 .gitignore
  • 防止意外的秘密提交

SKILL.md

Set up the complete Python backtesting environment for VectorBT + OpenAlgo.

Arguments

  • $0 = Python version (optional, default: python3). Examples: python3.12, python3.13

Steps

Step 1: Detect Operating System

Run the following to detect the OS:

uname -s 2>/dev/null || echo "Windows"

Map the result:

  • Darwin = macOS
  • Linux = Linux
  • MINGW* or CYGWIN* or Windows = Windows

Print the detected OS to the user.

Step 2: Create Virtual Environment

Create a Python virtual environment in the current working directory:

macOS / Linux:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip

Windows:

python -m venv venv
venv\Scripts\activate
pip install --upgrade pip

If the user specified a Python version argument, use that instead of python3:

$PYTHON_VERSION -m venv venv

Step 3: Install TA-Lib System Dependency

TA-Lib requires a C library installed at the OS level BEFORE pip install ta-lib.

macOS:

brew install ta-lib

Linux (Debian/Ubuntu):

sudo apt-get update
sudo apt-get install -y build-essential wget
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
./configure --prefix=/usr
make
sudo make install
cd ..
rm -rf ta-lib ta-lib-0.4.0-src.tar.gz

Linux (RHEL/CentOS/Fedora):

sudo yum groupinstall -y "Development Tools"
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
./configure --prefix=/usr
make
sudo make install
cd ..
rm -rf ta-lib ta-lib-0.4.0-src.tar.gz

Windows:

pip install ta-lib

If that fails, download the appropriate.whl file from https://github.com/cgohlke/talib-build/releases and install with:

pip install TA_Lib-0.4.32-cp312-cp312-win_amd64.whl

Step 4: Install Python Packages

Install all required packages (latest versions):

pip install openalgo vectorbt plotly anywidget nbformat ta-lib pandas numpy yfinance python-dotenv tqdm scipy numba nbformat ipywidgets quantstats ccxt duckdb psutil

Step 5: Create Backtesting Folder

Create only the top-level backtesting directory. Strategy subfolders are created on-demand when a backtest script is generated (by the /backtest skill).

mkdir -p backtesting

Do NOT pre-create strategy subfolders.

Step 6: Configure.env File

6a. Check if .env.sample exists at the project root. If it does, use it as a template.

6b. Ask the user which markets they will be backtesting using AskUserQuestion:

  • Indian Markets (OpenAlgo) — requires OpenAlgo API key
  • Indian Markets (DuckDB) — direct database loading, no API needed
  • US Markets (yfinance) — no API key needed
  • Crypto Markets (CCXT) — optional API key for private data

6c. If the user selected Indian Markets, ask for their OpenAlgo API key:

  • Ask: "Enter your OpenAlgo API key (from the OpenAlgo dashboard):"
  • If the user provides a key, store it in .env
  • If the user skips, write a placeholder

6d. If the user selected Indian Markets (DuckDB), ask for the DuckDB database path:

  • Ask: "Enter the path to your DuckDB database file (e.g., D:/data/market_data.duckdb):"
  • Auto-detect format: If the database has a market_data table with symbol, exchange, interval, timestamp columns, it is OpenAlgo Historify format (store as HISTORIFY_DB_PATH). Otherwise store as DUCKDB_PATH.
  • If the user also has OpenAlgo Historify, ask: "Is this an OpenAlgo Historify database? (y/n)"

6e. If the user selected Crypto Markets, ask if they want to configure exchange API keys:

  • Ask: "Do you have exchange API keys for authenticated data? (Optional — public OHLCV data works without keys)"
  • If yes, ask for API key and secret key, store in .env
  • If no, leave them blank in .env

6f. Write the .env file in the project root directory. Use this template, filling in any keys/paths the user provided:

# Indian Markets (OpenAlgo)
OPENALGO_API_KEY={user_provided_key or "your_openalgo_api_key_here"}
OPENALGO_HOST=http://127.0.0.1:5000

# DuckDB Data Sources (direct database loading - fastest)
# Custom DuckDB (user-created with OHLCV table)
DUCKDB_PATH={user_provided_path or ""}
# OpenAlgo Historify DuckDB (market_data table with epoch timestamps)
HISTORIFY_DB_PATH={user_provided_path or ""}

# Crypto Markets (CCXT) - Optional
CRYPTO_API_KEY={user_provided_key or ""}
CRYPTO_SECRET_KEY={user_provided_key or ""}

6g. Add .env to .gitignore if it exists (never commit secrets):

Scripts use find_dotenv() to automatically walk up and find the single root .env, so no copies are needed in subdirectories.

grep -qxF '.env' .gitignore 2>/dev/null || echo '.env' >> .gitignore

Step 7: Verify Installation

Run a quick verification:

python -c "
import vectorbt as vbt
import openalgo
import plotly
import talib
import duckdb
import anywidget
import nbformat
import quantstats as qs
from dotenv import load_dotenv
print('All packages installed successfully')
print(f'  vectorbt: {vbt.__version__}')
print(f'  plotly: {plotly.__version__}')
print(f'  duckdb: {duckdb.__version__}')
print(f'  nbformat: {nbformat.__version__}')
print(f'  quantstats: {qs.__version__}')
print(f'  TA-Lib: available')
print(f'  python-dotenv: available')
"

If TA-Lib import fails, inform the user that the C library needs to be installed first (see Step 3).

Step 8: Print Summary

Print a summary showing:

  • Detected OS
  • Python version used
  • Virtual environment path
  • Installed packages and versions
  • Backtesting folder created (strategy subfolders created on-demand by /backtest)
  • .env file status (configured with keys / placeholder) — single file at project root
  • Reminder: "Run cp.env.sample.env and fill in API keys if you skipped configuration"

Important Notes

  • Never install packages globally — always use the virtual environment
  • TA-Lib C library installation requires admin/sudo privileges on Linux
  • On macOS, Homebrew must be installed for brew install ta-lib
  • If the user already has a virtual environment, ask before creating a new one
  • The backtesting/ folder is where all generated backtest scripts will be saved
  • NEVER commit .env files — they contain secrets. Always use .gitignore.
  • If the user provides an API key during setup, write it directly to .env — do not ask them to edit the file manually
  • python-dotenv is included in the pip install and must be used by all scripts to load .env

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.94%
按下载量换算2,002

Claude

29.1%
按下载量换算1,621

Cursor

17.63%
按下载量换算982

Gemini CLI

9.09%
按下载量换算506

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills