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/miles128/noteai/agents-mdgit clone --depth 1 https://github.com/Miles128/NoteAIWhat 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.03501 | $0.03501 |
| Opus 5 | $0.01750 | $0.01750 |
| Sonnet 5 | $0.00700 | $0.00700 |
| Haiku 4.5 | $0.00350 | $0.00350 |
Grade A, and why
NoteAI 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 2d 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 — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件为 AI 编码助手(Claude Code、Codex、Jcode、Trae Agent 等)提供 NoteAI 仓库的工作指南。它合并了原 AGENTS.md 与 .trae/rules/project_rules.md,以当前代码实际为准。
1. 项目规则
1.1 模块化要求
- 项目必须模块化:每个功能模块独立成文件/目录,职责单一,禁止在单文件中混合多个不相关功能。
- 前端模块化:JS/CSS 按功能拆分文件,通过统一入口加载,禁止所有代码堆在一个文件中。
- 后端模块化:Python 按功能拆分模块(如
note_integration.py、web_download.py),通过__init__.py统一导出。 - 模块间通信:通过明确的接口/函数调用交互,禁止模块间直接操作彼此内部状态。
1.2 技术架构
- 前端:Tauri v2 + 原生 HTML/CSS/JS。
- 后端:Python sidecar,通过 stdin/stdout JSON-RPC 与前端通信。
- 前端调用后端:统一使用
window.api对象(定义在webui/js/api.js),禁止使用其他兼容层。 - 界面风格:整体对标 Obsidian 应用。
1.3 Prompt 管理
所有传递给大模型的系统提示词必须放在 prompts/ 目录下,禁止在业务代码中直接内联定义系统提示词。
prompts/yaml/*.yaml是单一事实来源;prompts/__init__.py通过prompts/loader.py在导入时解析为常量。- 提示词中可包含占位变量(如
{topic_name}、{content}),业务代码使用.format()填充。 - 新增提示词:先在
prompts/yaml/添加 YAML,再在prompts/__init__.py导出对应常量。
1.4 应用启动
桌面 App 本身就是 Tauri 应用:Tauri 壳加载 webui/ 并拉起 Python sidecar。启动方式:
uv run python run.py # 开发者启动器(推荐):检查 Python 依赖 + Tauri CLI 后执行 cargo tauri dev
cargo tauri dev # 等效命令:依赖已就绪时直接启动 Tauri 开发模式
禁止直接用浏览器打开 webui/index.html 或用 python -m http.server 等方式启动(前端必须经由 Tauri IPC 调 sidecar)。
不要与 python/main.py(sidecar 进程入口,由 Tauri 壳拉起)混淆。
1.5 依赖管理
使用 uv 管理 Python 依赖,禁止直接使用系统 pip install:
uv sync --extra dev --extra rag --extra ingest # 安装依赖(RAG 与采集转换链默认包含)
uv run pytest # 运行测试
依赖声明于 pyproject.toml;uv.lock 提交入库。前端依赖走 npm(package.json)。
1.6 Git 仓库配置
- 远程仓库名:
NoteAI(不是origin),SSH 地址[email protected]:Miles128/NoteAI.git,禁止 HTTPS 推送。 - 推送:
git push NoteAI <branch-name>。 - PR 流程:推送后使用
gh pr create --base main创建 PR,再gh pr checks确认 CI,形成"推送 → 建 PR → 确认 CI"闭环。
2. 构建与测试
uv sync --extra dev --extra rag --extra ingest # 安装依赖
uv run pytest # 运行全部测试(~69 单元 + 3 集成测试模块)
uv run python run.py # 启动 Tauri dev 模式(检查依赖 + cargo tauri dev)
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.
- 2d ago First seen · 135 lines · 3,501 tokens per session scan A 3ad13e3b2d17
NoteAI AGENTS.md is an instructions file published in the GitHub repository Miles128/NoteAI (5 stars, last pushed 4d ago), licensed Unlicense. It adds 3,501 tokens to every session, about $0.0175 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-31.
Other instructions, from other repositories
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.
buildNext
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).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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).
spec-kit 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.
langchain 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.