research-constitutional-ai

research-constitutional-ai is a skill for Claude Code, Codex from GrayCodeAI/starling. It costs 48 tokens per session (1,943 once invoked), scanned A, a copy of constitutional-ai, MIT.

A description of Constitutional AI, a method for training AI systems to produce safer responses using written principles, self-critique, revision, and feedback from another AI system.

In plain words
What is it for?
It helps design or study training workflows with supervised self-critique and revision, followed by reinforcement learning from AI feedback.
Why use it?
It explains how to reduce reliance on human labels for harmful examples by having models evaluate and improve responses against a set of safety principles.

Skill for Claude CodeCodex

Part of the starling plugin — 54 skills shipped together

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.

agentmods
npx agentmods add skills/graycodeai/starling/research-constitutional-ai
Any agent
npx skills add GrayCodeAI/starling --skill research-constitutional-ai
Clone the repo
git clone --depth 1 https://github.com/GrayCodeAI/starling

Made for: Claude Code, Codex.

Or install starling, the plugin that ships this one along with the rest of its 54 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 research-constitutional-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/graycodeai/starling/research-constitutional-ai.svg)](https://agentmods.dev/skills/graycodeai/starling/research-constitutional-ai)
Your own site
<a href="https://agentmods.dev/skills/graycodeai/starling/research-constitutional-ai"><img src="https://agentmods.dev/badge/skills/graycodeai/starling/research-constitutional-ai.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% 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 $0.00048 $0.01943
Opus 5 $0.00024 $0.00971
Sonnet 5 $0.00010 $0.00389
Haiku 4.5 $0.00005 $0.00194

Measured 3d ago against content hash 1855e43162ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

research-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 3d 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

86% identical to constitutional-ai — 18 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.

categories/ai-ml/research-constitutional-ai/SKILL.md · 287 lines

How it starts

The opening of the file, as written. The whole thing — 287 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 · 287 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. 3d ago First seen · 287 lines · 48 tokens per session scan A 1855e43162ec

Subscribe to this mod's changes

research-constitutional-ai is a skill published in the GitHub repository GrayCodeAI/starling (2 stars, last pushed 4d ago), licensed MIT. It adds 48 tokens to every session and 1,943 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to constitutional-ai, differing in 18 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.

Orchestra-Research/AI-Research-SKILLs · 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

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.

OpenLAIR/dr-claw · 58 tokens

running-coral-experiments

Run and manage CORAL experiments from the operator side — launch agents with coral start (dotlist overrides, model/count, tmux vs local), monitor with coral status / coral log / coral show / the web dashboard, and drive the loop with coral resume (inject instructions, fork from an attempt), coral heartbeat (tune…

Human-Agent-Society/CORAL · 166 tokens

deeppapernote

Generate a high-quality deep-reading note for a single paper and write it into an Obsidian-style vault. Use when the user gives a paper title, DOI, URL, arXiv ID, Zotero item, or local PDF and wants a polished Markdown note with strong structure, evidence-based analysis, and figure placeholders.

917Dhj/DeepPaperNote · 71 tokens