npx claudepluginhub javimontano/jm-adk-alfaThis skill uses the workspace's default tool permissions.
agents/guardian.mdagents/lead.mdagents/specialist.mdagents/support.mdevals/evals.jsonknowledge/body-of-knowledge.mdknowledge/knowledge-graph.mdprompts/meta.mdprompts/primary.mdprompts/variations/deep.mdprompts/variations/quick.mdreferences/domain-knowledge.mdtemplates/output.docx.mdtemplates/output.html--- [EXPLICIT] name: agent-constitution-creator description: [EXPLICIT] This skill should be used when the user asks to "create an agent constitution", [EXPLICIT] "define agent identity", "write agent.md", "generate agent spec", or "design [EXPLICIT] agent governance". Generates constitutional agent.md documents with 22 mandatory [EXPLICIT] fields covering identity, authority, governance, and quality for multi-agent [EXPLICIT] ecosystems. Use this skill whenever someone is building or extending an agentic [EXPLICIT] system and needs a persistent operational identity for a new agent, even if they [EXPLICIT] just say "add an agent" or "I need a new agent for X". [EXPLICIT] argument-hint: agent-id [role-description] [EXPLICIT] model: opus [EXPLICIT] context: fork [EXPLICIT] allowed-tools: Read, Write, Edit, Glob, Grep [EXPLICIT] --- [EXPLICIT] [EXPLICIT]
[EXPLICIT]
Generate constitutional agent.md documents — the persistent system prompt and operational identity for agents in any multi-agent ecosystem. Each constitution defines 22 fields covering identity, scope, security, delegation, meta-cognition, and completion criteria. [EXPLICIT]
[EXPLICIT]
Scope: This creates comprehensive agent constitutions for agentic frameworks (multi-agent systems, tool-calling architectures). For lightweight Claude Code subagent definitions, use
/agent-creator. [EXPLICIT] [EXPLICIT]
[EXPLICIT]
[EXPLICIT]
/agent-constitution-creator data-analyst "Transforms raw data into structured insights" [EXPLICIT]
/agent-constitution-creator onboarding-agent # interview mode [EXPLICIT]
``` [EXPLICIT]
[EXPLICIT]
Parse `$1` as agent ID (kebab-case), `$2` as role. If `$2` absent, ask: [EXPLICIT]
1. What is this agent's primary responsibility? [EXPLICIT]
2. What other agents exist in the ecosystem? (for delegation/escalation context) [EXPLICIT]
3. What tools should it have access to? [EXPLICIT]
[EXPLICIT]
## Before Generating [EXPLICIT]
[EXPLICIT]
1. **Read ecosystem context**: `Glob agents/*/agent.md` — understand existing agents, their roles, and boundaries [EXPLICIT]
2. **Check for overlap**: If another agent's scope overlaps >30%, consider merging or adding explicit boundary delineation [EXPLICIT]
3. **Read tool registry**: Identify available tools for the Allowed Tools section [EXPLICIT]
4. **Read security spec**: If the ecosystem has security checkpoints, load them [EXPLICIT]
[EXPLICIT]
## The 22 Fields [EXPLICIT]
[EXPLICIT]
Organized in 4 categories for coherence: [EXPLICIT]
[EXPLICIT]
### Identity (3 fields) [EXPLICIT]
| # | Field | Purpose | Quality Bar | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| 1 | Mission | Reason for existing | Specific to THIS agent; 1-2 sentences; includes measurable outcome | [EXPLICIT]
| 2 | Mandate | What it MUST do | Concrete, verifiable actions (not aspirational) | [EXPLICIT]
| 3 | Scope | Operational boundaries | Clear in/out list; no grey areas | [EXPLICIT]
[EXPLICIT]
### Authority (6 fields) [EXPLICIT]
| # | Field | Purpose | Quality Bar | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| 4 | Non-Goals | Explicit exclusions | ≥3 items users might wrongly expect | [EXPLICIT]
| 5 | Inputs | Data it receives | Typed: `{name}: {type} — {description}` | [EXPLICIT]
| 6 | Outputs | What it produces | Format specified: JSON, Markdown, file path | [EXPLICIT]
| 7 | Decision Rights | Autonomous decisions | Clear boundary: "can X without approval; must escalate Y" | [EXPLICIT]
| 8 | Allowed Tools | Authorized tools | Specific names from registry; no wildcards | [EXPLICIT]
| 9 | Forbidden Tools | Prohibited tools | Explicit denials prevent scope creep | [EXPLICIT]
[EXPLICIT]
### Governance (6 fields) [EXPLICIT]
| # | Field | Purpose | Quality Bar | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| 10 | Memory Policy | Read/write rules | Keys, formats, retention periods, size limits | [EXPLICIT]
| 11 | Security Policy | Security controls | References specific checkpoints (CP1/input, CP2/prompt, CP3/output) | [EXPLICIT]
| 12 | Orchestration Policy | Multi-agent participation | Role in delegation chains: initiator, delegate, observer | [EXPLICIT]
| 13 | Delegation Rules | When/how to delegate | Criteria for single-agent, panel (terna), committee modes | [EXPLICIT]
| 14 | Escalation Rules | When to escalate | Triggers, target agent/human, context to include | [EXPLICIT]
| 15 | Tone / Output Style | Communication style | Language, formality, formatting conventions | [EXPLICIT]
[EXPLICIT]
### Quality (7 fields) [EXPLICIT]
| # | Field | Purpose | Quality Bar | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| 16 | Validation Discipline | Output verification | Method: self-check, peer review, automated test | [EXPLICIT]
| 17 | Meta-Cognition Protocol | Reasoning discipline | FULL (triad: 3 patterns + confidence + bias scan) or LIGHT (decompose + evidence-check + bias scan) | [EXPLICIT]
| 18 | Failure Handling | Error recovery | Per-failure-mode: detection → response → fallback | [EXPLICIT]
| 19 | Completion Criteria | Done definition | Verifiable assertions, not "task is done" | [EXPLICIT]
| 20 | KPIs | Performance metrics | ≥3 metrics with targets and units | [EXPLICIT]
| 21 | Dependencies | Required services | Other agents, APIs, data sources needed | [EXPLICIT]
| 22 | Version | Document version | Semver; change log in commit or footer | [EXPLICIT]
[EXPLICIT]
## Output Template [EXPLICIT]
[EXPLICIT]
Write to `agents/{id}/agent.md`: [EXPLICIT]
[EXPLICIT]
```markdown [EXPLICIT]
--- [EXPLICIT]
id: "{id}" [EXPLICIT]
name: agent-constitution-creator
role: "{role}" [EXPLICIT]
version: "1.0.0" [EXPLICIT]
--- [EXPLICIT]
[EXPLICIT]
# Mission [EXPLICIT]
{1-2 sentences with measurable outcome} [EXPLICIT]
[EXPLICIT]
# Mandate [EXPLICIT]
- {Concrete action 1} [EXPLICIT]
- {Concrete action 2} [EXPLICIT]
[EXPLICIT]
# Scope [EXPLICIT]
**In scope:** [EXPLICIT]
- {boundary 1} [EXPLICIT]
[EXPLICIT]
**Out of scope:** [EXPLICIT]
- {boundary 1} → {responsible agent} [EXPLICIT]
[EXPLICIT]
# Non-Goals [EXPLICIT]
- {Exclusion 1} (→ {who handles it instead}) [EXPLICIT]
- {Exclusion 2} [EXPLICIT]
- {Exclusion 3} [EXPLICIT]
[EXPLICIT]
# Inputs [EXPLICIT]
- `{inputName}`: {type} — {description} [EXPLICIT]
[EXPLICIT]
# Outputs [EXPLICIT]
- `{outputName}`: {format} — {description} [EXPLICIT]
[EXPLICIT]
# Decision Rights [EXPLICIT]
**Autonomous:** {decisions this agent makes alone} [EXPLICIT]
**Requires approval:** {decisions needing human or lead-agent sign-off} [EXPLICIT]
[EXPLICIT]
# Allowed Tools [EXPLICIT]
- `{tool_name}` — {why this agent needs it} [EXPLICIT]
[EXPLICIT]
# Forbidden Tools [EXPLICIT]
- `{tool_name}` — {why it's forbidden} [EXPLICIT]
[EXPLICIT]
# Memory Policy [EXPLICIT]
- **Reads:** `{key}` — {purpose} [EXPLICIT]
- **Writes:** `{key}` — {what, when, retention} [EXPLICIT]
- **Size limit:** {max per entry} [EXPLICIT]
[EXPLICIT]
# Security Policy [EXPLICIT]
- **CP1 (Input):** {sanitization rules} [EXPLICIT]
- **CP2 (Prompt):** {hardening rules} [EXPLICIT]
- **CP3 (Output):** {validation rules} [EXPLICIT]
[EXPLICIT]
# Orchestration Policy [EXPLICIT]
{Role in delegation: initiator | delegate | both. How it participates in chains.} [EXPLICIT]
[EXPLICIT]
# Delegation Rules [EXPLICIT]
- **Single:** {when to delegate to one agent} [EXPLICIT]
- **Panel:** {when to use 3-agent panel} [EXPLICIT]
- **Committee:** {when to convene full committee} [EXPLICIT]
[EXPLICIT]
# Escalation Rules [EXPLICIT]
- **Trigger:** {condition} [EXPLICIT]
- **Target:** {agent-id or human role} [EXPLICIT]
- **Context:** {what to include in escalation} [EXPLICIT]
[EXPLICIT]
# Tone / Output Style [EXPLICIT]
{Language, formality, format preferences} [EXPLICIT]
[EXPLICIT]
# Validation Discipline [EXPLICIT]
{Method and criteria for self-validation before delivery} [EXPLICIT]
[EXPLICIT]
# Meta-Cognition Protocol [EXPLICIT]
{FULL for triad/orchestrator agents, LIGHT for all others} [EXPLICIT]
[EXPLICIT]
**LIGHT (default):** [EXPLICIT]
1. Decompose — max 5 sub-problems before solving [EXPLICIT]
2. Evidence-check — tag claims with confidence [CONFIANZA: alta|media|baja] [EXPLICIT]
3. Bias scan — check anchoring, confirmation, availability [EXPLICIT]
4. Structure-first — bullet skeleton before prose [EXPLICIT]
5. Escalate — when confidence is baja, flag and present alternatives [EXPLICIT]
[EXPLICIT]
**FULL (triad only):** adds Structured Reasoning, Skeleton-of-Thought, Chain-of-Code patterns + 0.0–1.0 confidence scoring [EXPLICIT]
[EXPLICIT]
# Failure Handling [EXPLICIT]
| Failure Mode | Detection | Response | Fallback | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| {mode 1} | {signal} | {action} | {alternative} | [EXPLICIT]
[EXPLICIT]
# Completion Criteria [EXPLICIT]
- [ ] {Verifiable assertion 1} [EXPLICIT]
- [ ] {Verifiable assertion 2} [EXPLICIT]
[EXPLICIT]
# KPIs [EXPLICIT]
| Metric | Target | Unit | [EXPLICIT]
|---|---|---| [EXPLICIT]
| {metric 1} | {value} | {unit} | [EXPLICIT]
[EXPLICIT]
# Dependencies [EXPLICIT]
- `{agent-id}` — {what for} [EXPLICIT]
- `{service}` — {what for} [EXPLICIT]
``` [EXPLICIT]
[EXPLICIT]
## Example: Good vs Bad [EXPLICIT]
[EXPLICIT]
**Bad Mission:** "This agent helps with data tasks." [EXPLICIT]
**Good Mission:** "Transform raw CSV/JSON datasets into validated, typed schemas with anomaly detection, producing structured analysis within 60 seconds per 10K rows." [EXPLICIT]
[EXPLICIT]
**Bad Non-Goals:** "Doesn't do other things." [EXPLICIT]
**Good Non-Goals:** [EXPLICIT]
- Does NOT handle real-time streaming data (→ `stream-processor` agent) [EXPLICIT]
- Does NOT perform ML model training (→ `ml-trainer` agent) [EXPLICIT]
- Does NOT make business decisions from data (→ escalate to human analyst) [EXPLICIT]
[EXPLICIT]
**Bad Failure Handling:** "Handle errors appropriately." [EXPLICIT]
**Good Failure Handling:** [EXPLICIT]
[EXPLICIT]
| Mode | Detection | Response | Fallback | [EXPLICIT]
|---|---|---|---| [EXPLICIT]
| Malformed input | Schema validation fails | Log error, return structured error message | Ask user to provide sample row | [EXPLICIT]
| Tool unavailable | Tool call timeout > 30s | Retry once, then escalate | Use alternative tool or manual approach | [EXPLICIT]
| Conflicting data | >5% rows with contradictory values | Flag conflicts, proceed with majority value | Escalate to human with conflict report | [EXPLICIT]
[EXPLICIT]
## Edge Cases [EXPLICIT]
[EXPLICIT]
- **Single-agent system:** The user says they only have one agent. A constitution is still valuable for documenting scope, tools, and completion criteria — but delegation, escalation, and orchestration fields can be marked N/A with a note: "No peer agents in current ecosystem." [EXPLICIT]
- **Agent that wraps an external API:** Inputs/outputs are dictated by the API contract. Derive fields 5-6 from the API spec. Decision rights are limited to request formatting and error handling. [EXPLICIT]
- **Agent with overlapping scope to an existing one:** Do not create the constitution without resolving the overlap first. Either merge the agents, split responsibilities with explicit boundaries, or add mutual non-goals referencing each other. [EXPLICIT]
- **User provides a vague role ("handles data"):** Enter interview mode. Ask: what data? what operations? what decisions can it make alone? what should it never touch? The role must be specific enough that two different people would write similar constitutions from it. [EXPLICIT]
- **Agent that needs all tools:** Suspicious — most agents need 3-5 tools. If the user claims "all," push back: "Which operations require which tools? Overly broad tool access is a security and scope risk." [EXPLICIT]
[EXPLICIT]
## Validation Gate [EXPLICIT]
[EXPLICIT]
- [ ] All 22 fields present and non-empty [EXPLICIT]
- [ ] Mission is specific to THIS agent (not reusable for any agent) [EXPLICIT]
- [ ] Mission includes a measurable outcome [EXPLICIT]
- [ ] Non-Goals has ≥3 items with responsible alternative agent/human named [EXPLICIT]
- [ ] Allowed Tools lists specific names (no wildcards) [EXPLICIT]
- [ ] Security Policy references specific checkpoints with rules [EXPLICIT]
- [ ] Delegation Rules specify criteria for each mode [EXPLICIT]
- [ ] Failure Handling has ≥3 failure modes with detection→response→fallback [EXPLICIT]
- [ ] Completion Criteria are verifiable assertions (testable, not subjective) [EXPLICIT]
- [ ] KPIs include ≥3 metrics with units [EXPLICIT]
- [ ] No two agents in the ecosystem have overlapping Scope [EXPLICIT]
[EXPLICIT]
--- [EXPLICIT]
**Author:** Javier Montano | **Last updated:** March 18, 2026 [EXPLICIT]
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.