Borrowing it
Nothing to install: this file belongs to rollingSirius/TradeGit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rollingSirius/TradeGit/main/AGENTS.mdgit clone --depth 1 https://github.com/rollingSirius/TradeGitWrote 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.
[](https://agentmods.dev/instructions/rollingsirius/tradegit/agents-md)<a href="https://agentmods.dev/instructions/rollingsirius/tradegit/agents-md"><img src="https://agentmods.dev/badge/instructions/rollingsirius/tradegit/agents-md/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.
<a href="https://agentmods.dev/instructions/rollingsirius/tradegit/agents-md"><img src="https://agentmods.dev/badge/instructions/rollingsirius/tradegit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01334 | $0.01334 |
| Opus 5.5 | $0.00534 | $0.00534 |
| Sonnet 5.5 | $0.00267 | $0.00267 |
| Haiku 4.5 | $0.00133 | $0.00133 |
Grade A, and why
TradeGit AGENTS.md 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 2mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TradeGit — GitHub 私有仓库交易日志(Codex / Workbuddy / 通用 agent 入口)
这份文件是给 Codex CLI、Workbuddy 和其他读
AGENTS.md的 agent 用的。 Claude Code / Claude Desktop / claude.ai / Workbuddy 读同目录下的SKILL.md,内容等价。
当用户要求记录一笔交易、导入券商流水、复盘/分析历史盈亏、查看持仓, 或首次要求配置交易日志时,使用本工具。
工具
只有一个零依赖 CLI(python3 + git 即可),所有命令都支持 --json:
<TRADEGIT_DIR>/scripts/tradegit <command> --json
安装脚本会尝试把它软链到 ~/.local/bin/tradegit。始终加 --json 并解析结果,
再用自然语言回复用户。
命令速查
| 目的 | 命令 |
|---|---|
| 环境/同步状态 | tradegit status --json |
| 首次连接 GitHub 并建私有仓库 | tradegit init --json |
| 首次创建完全本地账本 | tradegit init --local --json |
| 记录一笔交易 | tradegit log --symbol AAPL --side BUY --qty 100 --price 213.45 --why "理由" --stop 205 --json |
| 导入券商流水(先预览) | tradegit import --file <path> --dry-run --json |
| 导入券商流水(写入) | tradegit import --file <path> --json |
| 盈亏总览 | tradegit analyze --since 90d --json |
| Markdown 复盘报告 | tradegit report --since 90d --markdown --json |
| PDF 复盘报告 | tradegit report --since 180d --pdf --output report.pdf --json |
| 分组统计 | tradegit analyze --since ytd --group-by symbol --json |
| 亏损最重的平仓交易 | tradegit roundtrips --sort pnl --limit 10 --json |
| 当前持仓 | tradegit positions --mark AAPL=213.4 --json |
| 多币种折算 | tradegit analyze --fx HKD=0.128 --base-currency USD --json |
任意只读 SQL(表名 trades) |
tradegit sql "SELECT ..." --json |
| 检查远端是否有变动 | tradegit check --json(不同步时退出码 1) |
| 更正 / 作废记录 | tradegit amend <id> --review "..." --json / tradegit void <id> --json |
| 环境自检 | tradegit doctor --json |
时间参数支持 30d / 90d / 180d / 360d / 3m / 1y / ytd / mtd / 2026-01-01。
必须遵守的流程
- 首次使用:先
tradegit status --json。未初始化时,问用户选择 GitHub 私有仓库还是完全本地模式。用户选择本地时执行tradegit init --local --json, 不需要 GitHub,也不会推送远端。用户选择 GitHub 时,先确认 GitHub 已连接 (gh auth login或GITHUB_TOKEN环境变量),并在创建仓库前征得用户明确同意, 再执行tradegit init --json。不要索要或存储 token 内容。 - 记录交易时必须有交易理由。用户没给
--why就主动问一句;顺带问止损价 (有止损才能算 R 倍数)。 - 导入必须先
--dry-run,把识别到的券商、新增条数、时间范围、无法解析的行 讲给用户,确认后再真正写入。unparsed里的行要念给用户,问清楚后手工补录,不要猜。 - 多币种不要自己加总。混合币种时
metrics的金额为null,真实数字在by_currency;要合计就问用户汇率再传--fx,并讲明用了什么汇率。 - 不下单、不给投资建议。只记录和统计。用户要求下单时说明工具边界。
- 本工具可以生成确定性的 Markdown/PDF 复盘报告,但不生成图表或交互面板。
用户要可视化时,用
analyze --json/roundtrips --json/sql --json取数,再交给其他组件渲染。 - 私有仓库里只放交易记录,不写入任何凭证。
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.
- 2mo ago First seen · 75 lines · 1,334 tokens per session scan A a9ab29f93a68
TradeGit AGENTS.md is an instructions file published in the GitHub repository rollingSirius/TradeGit (12 stars, last pushed 3mo ago), licensed MIT. It adds 1,334 tokens to every session, about $0.0053 per session on Opus 5.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-31.
TradeGit AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| TradeGit AGENTS.mdrollingSirius/TradeGit | Instructions file | 12 | 3mo ago | MIT | A | 1,334 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |