constitutional-ai

constitutional-ai is a skill for Claude Code from Orchestra-Research/AI-Research-SKILLs. It costs 58 tokens per session (1,993 once invoked), scanned A, a copy of constitutional-ai, MIT.

A method for training AI models to produce less harmful responses through self-criticism and revision. It uses a written set of principles, called a constitution, and feedback generated by another AI system instead of relying only on human labels.

In plain words
What is it for?
Use it to create training data and training procedures for safer language models. It is intended for teams working on safety alignment, which means shaping a model's behavior to follow defined values and limits.
Why use it?
It provides a structured way to teach safety when collecting human examples of harmful content is difficult. The model reviews its own answers against the chosen principles before learning from them.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the safety-alignment plugin — 4 skills shipped together

Good fit Use it to create training data and training procedures for safer language models. It is intended for teams working on safety alignment, which means shaping a model's behavior to follow defined values and limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orchestra-research/ai-research-skills/constitutional-ai
About the project

AI Research Skills Library is a collection of reusable instructions that guide AI agents through research and machine-learning engineering tasks, from finding ideas and writing papers to training, evaluation, and deployment. It is for configuring agents such as Claude Code, Codex, and Gemini to perform research workflows.

Orchestra-Research/AI-Research-SKILLs · 12,567 stars · on GitHub · orchestra-research.com

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 Orchestra-Research/AI-Research-SKILLs --skill constitutional-ai
Clone the repo
git clone --depth 1 https://github.com/Orchestra-Research/AI-Research-SKILLs

Made for: Claude Code.

Or install safety-alignment, the plugin that ships this one along with the rest of its 4 skills.

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 constitutional-ai

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/orchestra-research/ai-research-skills/constitutional-ai"><img src="https://agentmods.dev/badge/skills/orchestra-research/ai-research-skills/constitutional-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,993 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
  • Socket pass 18 Mar 2026
  • Snyk pass 16 Feb 2026
How audits are shown
Origin 100% copy Near-identical to another mod 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.00058 $0.01993
Opus 5 $0.00029 $0.00996
Sonnet 5 $0.00012 $0.00399
Haiku 4.5 $0.00006 $0.00199

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

Security

Grade A, and why

constitutional-ai 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 13d 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.

Origin

This is a copy

100% identical to constitutional-ai — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

07-safety-alignment/constitutional-ai/SKILL.md · 291 lines

How it starts

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

Constitutional AI - Harmlessness from AI Feedback

Quick start

Constitutional AI (CAI) trains models to be harmless through self-critique and AI feedback, without requiring human labels for harmful outputs.

Key concept: Models learn to critique and revise their own responses using a "constitution" (set of principles).

Two phases:

  1. Supervised Learning (SL): Self-critique + revision
  2. Reinforcement Learning (RL): RLAIF (RL from AI Feedback)

Constitution example:

Principles:
1. Choose the response that is most helpful, honest, and harmless
2. Avoid responses that are toxic, racist, or sexist
3. Prefer responses that explain objections rather than refuse
4. Choose responses that are thoughtful and nuanced

Common workflows

Workflow 1: Supervised learning phase (self-critique + revision)

Step 1: Generate initial responses:

from transformers import pipeline

generator = pipeline("text-generation", model="base-model")

prompts = [
    "How do I hack a website?",
    "Write something offensive about a group.",
    "Help me cheat on my exam."
]

initial_responses = generator(prompts, max_length=200)

Step 2: Self-critique with constitution:

critique_prompt = """
Given the question:
{question}

And the response:
{response}

Constitution:
1. Choose responses that are helpful, honest, and harmless
2. Avoid toxic, racist, or sexist content
3. Explain objections rather than refuse

Identify any ways this response violates the constitution:
"""

critiques = generator(
    [critique_prompt.format(q=q, r=r) for q, r in zip(prompts, initial_responses)]
)

Step 3: Revision based on critique:

revision_prompt = """
Question: {question}
Original response: {response}
Critique: {critique}

Please revise the response to better align with the constitution:
"""

revised_responses = generator(
    [revision_prompt.format(q=q, r=r, c=c)
     for q, r, c in zip(prompts, initial_responses, critiques)]
)

Read the full file on GitHub · 291 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. 13d ago First seen · 291 lines · 58 tokens per session scan A 186267074ebd

Subscribe to this mod's changes

constitutional-ai is a skill published in the GitHub repository Orchestra-Research/AI-Research-SKILLs (12,567 stars, last pushed 2mo ago), licensed MIT. It adds 58 tokens to every session and 1,993 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to constitutional-ai, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

davila7/claude-code-templates · 58 tokens

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

OpenLAIR/dr-claw · 58 tokens

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

synthetic-sciences/openscience · 58 tokens

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

liortesta/ClawdAgent · 58 tokens

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

ihatesea69/HieuNghi-AI-Skills · 58 tokens

research-constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignmen...

GrayCodeAI/starling · 48 tokens