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/dsgwjq/feagent/claude-mdgit clone --depth 1 https://github.com/DSGWJQ/FeagentWrote 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/dsgwjq/feagent/claude-md)<a href="https://agentmods.dev/instructions/dsgwjq/feagent/claude-md"><img src="https://agentmods.dev/badge/instructions/dsgwjq/feagent/claude-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.06560 | $0.06560 |
| Opus 5 | $0.03280 | $0.03280 |
| Sonnet 5 | $0.01312 | $0.01312 |
| Haiku 4.5 | $0.00656 | $0.00656 |
Grade A, and why
Feagent CLAUDE.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 — 591 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
项目概述
Feagent 是企业级AI Agent编排与执行平台,基于 FastAPI + LangChain + DDD-lite 架构。
当前阶段: 多Agent协作系统(Phase 8+ - Unified Definition System)
- 三Agent架构:CoordinatorAgent、ConversationAgent、WorkflowAgent
- EventBus事件驱动通信
- 八段压缩器(PowerCompressor)
- WebSocket实时通道
- 可配置规则引擎与干预系统
- 自描述节点验证与依赖图
Claude ↔ Codex 协作工作流(精简版)
- 需求理解 → Claude 快速识别疑问 → Codex 深度推理
- 上下文收集 → Codex 全面检索 → 输出分析报告
- 任务规划 → Claude 基于分析制定计划
- 代码执行 → Claude 直接编码(遇复杂逻辑调用 Codex)
- 质量审查 → Codex 深度审查 → Claude 最终决策
角色分工 / 产出
- Claude:提炼问题、制定计划、落地代码与决策
- Codex:深度推理/检索、给出代码原型(统一 diff 参考)、质量审查
- 产出物:分析报告 → 计划 → 代码原型参考 → 落地实现 → Codex Review 意见 → Claude 采纳/决策
与现有规则/架构的对齐
- 对应“架构顺序”:需求分析→Domain→Ports→Infrastructure→Application→Interface;在 Domain/Ports 阶段优先让 Codex 做深推与检索。
- 代码执行阶段继续遵守“每次最多改 2 个文件 + TDD”与命名约定。
- 前端/后端改动时保持原有项目结构;Codex 仅给出参考 patch,真实修改由 Claude 完成。
- 关于 Codex 详细调用规范与合作要求,沿用文末《Core Instruction for CodeX MCP》与《Codex Tool Invocation Specification》。
关键规则(必读)
开发约束
-
开发节奏:每次最多修改2个文件,等待用户确认后继续
-
TDD强制:Red → Green → Refactor
- Domain层覆盖率 ≥ 80%
- Application层覆盖率 ≥ 70%
-
架构顺序(严格):
需求分析 → Domain → Ports → Infrastructure → Application → Interface -
依赖方向(单向):
Interface → Application → Domain ← InfrastructureDomain层禁止导入: SQLAlchemy、FastAPI、LangChain 或任何框架
命名约定
| 模式 | 含义 | 示例 |
|---|---|---|
get_xxx |
必须存在,否则抛异常 | get_agent(id) |
find_xxx |
允许返回None | find_agent(id) |
XxxUseCase |
应用层用例 | CreateAgentUseCase |
XxxInput/Request/Response |
DTO | CreateAgentInput |
开发命令
后端
# 安装依赖
pip install -e ".[dev]"
# 数据库迁移
alembic upgrade head
alembic revision --autogenerate -m "description"
# 启动服务器(Windows 必须使用 python -m)
python -m uvicorn src.interfaces.api.main:app --reload --port 8000
# 测试
pytest # 全部测试
pytest tests/unit # 单元测试
pytest tests/integration # 集成测试
pytest tests/unit/domain/entities/test_agent.py -v # 单个文件
pytest -k "test_create_agent" # 按名称
# 代码质量
ruff check . # Lint
ruff format . # Format
pyright src/ # 类型检查
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 · 591 lines · 6,560 tokens per session scan A f20fa007a6bc
Feagent CLAUDE.md is an instructions file published in the GitHub repository DSGWJQ/Feagent (139 stars, last pushed 7mo ago), licensed MIT. It adds 6,560 tokens to every session, about $0.0328 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.