constitution

constitution is an agent for Claude Code from ZTE-AICloud/Co-OmniSpec. It costs 34 tokens per session (4,269 once invoked), scanned A, original, MIT.

A project-governance workflow that creates or updates a constitution file: a document describing the project's rules and principles. It also keeps related planning templates in sync.

In plain words
What is it for?
Use it to fill in a project's constitution, update its principles, and align design, specification, and task templates with those changes.
Why use it?
It removes the need to maintain project rules and their dependent templates by hand. It provides a defined place for decisions about standards, versions, and compliance.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions .claude-plugin; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the omni-dsdd plugin — 40 skills, 16 agents, 1 hook shipped together

Good fit Use it to fill in a project's constitution, update its principles, and align design, specification, and task templates with those changes.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ZTE-AICloud/Co-OmniSpec
Claude Code
/plugin install omni-dsdd

Made for: Claude Code.

Or install omni-dsdd, the plugin that ships this one along with the rest of its 40 skills, 16 agents, 1 hook.

Wrote 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.

agentmods badge for constitution

README.md
[![agentmods](https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/constitution/github.svg)](https://agentmods.dev/agents/zte-aicloud/co-omnispec/constitution)
Your own site
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/constitution"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/constitution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for constitution

Your own site · 80×15
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/constitution"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/constitution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.04269
Opus 5.5 $0.00014 $0.01708
Sonnet 5.5 $0.00007 $0.00854
Haiku 4.5 $0.00003 $0.00427

Measured 1mo ago against content hash c7150c1d0a54, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

constitution 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 1mo 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.

omni-dsdd/agents/constitution.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目章程创建与更新

用户输入

$ARGUMENTS

在继续之前, 你必须考虑用户的消息内容(如果不为空).


环境初始化

本技能所有读写路径均基于以下变量。后续步骤不得用裸相对路径 .omni-infra/... 绕过它们。

变量 含义 用途
CLAUDE_PLUGIN_ROOT Omni 插件安装根目录 定位插件内 omni-infra/ 种子、init_omni_infra.sh 等
CLAUDE_WORKING_DIR 用户当前工作区目录(可为 Git 仓库子目录) 定位工作区 .omni-infra/ 下章程与模板
KNOWLEDGE_DIR 私域知识库根目录(私域知识检索用,与反构文档库独立) 定位知识源目录与 knowledge.config.yaml;由 Step 0.2 解析(读 .omni-infra/knowledge.path,缺失回退 omni-doc)

工作区路径约定(全文统一使用)

符号 展开路径
章程文件 ${CLAUDE_WORKING_DIR}/.omni-infra/memory/constitution.md
设计模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/design-template.md
任务模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/tasks-template.md
规范模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/spec-template.md
知识库路径标记 ${CLAUDE_WORKING_DIR}/.omni-infra/knowledge.path(init 脚本写入的生效 KNOWLEDGE_DIR 绝对路径,constitution 读取)
知识源检查路径 ${KNOWLEDGE_DIR}(读 knowledge.path;缺失回退 ${CLAUDE_WORKING_DIR}/omni-doc)
知识检索配置 ${KNOWLEDGE_DIR}/knowledge.config.yaml(由 sdd 初始化脚本 init_omni_infra.sh 生成,非本技能职责)
插件 omni-infra 种子 ${CLAUDE_PLUGIN_ROOT}/omni-infra/(仅 .omni-infra 尚未存在时参考)
插件 knowledge 配置模板 ${CLAUDE_PLUGIN_ROOT}/skills/knowledge-retrieval/knowledge.config.yaml(init_omni_infra.sh 拷贝源)

Step 0.1 检查变量是否已存在

test -n "${CLAUDE_PLUGIN_ROOT:-}" && test -d "${CLAUDE_PLUGIN_ROOT}"
test -n "${CLAUDE_WORKING_DIR:-}" && test -d "${CLAUDE_WORKING_DIR}"
test -n "${KNOWLEDGE_DIR:-}"   # 仅判非空;不要求目录必须存在(私域知识库为可选)

CLAUDE_PLUGIN_ROOT / CLAUDE_WORKING_DIR 两项均通过 → 进入 Step 0.3。
任一项失败 → 执行 Step 0.2。
KNOWLEDGE_DIR 仅为空时参与 Step 0.2 补全(已非空则沿用,不强制目录存在)。

Step 0.2 补全缺失变量(仅 Agent 层执行一次)

CLAUDE_PLUGIN_ROOT

  1. 若 Claude Code 已注入且目录存在:沿用。
  2. 若仍缺失,按顺序降级(须验证 ${路径}/skills/constitution/SKILL.md 存在):
    • Skill 加载上下文中的插件安装根;
    • 在 ${CLAUDE_WORKING_DIR} 或其上级查找含 .claude-plugin/plugin.json 的目录;
  3. export CLAUDE_PLUGIN_ROOT="<绝对路径>"
  4. 失败 → 终止并提示配置插件。

Read the full file on GitHub · 240 lines

Changes

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.

  1. 1mo ago First seen · 240 lines · 34 tokens per session scan A c7150c1d0a54

Subscribe to this mod's changes

constitution is an agent published in the GitHub repository ZTE-AICloud/Co-OmniSpec (57 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 4,269 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

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.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

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.

github/awesome-copilot · 61 tokens

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.

github/awesome-copilot · 11 tokens

Context7-Expert

Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.

github/awesome-copilot · 22 tokens

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.

anthropics/claude-cookbooks · 52 tokens