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/ysydhc/team_memory/agents-mdgit clone --depth 1 https://github.com/ysydhc/team_memoryWhat 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.03432 | $0.03432 |
| Opus 5 | $0.01716 | $0.01716 |
| Sonnet 5 | $0.00686 | $0.00686 |
| Haiku 4.5 | $0.00343 | $0.00343 |
Grade A, and why
team_memory 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 yesterday.
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 — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文面向 Cursor 及在本仓库工作的其他 Agent。本仓库主入口。
Claude Code 用户请阅读 CLAUDE.md。
速查命令
make help # 列出可用命令
make setup # 首次安装(Docker + 依赖 + 数据库迁移)
make dev # 启动全部服务(Docker + Web)
make web # 仅启动 Web(http://localhost:9111)
make mcp # MCP(需仓库根 .env;run_mcp_with_dotenv → team_memory.server)
make test # 运行全部测试
make lint # Ruff 代码检查
make verify # 标准验收:lint + 全量测试
make harness-check # Harness 门禁:import 检查 + ruff + lint-js + doc-harness 配置
make sync-agent-artifacts # 由 agents/shared 生成 .claude/.cursor agents、.cursor prompts、.claude skills
tm-cli --help # CLI 兼容层(MCP 工具的 Shell 等价)
tm-cli recall --query "..." # 搜索团队知识
tm-cli config show # 显示当前生效配置及值来源
tm-cli config init # 交互式生成 ~/.config/tm/config.toml
tm-cli setup --platform all # 一键配置平台 Hook
# 单测 / 筛选
pytest tests/test_server.py::TestLiteToolRegistration::test_exactly_six_tools -v
pytest -k "search" -v
Agent / 流程提示词(SSOT)
- 正文与元数据:
agents/shared/bodies/(各 subagent)、agents/shared/prompts/(流程说明);清单agents/manifest.yaml。 - 生成产物:修改后执行
make sync-agent-artifacts,会写入.claude/agents/、.cursor/agents/、.cursor/prompts/,以及 Claude Code 侧与 Cursor prompt 对位的 Skill(.claude/skills/<name>/SKILL.md,可用/name调用)。 - 对照:Cursor 的
.cursor/prompts/*.md与 Claude 的同名 skill 同源,按需在一端编辑 shared 后重新同步。
架构概览
TeamMemory — 基于 MCP 的团队经验库,为 AI 提供跨会话记忆。
┌──────────────────────────────────────────────┐
│ MCP Server / CLI (server.py, cli.py) │ ← AI 入口,memory_* 工具
│ Web Routes (web/routes/) │ ← HTTP API 入口
├──────────────────────────────────────────────┤
│ Services (services/) │ ← 业务逻辑
│ search/ memory/ llm/ entity/ │
│ archive/ maintenance/ analysis/ infra/ │
│ Auth / Embedding (+ factory) / Reranker │ ← 认证、向量、重排
├──────────────────────────────────────────────┤
│ Storage (storage/) │ ← 数据访问(repository + DB)
├──────────────────────────────────────────────┤
│ Models (storage/models.py, schemas.py) │ ← ORM + Pydantic
├──────────────────────────────────────────────┤
│ Infrastructure (PostgreSQL + pgvector) │
└──────────────────────────────────────────────┘
客户端组件(PYTHONPATH 只需 src/):
┌──────────────────────────────────────────────┐
│ client_config.py │ ← ClientConfig(~/.config/tm/config.toml)
│ project_resolver.py │ ← 项目名零配置推断 + 别名注册
│ daemon/ │ ← TM Daemon(tm-daemon 入口)
│ runtime/ buffers/ refinement/ backfill/ │
│ quality/ wiki/ observe/ integration/ │
│ hooks/ │ ← 平台 Hook
│ core/ platforms/{claude,cursor,hermes}/ │
│ integrations/ │
│ cli.py │ ← tm-cli + config/setup 子命令
└──────────────────────────────────────────────┘
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.
- yesterday First seen · 276 lines · 3,432 tokens per session scan A 0c9093f11269
team_memory AGENTS.md is an instructions file published in the GitHub repository ysydhc/team_memory (1 stars, last pushed 2mo ago), licensed MIT. It adds 3,432 tokens to every session, about $0.0172 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
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.
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).
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.
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.
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).
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.