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 agents/clxzl/claude-code-best-practice-cn/constitutional-validatorgit clone --depth 1 https://github.com/clxzl/claude-code-best-practice-cnWrote 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/clxzl/claude-code-best-practice-cn/constitutional-validator)<a href="https://agentmods.dev/agents/clxzl/claude-code-best-practice-cn/constitutional-validator"><img src="https://agentmods.dev/badge/agents/clxzl/claude-code-best-practice-cn/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 | $0.00046 | $0.02193 |
| Opus 5 | $0.00023 | $0.01097 |
| Sonnet 5 | $0.00009 | $0.00439 |
| Haiku 4.5 | $0.00005 | $0.00219 |
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 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- constitutional-validator — 100% identical, 217 lines differ
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. 关键区分:平台 vs. 产品
最重要的验证:
内部平台(高复杂性):
- 复杂的编排
- 多组件协调
- 复杂的事件管道
- 由核心团队构建
独立产品(适当复杂性):
- 面向用户的应用程序
- 行业标准架构
- 简单需求 = 简单架构
- 为用户构建
危险信号:
- 将平台复杂性应用于产品
- 过度工程化简单需求
- 为基本需求推荐复杂系统
- 将内部工具与外部产品混淆
验证流程
步骤 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.
- 5d ago First seen · 289 lines · 46 tokens per session scan A ee322ed41806
constitutional-validator is an agent published in the GitHub repository clxzl/claude-code-best-practice-cn (127 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 2,193 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-30.
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.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.