autospec: Skill for Claude Code

.agents/skills/autospec-constitution/SKILL.md

autospec-constitution is a skill for Claude Code from ariel-frischer/autospec. It costs 14 tokens per session (1,864 once invoked), scanned A, original, MIT.

A project-constitution generator that writes or updates governance principles in YAML, a structured text format commonly used for configuration.

In plain words
What is it for?
Use it to create or maintain the project's principles in the specs directory, including migrating from supported older constitution locations.
Why use it?
It gives specifications, plans, and implementations a shared set of non-negotiable rules to follow. It can also use existing constitution files as context when updating them.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is ariel-frischer/autospec's own configuration. It tells Claude Code how to work on autospec 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 autospec configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ariel-frischer/autospec. 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/ariel-frischer/autospec/main/.agents/skills/autospec-constitution/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ariel-frischer/autospec

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 autospec-constitution

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ariel-frischer/autospec/autospec-constitution"><img src="https://agentmods.dev/badge/skills/ariel-frischer/autospec/autospec-constitution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,864 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 116
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
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.00014 $0.01864
Opus 5 $0.00007 $0.00932
Sonnet 5 $0.00003 $0.00373
Haiku 4.5 $0.00001 $0.00186

Measured 12d ago against content hash 768e7873064d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

autospec-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 12d 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.

.agents/skills/autospec-constitution/SKILL.md · 239 lines

How it starts

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

autospec-constitution

This Agent Skill is generated from autospec.constitution. When the user invokes "$autospec-constitution" or "/autospec.constitution", load and follow these instructions directly. Treat the text after the skill or command name as "$ARGUMENTS". Do not route back through "autospec constitution"; this skill is the prompt for the stage.

Project specs directory: ./specs

User Input

$ARGUMENTS

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

Outline

You are creating or updating the project constitution. This file defines the non-negotiable principles and governance rules for the project that all specifications, plans, and implementations must adhere to.

Pre-computed Context

The following values have been pre-computed and are available for use:

  • AUTOSPEC_VERSION: {{.AutospecVersion}}
  • CREATED_DATE: {{.CreatedDate}}

Follow this execution flow:

  1. Load existing context:

    • Check if .autospec/constitution.yaml exists (preferred path)
    • Check if .autospec/memory/constitution.yaml exists (legacy fallback)
    • Check if .autospec/memory/constitution.md exists (for migration)
    • Check if AGENTS.md exists at project root (or agent-specific file like CLAUDE.md as fallback)
    • Extract any existing principles, governance rules, or project guidelines
  2. Collect/derive values:

    • If user input supplies principles, use them
    • Otherwise infer from existing repo context (README, docs, prior constitution)
    • For governance dates:
      • ratified: Original adoption date (if unknown, use today)
      • last_amended: Today if changes are made
    • For versioning: Use semantic versioning
      • MAJOR: Backward incompatible governance/principle changes
      • MINOR: New principle/section added
      • PATCH: Clarifications, wording fixes
  3. Generate constitution.yaml:

    constitution:
      project_name: "<project name>"
      version: "1.0.0"
      ratified: "<YYYY-MM-DD>"
      last_amended: "<YYYY-MM-DD>"
    
    preamble: |
      <Brief statement of the project's purpose and why these principles matter.
      This should be 2-3 sentences that set the context for the principles below.>
    
    principles:
      - name: "Test-First Development"
        id: "PRIN-001"
        category: "quality"  # quality | process | architecture | security | governance
        priority: "NON-NEGOTIABLE"  # NON-NEGOTIABLE | MUST | SHOULD | MAY
        description: |
          All new code must have tests written before implementation.
          Tests define the expected behavior and serve as living documentation.
        rationale: "Ensures code quality and prevents regressions"
        enforcement:
          - mechanism: "Pre-commit hooks"
            description: "Automated checks prevent commits without tests"
          - mechanism: "CI pipeline"
            description: "Build fails if test coverage decreases"
        exceptions:
          - "Prototype/spike code explicitly marked as such"
          - "Configuration files and documentation"
    
      - name: "Performance Standards"
        id: "PRIN-002"
        category: "quality"
        priority: "MUST"
        description: |
          Validation functions must complete in <10ms.
          User-facing operations must complete in <1s.
        rationale: "Maintains responsive user experience"
        enforcement:
          - mechanism: "Benchmark tests"
            description: "Automated performance regression tests"
        exceptions: []
    
      - name: "Idempotency & Retry Logic"
        id: "PRIN-003"
        category: "architecture"
        priority: "MUST"
        description: |
          All operations must be idempotent where possible.
          Configurable retry limits for recoverable failures.
        rationale: "Enables reliable distributed operations"
        enforcement:
          - mechanism: "Code review"
            description: "Reviewers check for idempotent patterns"
        exceptions:
          - "One-time initialization operations"
    
    sections:
      - name: "Code Quality"
        content: |
          All code must pass linting and formatting checks.
          No warnings allowed in production builds.
          Dependencies must be explicitly versioned.
    
      - name: "Documentation"
        content: |
          Public APIs must have documentation.
          Architecture decisions must be recorded.
          Breaking changes must be documented in CHANGELOG.
    
      - name: "Security"
        content: |
          No secrets in code or version control.
          Dependencies must be regularly audited.
          User input must be validated and sanitized.
    
    governance:
      amendment_process:
        - step: 1
          action: "Propose change via pull request"
          requirements: "Include rationale and impact assessment"
        - step: 2
          action: "Review period"
          requirements: "Minimum 48 hours for team review"
        - step: 3
          action: "Approval"
          requirements: "Requires maintainer approval"
        - step: 4
          action: "Merge and version bump"
          requirements: "Update version and last_amended date"
    
      versioning_policy: |
        Constitution versions follow semantic versioning.
        MAJOR: Changes that invalidate existing compliant code.
        MINOR: New principles or expanded guidance.
        PATCH: Clarifications without behavioral change.
    
      compliance_review:
        frequency: "quarterly"
        process: "Review all principles for relevance and enforcement effectiveness"
    
      rules:
        - "Changes require review by at least one maintainer"
        - "Breaking changes require explicit team discussion"
        - "Emergency changes may bypass review with post-hoc documentation"
    
    sync_impact:
      # This section is auto-generated when constitution is updated
      version_change: "1.0.0 -> 1.0.0"
      modified_principles: []
      added_sections: []
      removed_sections: []
      templates_requiring_updates: []
      follow_up_todos: []
    
    _meta:
      version: "1.0.0"
      generator: "autospec"
      generator_version: "{{.AutospecVersion}}"
      created: "{{.CreatedDate}}"
      artifact_type: "constitution"
    

Read the full file on GitHub · 239 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. 12d ago First seen · 239 lines · 14 tokens per session scan A 768e7873064d

Subscribe to this mod's changes

autospec-constitution is a skill published in the GitHub repository ariel-frischer/autospec (141 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,864 once invoked, about $0.0001 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.