CodeGraphMCPServer: Skill for Claude Code

.claude/skills/constitution-enforcer/SKILL.md

constitution-enforcer is a skill for Claude Code from nahisaho/CodeGraphMCPServer. It costs 188 tokens per session (3,770 once invoked), scanned A, original, MIT.

A governance checker that validates planned or completed feature work against nine stated rules, including library-first development, command-line access, and test-first development.

In plain words
What is it for?
Use it to check whether a feature followed the required development rules, identify missing validation or documentation, and produce steps for correcting non-compliant work.
Why use it?
It catches process and design violations before implementation continues and records exceptions that need justification.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is nahisaho/CodeGraphMCPServer's own configuration. It tells Claude Code how to work on CodeGraphMCPServer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CodeGraphMCPServer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nahisaho/CodeGraphMCPServer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nahisaho/CodeGraphMCPServer/main/.claude/skills/constitution-enforcer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nahisaho/CodeGraphMCPServer

Made for: Claude Code.

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-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/skills/nahisaho/codegraphmcpserver/constitution-enforcer/github.svg)](https://agentmods.dev/skills/nahisaho/codegraphmcpserver/constitution-enforcer)
Your own site
<a href="https://agentmods.dev/skills/nahisaho/codegraphmcpserver/constitution-enforcer"><img src="https://agentmods.dev/badge/skills/nahisaho/codegraphmcpserver/constitution-enforcer/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-enforcer

Your own site · 80×15
<a href="https://agentmods.dev/skills/nahisaho/codegraphmcpserver/constitution-enforcer"><img src="https://agentmods.dev/badge/skills/nahisaho/codegraphmcpserver/constitution-enforcer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,770 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.00188 $0.03770
Opus 5.5 $0.00075 $0.01508
Sonnet 5.5 $0.00038 $0.00754
Haiku 4.5 $0.00019 $0.00377

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

Security

Grade A, and why

constitution-enforcer 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 2mo 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.

.claude/skills/constitution-enforcer/SKILL.md · 591 lines

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.

Constitution Enforcer Skill

You are a Constitution Enforcer responsible for validating compliance with the 9 Constitutional Articles.

Responsibilities

  1. Phase -1 Gates: Validate all pre-implementation gates before coding begins
  2. Article Enforcement: Check compliance with each constitutional article
  3. Violation Detection: Identify and report governance violations
  4. Complexity Tracking: Document justified exceptions
  5. Remediation Plans: Provide actionable steps to achieve compliance

9 Constitutional Articles

Article I: Library-First Principle

Rule: Every feature MUST begin as a standalone library.

Validation:

# Check if feature is in a library directory
if implementation in /app/ or /web/ without /lib/ first:
    FAIL: "Feature implemented directly in application"

Example Compliance:

✅ PASS: Feature in lib/auth/ with CLI interface
❌ FAIL: Feature in app/auth/ without library abstraction

Article II: CLI Interface Mandate

Rule: All libraries MUST expose CLI interfaces.

Validation:

# Check for CLI entry point
if library exists and no cli.ts or __main__.py:
    FAIL: "Library missing CLI interface"

Example Compliance:

✅ PASS: lib/auth/cli.ts exists with --login, --logout flags
❌ FAIL: lib/auth/ has no CLI entry point

Article III: Test-First Imperative

Rule: NON-NEGOTIABLE: No code before tests.

Validation:

# Check git history
for commit in feature_branch:
    if code committed before test:
        FAIL: "Code committed before tests (Test-First violation)"

Example Compliance:

✅ PASS: tests/auth.test.ts committed before src/auth.ts
❌ FAIL: src/auth.ts committed first

Article IV: EARS Requirements Format

Rule: All requirements MUST use EARS patterns.

Validation:

# Check requirements.md for EARS keywords
if "WHEN" not in requirements or "SHALL" not in requirements:
    FAIL: "Requirements not in EARS format"

if "should" in requirements or "may" in requirements:
    FAIL: "Ambiguous keywords (should/may) used instead of SHALL"

Read the full file on GitHub · 591 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. 2mo ago First seen · 591 lines · 188 tokens per session scan A b338ab8a96dc

Subscribe to this mod's changes

constitution-enforcer is a skill published in the GitHub repository nahisaho/CodeGraphMCPServer (14 stars, last pushed 11mo ago), licensed MIT. It adds 188 tokens to every session and 3,770 once invoked, about $0.0008 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

constitution-enforcer compared with skills from other repositories

constitution-enforcer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
constitution-enforcernahisaho/CodeGraphMCPServerSkill1411mo agoMITA188Claude Code
fto-triageanthropics/claude-for-legalSkill9.9k3d agoApache-2.0A81Claude Code
legal-holdanthropics/claude-for-legalSkill9.9k3d agoApache-2.0A68Claude Code
specification-writingwanshuiyin/Auto-claude-code-research-in-sleepSkill19k3d agoMITA49Claude Code
terms-of-servicegenspark-ai/genofficeSkill12k2d agoApache-2.0A32Claude Code, Codex
x-scorecardx-cmd/x-cmdSkill4.7k7d agoApache-2.0A57Claude Code, Codex
gesellschaftsrechtliche-satzungen-agbKlotzkette/claude-fuer-deutsches-rechtSkill1.8kyesterdayApache-2.0A69Claude Code