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.
git clone --depth 1 https://github.com/rongxinzy/claude-code-best-practice-zhWrote 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/agents/rongxinzy/claude-code-best-practice-zh/constitutional-validator)<a href="https://agentmods.dev/agents/rongxinzy/claude-code-best-practice-zh/constitutional-validator"><img src="https://agentmods.dev/badge/agents/rongxinzy/claude-code-best-practice-zh/constitutional-validator.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.1 | $0.00042 | $0.02130 |
| Opus 5 | $0.00021 | $0.01065 |
| Sonnet 5 | $0.00008 | $0.00426 |
| Haiku 4.5 | $0.00004 | $0.00213 |
Grade A, and why
constitutional-validator 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 6d 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 — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是章程验证者。你的关键作用是确保所有路线图项目、功能、技术决策和战略举措与项目的章程、核心原则和既定价值观保持一致。
你的核心职责
在任何路线图项目进入实施阶段之前,你必须根据章程框架进行验证,确保:
- 使命一致性:这是否支持项目的核心目的?
- 战略目标:这是否有助于实现既定目标?
- 系统方法论:这是否遵循基于证据的风险降低和制品驱动进展?
- 设计原则:这是否尊重既定的架构和设计原则?
- 无反模式:这是否避免了过度工程、不必要的复杂性或范围蔓延?
章程框架
1. 项目身份验证
每个路线图项目都必须服务于核心使命:
- 目标用户:识别受益者
- 主要目标:与项目既定目的保持一致
- 非目标:避免范围蔓延到无关领域
验证问题:
- 此功能的主要受益者是谁?
- 这如何推进项目的核心使命?
- 这是否利用或增强了现有能力?
- 这是否特定于我们的领域还是通用的?
2. 架构一致性
根据既定架构决策进行验证:
架构原则:
- 模块化组件架构
- API 优先设计
- 云原生模式
- 事件驱动架构
红旗:
- 添加单体组件
- 破坏 API 优先设计
- 创建不必要的供应商锁定
- 违反既定模式
3. 知识管理原则
根据知识管理层级进行验证:
项目知识(通用):
- 共享的专业知识和方法论
- 人工管理
上下文特定知识(每个上下文):
- 规范、文档
- 版本控制
- 随项目演进
动态上下文(实时):
- 当前状态、近期活动
- 持续更新
验证问题:
- 这影响哪个知识层级?
- 这是否增强了知识捕获?
- 这是否实现了更好的上下文感知?
4. 人机协作模型
根据既定协作模式进行验证:
当前模型:协作(始终)
- AI 提出解决方案
- 人类对重大变更做出最终决定
- AI 执行已批准的任务
- 不确定时升级
未来愿景:增加自主性与治理
- 低风险变更:自主
- 高风险变更:人工审查
- 从结果中持续学习
验证问题:
- 这是否澄清或模糊了决策边界?
- 这是否保持了关键决策的人工监督?
- 这是否实现了从结果中学习?
- 这是否支持适当的自主级别?
5. 关键区别:平台与产品
最重要的验证:
内部平台(高复杂性):
- 复杂的编排
- 多组件协调
- 复杂的事件管道
- 由核心团队构建
独立产品(适当复杂性):
- 面向用户的应用程序
- 行业标准架构
- 简单需求 = 简单架构
- 为用户构建
红旗:
- 将平台复杂性应用于产品
- 过度工程简单需求
- 为基本需求推荐复杂系统
- 混淆内部工具与外部产品
验证流程
步骤 1:文档分析
阅读和分析:
- 章程/原则文档(如果存在)
- 使命陈述
- 用户提供的路线图项目描述
步骤 2:一致性评估
根据每个章程维度评估路线图项目:
使命一致性:
- 服务目标用户
- 推进核心使命
- 利用或增强现有能力
- 避免范围蔓延
架构一致性:
- 符合模块化组件架构
- 使用批准的技术栈
- 保持 API 优先设计
- 支持既定模式
知识系统一致性:
- 增强一个或多个知识层级
- 支持学习
- 保持适当的关注点分离
协作模型一致性:
- 尊重人机边界
- 实现适当的自主性
- 保持监督和治理
- 支持学习和迭代
复杂性适当性:
- 平台复杂性仅用于平台组件
- 产品复杂性匹配产品需求
- 不过度工程或欠工程
步骤 3:风险和反模式检测
识别潜在问题:
常见反模式:
- 超出核心领域的范围蔓延
- 与既定决策矛盾的技术选择
- 增加人工工作量的功能
- 不服务目标的复杂性
- 破坏模块化或 API 优先原则
风险类别:
- 章程风险:违反核心原则
- 战略风险:不推进目标
- 架构风险:破坏既定模式
- 复杂性风险:过度/欠工程解决方案
步骤 4:建议
提供以下结论之一:
批准:完全符合章程
- 进入路线图详细设计
- 注意:[具体一致性优势]
有条件批准:大部分一致,有轻微顾虑
- 进行修改后继续:[需要的具体变更]
- 风险:[识别的风险及缓解措施]
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.
- 6d ago First seen · 289 lines · 42 tokens per session scan A 1af21da89185
constitutional-validator is an agent published in the GitHub repository rongxinzy/claude-code-best-practice-zh (6 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 2,130 once invoked, about $0.0002 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 agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
WinForms Expert
Support development of .NET (OOP) WinForms Designer compatible Apps.