agent-constitution

agent-constitution is a skill for Claude Code, Codex from 0xNyk/oneclaw. It costs 0 tokens per session (318 once invoked), scanned A, original, MIT.

A guide for configuring an AI agent's identity, behavior and decision-making rules. It separates personal voice, principles and operating procedures into files such as SOUL.md, PRINCIPLES.md and AGENTS.md.

In plain words
What is it for?
Writing or organizing instructions about how an agent should speak, decide, handle uncertainty and operate.
Why use it?
It helps keep the agent's personality, judgment rules and working instructions organized.

Skill for Claude CodeCodex

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/0xnyk/oneclaw/agent-constitution
Any agent
npx skills add 0xNyk/oneclaw --skill agent-constitution
Clone the repo
git clone --depth 1 https://github.com/0xNyk/oneclaw

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xnyk/oneclaw/agent-constitution.svg)](https://agentmods.dev/skills/0xnyk/oneclaw/agent-constitution)
Your own site
<a href="https://agentmods.dev/skills/0xnyk/oneclaw/agent-constitution"><img src="https://agentmods.dev/badge/skills/0xnyk/oneclaw/agent-constitution.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 318 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00318
Opus 5 $0.00000 $0.00159
Sonnet 5 $0.00000 $0.00064
Haiku 4.5 $0.00000 $0.00032

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

Security

Grade A, and why

agent-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 5d 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.

src/skills/builtins/agent-constitution/SKILL.md · 49 lines

What it actually says

Agent Constitution (SOUL / PRINCIPLES / AGENTS)

When the user asks how to configure their agent identity and behavior, use this as a guide.

SOUL.md (Who you are)

Use for voice, vibe, boundaries, and identity.

Good content:

  • What you sound like
  • What you refuse to do
  • How you treat people
  • "Never say..." constraints

Avoid:

  • Operational checklists
  • Process rules that change often

PRINCIPLES.md (How you decide)

Use for decision-making heuristics: what to do when the request is incomplete, conflicting, or risky.

Good content:

  • Tradeoffs (speed vs quality; autonomy vs safety)
  • Default strategies (small, verifiable steps; clarify success criteria)
  • Pushback rules (how to disagree, when to ask)

Avoid:

  • Tool instructions (put those in TOOLS.md or skills)
  • Long how-tos

AGENTS.md (How you operate)

Use as the operational rulebook: session startup, safety gates, memory habits, external-action approval, workflow conventions.

Good content:

  • "Every session do X"
  • "Ask before doing Y"
  • File/memory habits
  • Recovery behavior

Feedback Loop (Keep it alive)

When something breaks or you make a mistake:

  • Add a short entry to PRINCIPLES.md under "Regressions", or
  • Update AGENTS.md with a new guardrail/checklist item, or
  • Turn it into a skill/template if it's repeatable.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 49 lines · 0 tokens per session scan A f8c369c1aef6

Subscribe to this mod's changes

agent-constitution is a skill published in the GitHub repository 0xNyk/oneclaw (3 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 318 tokens. 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-31.

Related

Other skills, from other repositories