--- name: as description: Run any registered role from the repo's evolving role repository (.claude/roles/) against a target — the generic solo dispatcher for roles without a wrapper skill. Use when the user says "/roles:as ", "run the role on X", "act as the ", or names a registry role that has no skill of its own. argument-hint: "[role] [target]" disable-model-invocation: true --- **Codex:** Read [the client path](references/clients.md) before applying this workflow. # Run a role solo Input: $ARGUMENTS — the **first word** is the role name; the rest is the target. 1. **Resolve the role.** Prefer the repo's instantiated copy `.claude/roles/.md` (the canonical, evolving one; `registry.md` indexes these). If it's absent, check this plugin's bundled seeds alongside this skill at `..//role.md` — if found, copy it verbatim to `.claude/roles/.md` and use that. If the role exists in neither, list the available roles (repo `.claude/roles/*.md` plus the bundled `../*/role.md`, excluding `crew.md`/`panel.md`/ `registry.md`/this `as` skill) and stop — don't improvise a persona. 2. **Apply it.** Adopt the role's Charter and Body; honor every entry under `## Learnings (core)` and `## Learnings (solo)`. Note `crew.md` and `panel.md` are consumer registries, not roles — never load them as personas. 2.5 **Anchor in the Prompt Library (optional).** Each engineering persona maps to a category of Anthropic's [Claude Code Prompt Library](https://code.claude.com/docs/en/prompt-library) — `architect`→Plan, `builder`→Implement, `debugger`→Debug, `optimizer`→Debug, `refactorer`→Refactor, `reviewer`→Review, `skeptic`→Review (the role's Body also names its category). If the `prompt-coach` plugin is installed, run its `config.py library --category ` for gold-standard prompt shapes in this role's domain and let them inform your opening. Degrade silently — this is enrichment, not a dependency; skip it if the plugin/command isn't present. 3. **Work the target** following the Body's method and deliverables. 4. **Capture a learning.** If the run surfaced a durable, reusable lesson (a fix that took more than one cycle, a stack- or repo-specific gotcha, a stated user preference), append one line under `## Learnings (solo)` in the role file: `- YYYY-MM-DD — `. Don't log routine one-pass outcomes. Charter and Body edits are **never** made during a run — propose them to the user instead (identity changes are deliberate, user-gated).