Agent skill

Speckit Constitution

by WeihanLi in WeihanLi/WeihanLi.Common

Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

Apache-2.0Auto-check passedDevelopment

Install Speckit Constitution

skills CLI
$ npx skills add WeihanLi/WeihanLi.Common --skill speckit-constitution -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install WeihanLi/WeihanLi.Common speckit-constitution --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/WeihanLi/WeihanLi.Common.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/speckit-constitution .claude/skills/speckit-constitution && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
speckit-constitution
GitHub stars
242
Used in
11 other repos
Token cost
~2.1k tokens
SKILL.md length
1,004 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

  • Works in 8 steps: Load the existing constitution at… → Collect/derive values for placeholders → Draft the updated constitution content → …
  • Tasks that involve Spec-driven development
  • SKILL.md covers User Input, Pre-Execution Checks, Outline and Post-Execution Checks
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Speckit Constitution is an agent skill from WeihanLi/WeihanLi.Common. Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires spec-kit project structure with .specify/ directory

It sits in Development, covering Spec-driven development. It works with C# and .NET. The repository describes itself as: common tools, methods, extension methods, etc... .net 常用工具类,公共方法,常用扩展方法等,基础类库. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Spec-driven development

Example prompts

  • “/speckit-constitution”

Requirements

  • Compatibility (from SKILL.md): Requires spec-kit project structure with .specify/ directory

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Load the existing constitution at .specify/memory/constitution.md.
  2. Collect/derive values for placeholders
  3. Draft the updated constitution content
  4. Consistency propagation checklist (convert prior checklist into active validations)
  5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update)
  6. Validation before final output
  7. Write the completed constitution back to .specify/memory/constitution.md (overwrite).
  8. Output a final summary to the user with

What it can do on your machine

Read from SKILL.md and the folder at commit 3c32ddc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires spec-kit project structure with .specify/ directory

    From compatibility in the SKILL.md frontmatter.

Context cost

Speckit Constitution loads about 2.1k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 1,004 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from WeihanLi/WeihanLi.Common at commit 3c32ddc, republished under its Apache-2.0 licence (© WeihanLi). 1,004 words, ~2,146 tokens.

Download SKILL.mdSave it as .claude/skills/speckit-constitution/SKILL.md (or your agent's skills folder).
name
speckit-constitution
description
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
compatibility
Requires spec-kit project structure with .specify/ directory
metadata.author
github-spec-kit
metadata.source
templates/commands/constitution.md
mode
speckit.constitution

User Input

text
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Pre-Execution Checks

Check for extension hooks (before constitution update):

  • Check if .specify/extensions.yml exists in the project root.
  • If it exists, read it and look for entries under the hooks.before_constitution key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • When constructing slash commands from hook command names, replace dots (.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.
  • For each executable hook, output the following based on its optional flag:
    • Optional hook (optional: true):
      ## Extension Hooks
      
      **Optional Pre-Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
    • Mandatory hook (optional: false):
      ## Extension Hooks
      
      **Automatic Pre-Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      
      Wait for the result of the hook command before proceeding to the Outline.
  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

Outline

You are updating the project constitution at .specify/memory/constitution.md. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. [PROJECT_NAME], [PRINCIPLE_1_NAME]). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.

Note: If .specify/memory/constitution.md does not exist yet, it should have been initialized from .specify/templates/constitution-template.md during project setup. If it's missing, copy the template first.

Follow this execution flow:

  1. Load the existing constitution at .specify/memory/constitution.md.

    • Identify every placeholder token of the form [ALL_CAPS_IDENTIFIER]. IMPORTANT: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
  2. Collect/derive values for placeholders:

    • If user input (conversation) supplies a value, use it.
    • Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
    • For governance dates: RATIFICATION_DATE is the original adoption date (if unknown ask or mark TODO), LAST_AMENDED_DATE is today if changes are made, otherwise keep previous.
    • CONSTITUTION_VERSION must increment according to semantic versioning rules:
      • MAJOR: Backward incompatible governance/principle removals or redefinitions.
      • MINOR: New principle/section added or materially expanded guidance.
      • PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
    • If version bump type ambiguous, propose reasoning before finalizing.
  3. Draft the updated constitution content:

    • Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
    • Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
    • Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
    • Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
  4. Consistency propagation checklist (convert prior checklist into active validations):

    • Read .specify/templates/plan-template.md and ensure any "Constitution Check" or rules align with updated principles.
    • Read .specify/templates/spec-template.md for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
    • Read .specify/templates/tasks-template.md and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
    • Read each command file in .specify/templates/commands/*.md (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
    • Read any runtime guidance docs (e.g., README.md, docs/quickstart.md, or agent-specific guidance files if present). Update references to principles changed.
  5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):

    • Version change: old → new
    • List of modified principles (old title → new title if renamed)
    • Added sections
    • Removed sections
    • Templates requiring updates (✅ updated / ⚠ pending) with file paths
    • Follow-up TODOs if any placeholders intentionally deferred.
  6. Validation before final output:

    • No remaining unexplained bracket tokens.
    • Version line matches report.
    • Dates ISO format YYYY-MM-DD.
    • Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
  7. Write the completed constitution back to .specify/memory/constitution.md (overwrite).

  8. Output a final summary to the user with:

    • New version and bump rationale.
    • Any files flagged for manual follow-up.
    • Suggested commit message (e.g., docs: amend constitution to vX.Y.Z (principle additions + governance update)).
Show full SKILL.md (279 more words)Show less

Formatting & Style Requirements:

  • Use Markdown headings exactly as in the template (do not demote/promote levels).
  • Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
  • Keep a single blank line between sections.
  • Avoid trailing whitespace.

If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.

If critical info missing (e.g., ratification date truly unknown), insert TODO(<FIELD_NAME>): explanation and include in the Sync Impact Report under deferred items.

Do not create a new template; always operate on the existing .specify/memory/constitution.md file.

Post-Execution Checks

Check for extension hooks (after constitution update): Check if .specify/extensions.yml exists in the project root.

  • If it exists, read it and look for entries under the hooks.after_constitution key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • When constructing slash commands from hook command names, replace dots (.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.
  • For each executable hook, output the following based on its optional flag:
    • Optional hook (optional: true):
      ## Extension Hooks
      
      **Optional Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
    • Mandatory hook (optional: false):
      ## Extension Hooks
      
      **Automatic Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

© WeihanLi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/speckit-constitution of WeihanLi/WeihanLi.Common.

Open the folder on GitHubat commit 3c32ddc

Used in 11 other repositories

We found 12 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 11 other GitHub owners. This page covers the copy in WeihanLi/WeihanLi.Common, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Speckit Constitution next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Speckit Constitution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Speckit Constitution this skillWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Analyzing .NET Performancedotnet/skills5.6k3 repos~3.1kAutomated safety check: PassMIT
Add Analyzerdotnet/roslynator3.5k—~1.3kAutomated safety check: PassCustom licence
GitVersion .NET DevelopmentGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT
Code Reviewdotnet/macios2.9k—~1.7kAutomated safety check: PassCustom licence
Add Compiler Diagnostic Fixdotnet/roslynator3.5k—~1kAutomated safety check: PassCustom licence

Similar skills

  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Add Analyzer

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…

    3.5k GitHub stars~1.3k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review

    dotnet/macios

    Official

    Review dotnet/macios PRs against established rules. An agent skill from dotnet/macios.

    2.9k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when adding a Roslynator code fix for C compiler error CS or RCF, editing Diagnostics.xml or CodeFixes.xml, or when compiler-diagnostic-fixes-testing.md shows…

    3.5k GitHub stars~1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Add Refactoring

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RR refactoring in roslynator, editing Refactorings.xml, registering in RefactoringContext, or when refactorings-testing.md shows XunitRefactoringVerifier —…

    3.5k GitHub stars~946 tokensUpdated 4 days ago
    DevelopmentAuto-check passed

Works with

Categories

Questions about Speckit Constitution

What does Speckit Constitution do?

Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync. Common. Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

When should I use Speckit Constitution?

Speckit Constitution fits situations like: tasks that involve Spec-driven development.

How do I install Speckit Constitution in Claude Code?

Run `npx skills add WeihanLi/WeihanLi.Common --skill speckit-constitution -a claude-code`. Or copy the skill folder (.github/skills/speckit-constitution in WeihanLi/WeihanLi.Common) into .claude/skills/speckit-constitution in your project. Claude Code loads it when a task matches its description.

How do I install Speckit Constitution in Codex?

Run `npx skills add WeihanLi/WeihanLi.Common --skill speckit-constitution -a codex`. Or copy the skill folder (.github/skills/speckit-constitution in WeihanLi/WeihanLi.Common) into .agents/skills/speckit-constitution in your project. Codex loads it when a task matches its description.

Can I use Speckit Constitution in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add WeihanLi/WeihanLi.Common --skill speckit-constitution -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/speckit-constitution, .gemini/skills/speckit-constitution, .github/skills/speckit-constitution and .opencode/skills/speckit-constitution in your project.

What does Speckit Constitution need to run?

SKILL.md names no scripts, command-line tools or credentials: Speckit Constitution is instructions for the agent only. Compatibility (from SKILL.md): Requires spec-kit project structure with .specify/ directory.

Does Speckit Constitution access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Speckit Constitution safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Speckit Constitution use?

Speckit Constitution is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Speckit Constitution use?

About 2.1k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Speckit Constitution?

Skills that share tags, products or a category with Speckit Constitution: Analyzing .NET Performance (dotnet/skills, 5.6k stars), Add Analyzer (dotnet/roslynator, 3.5k stars), GitVersion .NET Development (GitTools/GitVersion, 3.1k stars) and Code Review (dotnet/macios, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Speckit Constitution?

WeihanLi (a GitHub user) maintains it in WeihanLi/WeihanLi.Common, which has 242 GitHub stars. The repository was last updated on September 14, 2026.

Source: WeihanLi/WeihanLi.Common on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.