skills/pattern-creator/SKILL.md
Use when: creating CSA pattern (PATTERN.md + skill + workflow.toml)
npx skillsauth add ryderfreeman4logos/cli-sub-agent pattern-creatorInstall 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.
Create CSA patterns: composable workflow definitions that orchestrate multi-step agent work through structured Markdown documents.
| Aspect | Skill (SKILL.md) | Pattern (PATTERN.md + companion skill) |
|--------|-------------------|----------------------------------------|
| Purpose | Static knowledge / persona | Executable workflow with steps |
| Triggered by | Claude Code auto-match | /name command or csa run --skill name |
| Has steps | No (free-form instructions) | Yes (## Step N: structure) |
| Control flow | None | ## IF, ## FOR, ## INCLUDE |
| Recursion safety | N/A | Role Detection mandatory |
| Config cascade | N/A | .skill.toml (package → user → project) |
| Composability | N/A | ## INCLUDE other-pattern |
Rule: If the workflow has more than 2 sequential steps with tool invocations, it should be a pattern, not a plain skill.
Read references/architecture.md for the full directory layout, companion skill
mechanism, symlink routing, and installation scopes.
Key concepts (always in context):
Companion Skill — patterns/<name>/skills/<name>/SKILL.md is the entry
point that Claude Code / Codex discovers. It does NOT execute the workflow
itself — it dispatches to the PATTERN.md. This prevents infinite recursion.
Role Detection — Every companion skill MUST include a "Role Detection"
section that checks whether the agent is the orchestrator (human user invoked
/name) or the executor (CSA spawned with "Use the <name> skill").
Symlink Routing — Weave creates symlinks in .claude/skills/ pointing
to the companion skill directory. The symlink can be renamed (to avoid
collisions) as long as it points to the correct companion skill. Changing
the symlink target from project-level to global-level determines which
PATTERN.md gets executed.
Before writing anything, answer:
csa (delegation) vs bash (local execution)?## INCLUDE)?${VAR_NAME})?Create the directory structure:
patterns/<name>/
├── PATTERN.md # Workflow definition (TOML frontmatter + steps)
├── .skill.toml # Agent config (tier, tools, token_budget)
├── workflow.toml # Machine-readable step+variable manifest
└── skills/
└── <name>/
└── SKILL.md # Companion skill (YAML frontmatter, entry point)
Read references/architecture.md for detailed specs of each file.
Read references/pattern-syntax.md for the full syntax reference:
frontmatter format, step structure, control flow directives, tool annotations,
tier annotations, and composition via ## INCLUDE.
Read references/companion-skill.md for the template and rules:
Role Detection block, Execution Protocol, Done Criteria, and the absolute
prohibition on csa commands inside executor mode.
[skill]
name = "<pattern-name>"
version = "0.1.0"
[agent]
tier = "tier-2-standard" # tier-1-quick | tier-2-standard | tier-3-complex
max_turns = 30 # advisory, not enforced
tools = [{ tool = "auto" }] # or explicit [{ tool = "codex" }, { tool = "claude-code" }]
[plan]
name = "<pattern-name>"
description = "One-line description"
[[plan.variables]]
name = "VAR_NAME"
# Repeat for each variable used in PATTERN.md
[[plan.steps]]
id = 1
title = "Step Title"
prompt = "What this step does"
tool = "bash" # optional: bash | csa | omit for orchestrator logic
on_fail = "abort" # "abort" | "skip" | { retry = N } | { delegate = "target" }
tier = "tier-1-quick" # optional tier override
condition = "${VAR}" # optional: only run if truthy
Project-level (default):
# Weave auto-links after install (requires source):
weave install <source-repo-or-path>
# Or manual symlink:
ln -s ../../patterns/<name>/skills/<name>/ .claude/skills/<name>
User-level (global):
ln -s /path/to/patterns/<name>/skills/<name>/ ~/.claude/skills/<name>
Renamed symlink (avoid collisions):
# Symlink name can differ from pattern name
ln -s ../../patterns/<name>/skills/<name>/ .claude/skills/my-custom-alias
The symlink name determines the trigger (/my-custom-alias), but CSA pattern
resolver follows the companion skill's actual directory name back to the pattern.
/name — should dispatch to CSAcsa run --skill name "prompt" — should read PATTERN.mdcsa commands## INCLUDE resolves correctly (if used)| File | Format | Required | Purpose |
|------|--------|----------|---------|
| PATTERN.md | TOML frontmatter + Markdown | Yes | Workflow definition |
| skills/<name>/SKILL.md | YAML frontmatter + Markdown | Yes | Entry point for Claude Code |
| .skill.toml | TOML | Recommended | Agent config (tier, tools, budget) |
| workflow.toml | TOML | Recommended | Machine-readable manifest |
development
Use when running a non-blocking CSA background code health scan that uses csa health and csa tokuin estimate to propose refactoring GitHub issues for files over token or complexity thresholds.
data-ai
Recover main-agent context after `/clear`, `/compact`, or lost local thread state by using `csa recall` against recorded Claude main sessions.
tools
Use when: merged PR had HIGH/CRITICAL findings that represent a bug class — extracts reusable coding rule
tools
Use when: review found 2+ independent findings in different files, fix phase can parallelize RECON