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.
npx agentmods add instructions/sorahjy/financial-analysis/agents-mdgit clone --depth 1 https://github.com/sorahjy/financial-analysisWrote 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/sorahjy/financial-analysis/agents-md)<a href="https://agentmods.dev/instructions/sorahjy/financial-analysis/agents-md"><img src="https://agentmods.dev/badge/instructions/sorahjy/financial-analysis/agents-md.svg" alt="Measured on agentmods" 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 | $0.03479 | $0.03479 |
| Opus 5 | $0.01740 | $0.01740 |
| Sonnet 5 | $0.00696 | $0.00696 |
| Haiku 4.5 | $0.00348 | $0.00348 |
Grade A, and why
financial-analysis 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 5d 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 — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件适用于仓库根目录及所有子目录,供后续编码 agent 和维护者使用。开始修改前先读 README.md 与 ARCHITECTURE.md。如果未来某个子目录增加更具体的 AGENTS.md,以离目标文件最近的规则为准。
1. 工作原则
- 先确认真实实现,再改文档或代码。入口、CLI、数据源和产物经常一起演进,不要只根据文件名或旧注释推断。
- 把当前工作区视为用户现场。先运行
git status --short和相关git diff;已有修改、未跟踪研究结果和本地数据库都属于用户,不能顺手清理、覆盖或回滚。 - 保持改动聚焦。不要把文档任务扩成模型调参,不要把诊断任务扩成生产修复,也不要为通过测试而改变未被请求的策略口径。
- 用最小但足够的验证证明改动。优先跑直接相关测试,再根据风险决定是否跑完整套件。
- 所有金融输出都是研究信号。新增页面文案、导出或报告时,不得暗示确定收益或自动交易能力。
2. 仓库事实
- 运行环境:Python 3.10+;当前代码使用
X | None、argparse.BooleanOptionalAction和内置泛型等语法,文档编写时在 Python 3.12.12 验证。 - Web:Flask + Jinja + 原生 JavaScript/CSS,无前端构建步骤。
- 测试:标准库
unittest;没有pytest.ini、pyproject.toml、tox 或项目级 lint/format 配置。 - 依赖:
requirements.txt没有锁定精确版本,也没有单独的开发依赖文件。 - 主存储:本地 SQLite;运行产物为 JSON/SVG。
- 工作目录很重要:多个存储模块使用相对路径
Path("data"),命令必须从仓库根目录执行。 - 网络抓取依赖公开接口,可能受代理、限流、字段变化和非交易日影响。
3. 环境与常用命令
macOS、Linux 及基于 Linux/Unix 的国产系统从仓库根目录执行:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
Windows PowerShell:
py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
启动本地工作台:
python run.py --port 8765
跑单个测试文件:
PYTHONDONTWRITEBYTECODE=1 python -m unittest discover -s tests -p 'test_hot_money_radar.py' -v
跑完整测试:
PYTHONDONTWRITEBYTECODE=1 python -m unittest discover -s tests -v
Windows PowerShell 对应写法:
$env:PYTHONDONTWRITEBYTECODE = "1"
python -m unittest discover -s tests -v
交付前至少运行:
git diff --check
git status --short
不要用联网刷新命令充当普通单元测试。测试外部数据适配时注入 fetcher、mock HTTP/AkShare 响应,并用临时目录或 :memory: SQLite。
4. 写入与副作用分级
明确会联网并写本地状态
python fund_data_refresh.pypython stock_radar_fresh_data.pystock_crawl_*.py、plate_crawl_history.py等抓取器stock_data_refresh.pystock_hot_money_radar.py的生产/实验模式stock_crawl_news.py、mf_pilot.py crawl
除非任务明确要求刷新真实数据,否则不要在验证阶段运行这些命令。
两个 .py 刷新入口都会复用当前解释器,并在 Windows 与 POSIX 系统上通过参数列表启动子进程。fund_data_refresh.py 保持为根目录基金刷新入口,内部子步骤通过 python -m fund... 运行。
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.
- 5d ago First seen · 215 lines · 3,479 tokens per session scan A e2a3977d75b4
financial-analysis AGENTS.md is an instructions file published in the GitHub repository sorahjy/financial-analysis (25 stars, last pushed 1mo ago), licensed MIT. It adds 3,479 tokens to every session, about $0.0174 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.