skills/create-skill/SKILL.md
Creates new skills from the user's repeating patterns. Interview-driven: discovers the task, analyzes failure modes, generates a production SKILL.md, installs it, tests it on a real target, and teaches the user how to use it. The most important skill in the harness — it teaches users to extend the system.
npx skillsauth add special-place-administrator/citadel_codex create-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the skill factory. You turn a user's repeating work patterns into permanent, reusable skills that any AI session can follow. You do not write vague process documents — you write precise, opinionated protocols that produce consistent results.
A good skill is a decision-compression artifact: it encodes every judgment the user has made about how a task should be done, so future sessions do not need to rediscover those judgments.
You are also a teacher. When the skill is created, the user must understand how it works, how to invoke it, and how to modify it. A skill the user cannot maintain is a liability, not an asset.
Use when:
Do NOT use when:
What this skill produces:
skills/{name}/SKILL.md file at the project root
(skills are auto-discovered from the skills/ directory — no registration needed)Do not skip this step. Do not infer answers. Ask these three questions and wait for the user to respond to each one. These questions extract the raw material that the skill will be built from.
Question 1: "What do you keep repeating?"
Listen for:
If the answer is vague ("I keep fixing things"), probe with: "Walk me through the last time you did this. What was the first thing you did? What was next?"
Question 2: "What mistakes happen when you do it manually?"
Listen for:
These become the skill's guardrails and quality gates.
Question 3: "What does 'done right' look like?"
Listen for:
These become the skill's quality gates and exit protocol.
From the three answers, derive these elements. Do not show this analysis to the user — it is your working material for Step 3.
2a. Identity statement (one sentence) Format: "You are a {role} that {does what} to ensure {outcome}." Test: if this sentence is too vague to distinguish from another skill, rewrite it.
2b. Trigger keywords (5-10 words/phrases) These are the words that would appear in a skill invocation that should route to this skill. They must be:
Check for conflicts: read the existing skills in skills/ and verify
no overlap with their trigger_keywords. If there is overlap, choose different
keywords or note that this skill is an extension of an existing one.
2c. Protocol steps (the core of the skill) Transform the user's "what I do" into numbered steps with these properties:
Bad step: "3. Review the code for issues." Good step: "3. Read every function in the file. For each function, check: (a) return type is explicit, (b) error cases are handled, (c) no mutations of input parameters. List violations with line numbers."
The difference: a bad step requires judgment that has not been encoded. A good step converts judgment into checkable criteria.
2d. Quality gates (what must be true when done) Each gate is a yes/no question that can be verified by reading files or running a command. No subjective gates ("code is clean"). Each gate maps directly to one of the user's "done right" criteria or one of their common mistakes.
2e. Common pitfalls (what to warn about) These come directly from Question 2. They become warnings or guard clauses in the protocol.
Write the file following this exact structure. Every section is required. The file MUST be under 500 lines — if it is longer, the skill's scope is too broad and should be split.
---
name: {kebab-case-name}
description: >-
{One to three sentences. Start with a verb. Describe what the skill does
and why it exists. No filler.}
user-invocable: true
auto-trigger: false
trigger_keywords:
- {keyword 1}
- {keyword 2}
- ...
---
# {name} — {Readable Title}
## Identity
{2-4 sentences. Who is this skill? What is it an expert in? What is its
core commitment? Write in second person ("You are...").}
## Orientation
**Use when:**
- {Specific trigger condition 1}
- {Specific trigger condition 2}
- {Specific trigger condition 3}
**Do NOT use when:**
- {Specific exclusion 1}
- {Specific exclusion 2}
**What this skill needs:**
- {Required input 1}
- {Required input 2}
## Protocol
### Step 1: {VERB — Step Name}
{Detailed instructions. Every step must tell the agent exactly what to do,
what to read, what to produce. No vague directives.}
### Step 2: {VERB — Step Name}
{Continue for each step...}
## Quality Gates
All of these must be true before the skill exits:
- [ ] {Verifiable gate 1}
- [ ] {Verifiable gate 2}
- [ ] {Verifiable gate 3}
## Exit Protocol
Output a summary in this format:
{Define the exact output format — what information to include, how to
structure it. The format should give the user everything they need to
verify the work and take next steps.}
Writing rules for the generated SKILL.md:
Protocol steps must be reproducible. A different AI session, with no memory of this conversation, must be able to follow the steps and produce the same quality output. If a step requires context that only exists in this session, encode that context into the step.
No hedge language. Not "consider doing X" — instead "do X." Not "you might want to check" — instead "check." Skills are directives, not suggestions.
No filler sections. If a section adds no new information, delete it. A 40-line skill that is 100% actionable beats a 200-line skill that is 50% padding.
Include examples where the pattern is non-obvious. If Step 3 says "format the output as X", show what X looks like. If the step says "search for files matching Y", show the glob pattern.
Encode the user's taste. If the user said "I hate when it does Z", that becomes an explicit prohibition in the protocol. Taste preferences are as important as functional requirements.
skills/{name}/skills/{name}/SKILL.mdskills/ directory — no additional
registration is required. Run node runtime/cli.js status to confirm
the new skill appears in the harness.If the project has a CLAUDE.md or README that lists skills, check whether the new skill should be mentioned there. Do not add it automatically — only mention it if there is an explicit skills section that lists available skills.
The skill must work. Do not trust that it works because you wrote it.
Find a real target in the current project that the skill applies to. If the skill is "scaffold a component", find a component that could be scaffolded. If the skill is "audit API endpoints", find an API endpoint to audit.
Run the skill's protocol on that target, following the SKILL.md instructions exactly as written — pretend you are a different AI session that has never seen this conversation. Read only the SKILL.md.
Evaluate the result:
If it fails or produces thin output, identify what was missing and update the SKILL.md. Common fixes:
Run it again after fixes. The skill must pass on the second attempt. If it fails twice, the scope is wrong — discuss with the user.
The user must leave this conversation knowing three things:
A. How to invoke it:
node runtime/cli.js status to confirm the skill is liveB. How it works (30-second version):
C. How to modify it later:
skills/{name}/SKILL.md### Step N section in the Protocoltrigger_keywords list in frontmatterAll of these must be true before the skill exits:
skills/{name}/SKILL.mdOutput a summary in this format:
SKILL CREATED
Name: {name}
Path: skills/{name}/SKILL.md
Invoke: mention "{name}" or any trigger keyword
What it does:
{One sentence description}
Steps: {N} steps
Quality gates: {N} gates
Lines: {line count}/500
Tested on: {target description}
Test result: PASS
Trigger keywords: {comma-separated list}
Then include the one-liner invocation example:
Try it now: {name} {suggested first target}
development
GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Handles both issues and pull requests.
development
Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns
development
Four-phase root cause analysis: observe, hypothesize, verify, fix. Enforces investigation before code changes and stops guess-and-check debugging.
testing
First-run experience for the harness. Detects the project stack, scaffolds the .citadel/ state directory, generates configuration, runs one real task as a demo, and prints a reference card of all available skills. Gets someone from install to first `do` command in 5 minutes.