constitution

constitution is a skill for Claude Code, Codex from johngrimes/mojoflow. It costs 79 tokens per session (1,207 once invoked), scanned A, original, Apache-2.0.

A project constitution is a written set of rules that defines the principles a project must follow. This add-on examines the project and writes or updates those principles in the repository’s CLAUDE.md file.

In plain words
What is it for?
Use it when starting a project constitution, reviewing an existing one, or changing its principles after the project evolves.
Why use it?
It gives the coding agent one shared place to find the project’s non-negotiable rules. This avoids relying on scattered or repeated instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions Claude Code.

Good fit Use it when starting a project constitution, reviewing an existing one, or changing its principles after the project evolves.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/johngrimes/mojoflow/constitution
Install

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.

Any agent
npx skills add johngrimes/mojoflow --skill constitution
Clone the repo
git clone --depth 1 https://github.com/johngrimes/mojoflow

Made for: Claude Code, Codex.

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/skills/johngrimes/mojoflow/constitution/github.svg)](https://agentmods.dev/skills/johngrimes/mojoflow/constitution)
Your own site
<a href="https://agentmods.dev/skills/johngrimes/mojoflow/constitution"><img src="https://agentmods.dev/badge/skills/johngrimes/mojoflow/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/skills/johngrimes/mojoflow/constitution"><img src="https://agentmods.dev/badge/skills/johngrimes/mojoflow/constitution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,207 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.00079 $0.01207
Opus 5 $0.00039 $0.00603
Sonnet 5 $0.00016 $0.00241
Haiku 4.5 $0.00008 $0.00121

Measured 8d ago against content hash c58a7ab7575c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 8d 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.

constitution/SKILL.md · 122 lines

How it starts

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

Project constitution

Draft or amend a project's constitution - a set of non-negotiable principles that govern how the project is specified, planned, built and reviewed. The constitution lives as a top-level section inside the project's CLAUDE.md file at the repository root, so it is loaded automatically into every Claude Code session for the project.

When to use

  • Bootstrapping a new project that has no constitution yet.
  • Amending an existing ## Constitution section in CLAUDE.md.
  • The user wants a single source of truth for project principles, separate from general coding guidance.

Workflow

1. Examine the project

Before drafting anything, build a picture of the project. Read in this order and stop once enough signal is gathered:

  1. CLAUDE.md at the repo root (note any existing ## Constitution section - this is an amendment, not a fresh draft).
  2. README.md and any docs/ directory.
  3. package.json / pyproject.toml / pom.xml / build.gradle / Cargo.toml etc. to identify the language, framework and key dependencies.
  4. Top-level source layout (src/, tests/, infra/, etc.) to understand the architecture.

Note explicitly when something is missing (e.g. no tests directory, no CI config); these gaps often inform principles.

2. Confirm scope with the user

Ask only what cannot be inferred from the project. Typical questions:

  • Is this a fresh constitution or an amendment to the existing one?
  • How many principles (five is a reasonable default, but match what the project actually needs)?
  • Are there non-negotiables the user wants captured verbatim (e.g. "TDD is mandatory", "no classes in TypeScript")?

Keep the interview tight. If the user has already given strong signals in their request, skip the questions and draft directly.

3. Draft the constitution

Use the template at references/constitution-template.md. Follow these rules:

  • Principles must be declarative and testable. A reviewer should be able to look at a PR and say "this violates Principle III" without ambiguity. Prefer MUST / SHOULD / MUST NOT over vague "should consider" language.
  • One concern per principle. If a principle name contains "and", it is probably two principles.
  • Include a short rationale when the reason for a rule is not obvious; this stops future readers from dismissing it as arbitrary.
  • No bracketed placeholders in the final output. Replace every [TOKEN] with concrete text, or remove the section entirely.
  • Headings must match the template; do not promote or demote levels within the constitution body.

Read the full file on GitHub · 122 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 122 lines · 79 tokens per session scan A c58a7ab7575c

Subscribe to this mod's changes

constitution is a skill published in the GitHub repository johngrimes/mojoflow (2 stars, last pushed 10d ago), licensed Apache-2.0. It adds 79 tokens to every session and 1,207 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

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

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens