a-share-paper-trading

a-share-paper-trading is a skill for Claude Code, Codex from shouldnotappearcalm/a-share-skill. It costs 60 tokens per session (2,318 once invoked), scanned A, original, MIT.

A simulated stock-trading and backtesting system for mainland Chinese A-shares. Simulated trading uses pretend orders and money, while backtesting evaluates a strategy against past data.

In plain words
What is it for?
Use it to run the simulation service, create accounts, place or cancel market and limit orders, inspect balances and holdings, test trading rules, and run simple backtests.
Why use it?
It lets users test trading actions and market rules without placing real orders, including price limits, next-day selling rules, and unfilled orders at market close.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to run the simulation service, create accounts, place or cancel market and limit orders, inspect balances and holdings, test trading rules, and run simple backtests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading
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.

Any agent
npx skills add shouldnotappearcalm/a-share-skill --skill a-share-paper-trading
Clone the repo
git clone --depth 1 https://github.com/shouldnotappearcalm/a-share-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for a-share-paper-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading/github.svg)](https://agentmods.dev/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading)
Your own site
<a href="https://agentmods.dev/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading"><img src="https://agentmods.dev/badge/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for a-share-paper-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading"><img src="https://agentmods.dev/badge/skills/shouldnotappearcalm/a-share-skill/a-share-paper-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,318 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00060 $0.02318
Opus 5 $0.00030 $0.01159
Sonnet 5 $0.00012 $0.00464
Haiku 4.5 $0.00006 $0.00232

Measured 11d ago against content hash 661069e9fb7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

a-share-paper-trading 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 11d ago.

The scan reads SKILL.md. This mod also ships 13 executable files (scripts/backtest_batch_validation.py, scripts/full_function_smoke_check.py, scripts/paper_trade_cli.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

a-share-paper-trading/SKILL.md · 209 lines

How it starts

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

A股模拟盘

独立的模拟盘 skill。交易服务、CLI、账户、撮合与行情适配都在本目录内,不依赖其他 skill 脚本。

何时使用

  • 启动或检查模拟盘服务
  • 创建/重置账户
  • 限价买卖、市价买卖、撤单
  • 查询账户、持仓、订单、成交
  • 验证涨跌停、T+1、收盘过期
  • 跑简单回测

启动

SKILL_DIR="<本skill绝对路径>"
python3 "$SKILL_DIR/scripts/paper_trading_service.py" --host 127.0.0.1 --port 18765

默认监听 http://127.0.0.1:18765,默认数据库不再落在 skill 目录,而是落到用户级数据目录:

  • macOS: ~/Library/Application Support/a-share-paper-trading/paper_trading.db
  • Linux: ${XDG_DATA_HOME:-~/.local/share}/a-share-paper-trading/paper_trading.db

若本机该端口已有模拟盘进程在跑,不要再启动第二个实例:会报 Address already in use,且多进程可能争用同一 SQLite 库文件。启动前可先检查端口是否在监听,例如:

lsof -iTCP:18765 -sTCP:LISTEN

或向 http://127.0.0.1:18765/accountsGET(CLI 默认 --base-url 与此一致)。已有服务时直接用 paper_trade_cli.py 即可。

更推荐使用控制脚本常驻运行:

python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" start
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" status
python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" stop

在 macOS 上,如需持续自启动,可安装 launchd:

python3 "$SKILL_DIR/scripts/paper_trading_ctl.py" install-launchd

服务会:

  • 交易时段定时撮合挂单
  • 非交易时段停止撮合
  • 收盘后让当日未成单过期
  • 定时写账户净值快照

可用启动参数:

  • --host
  • --port
  • --db-path
  • --match-interval
  • --valuation-interval
  • --idle-valuation-interval

默认端口与 CLI 基址已改为 18765,避免和常见本地开发服务冲突。

CLI

python3 "$SKILL_DIR/scripts/paper_trade_cli.py" create-account alpha --cash 500000
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" list-accounts
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" show-default-account
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" set-default-account alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" reset-account alpha --cash 300000
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" add-cash alpha 50000 --note 入金
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" deduct-cash alpha 10000 --note 出金
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" buy alpha 600519 100 --market
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" sell alpha 600519 100 --price 1450
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" orders alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" positions alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" show-account alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" trades alpha
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" cancel <order_id>
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" process-orders
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" run-snapshots
python3 "$SKILL_DIR/scripts/paper_trade_cli.py" backtest 600519 --strategy sma_cross --start 2025-01-01 --end 2026-03-31 --cash 200000

Read the full file on GitHub · 209 lines

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. 11d ago First seen · 209 lines · 60 tokens per session scan A 661069e9fb7e

Subscribe to this mod's changes

a-share-paper-trading is a skill published in the GitHub repository shouldnotappearcalm/a-share-skill (238 stars, last pushed 2mo ago), licensed MIT. It adds 60 tokens to every session and 2,318 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

china-dcf-model

A documented discounted-cash-flow model for valuing non-financial A-share companies. A discounted-cash-flow model estimates today’s value from expected future cash flows and makes its assumptions, valuation date, and adjustments explicit.

cyijun/china-financial-services · 76 tokens

industry-etf-research

A research workflow for studying Chinese A-share industry ETFs and the indexes they track. It compares index rules, holdings, company fundamentals, industry conditions, valuations and market evidence.

cyijun/china-financial-services · 90 tokens

pptx-author

Produce a .pptx file on disk for headless Chinese A-share market research, using python-pptx with Chinese font support. Use when no controllable Office session is available.

cyijun/china-financial-services · 41 tokens

china-market-data

A routing and quality-check process for obtaining Chinese stock-market and company-financial data from sources such as Tushare Pro and AKShare.

cyijun/china-financial-services · 106 tokens

china-market-researcher

A research workflow for analysing Chinese-listed stocks by industry or investment theme, including companies, competitors, ETFs, and market data. A-share means shares listed on mainland Chinese stock exchanges.

cyijun/china-financial-services · 64 tokens

a-share-factor-validation

A research checklist and toolkit for testing stock-selection factors and backtests in China's A-share market, the mainland Chinese stock market. It checks whether results avoid future-data leakage and account for trading rules, costs, and statistical uncertainty.

cyijun/china-financial-services · 68 tokens