From refine-agent
Conversationally refine a Lyra agent's persona, voice, passthroughs, and model settings by reading current config and applying targeted changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/refine-agent:refine-agent [agent-name][agent-name]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Let:
Let:
factory agent show)Interactively refine a Lyra agent's profile. Reads current config, proposes targeted
changes, and applies them via factory agent patch.
/refine-agent → prompts for agent name
/refine-agent lyra_default → refine specific agent
∃ $ARGUMENTS ⇒ α = $ARGUMENTS (use directly, skip list step). ¬∃ $ARGUMENTS ⇒ run:
factory agent list
Ask user via DP(A): "Which agent would you like to refine?" with agent names as bold options.
Verify α exists:
factory agent show {α}
¬∃ α in output ⇒ "Agent '{α}' not found. Run factory agent list to see available agents."
Stop.
Capture full agent config as σ:
factory agent show {α}
Also read system TOML if present (for context, not authoritative):
cat ~/projects/roxabi-factory/src/factory/agents/{α}.toml 2>/dev/null || echo "(no TOML — DB-only agent)"
∃ persona_name in σ ⇒ attempt to read persona file:
ls ~/.roxabi-vault/personas/ 2>/dev/null || echo "(no persona vault)"
cat ~/.roxabi-vault/personas/{persona_name}.toml 2>/dev/null || echo "(persona file not found)"
Present current profile in plain language (¬raw JSON dump):
Agent: {α}
Model: {model}
Backend: {backend}
Persona: {persona_name} — {key traits if persona file found, else "see DB persona_json"}
Voice:
TTS: {voice_json.tts.engine} / voice: {voice_json.tts.voice}
STT: {voice_json.stt.engine}
Passthroughs: {passthrough list or "none"}
Plugins: {enabled plugins or "none"}
Ask user via DP(A): "What would you like to change?" Options: persona, voice (TTS/STT), passthroughs, model, other field, done.
N = 0. Repeat while operator has not said done/exit/quit:
Listen to operator description of desired change.
Map request → specific AgentRow field(s). Common mappings:
voice_json.tts.voicevoice_json.stt.enginemodelpersona_name and/or persona_jsonpassthrough_commands (list)system_promptPropose change with before/after values:
"I'd suggest changing
voice_json.tts.voicefrom'echo'to'nova'for a warmer tone. Confirm? [y/N]"
∃ confirmation (y/yes) ⇒ add to Σ, continue loop. ¬∃ confirmation ⇒ discard, ask what else to change.
N = N + 1.
¬∃ changes after full loop ⇒ skip Step 5, output "No changes applied."
∀ (field, value) in Σ, apply via:
factory agent patch {α} --json '{"{field}": {value}}'
For nested JSON fields (e.g. voice_json), build full replacement object:
factory agent patch {α} --json '{"voice_json": {"tts": {"engine": "kokoro", "voice": "nova"}, "stt": {"engine": "whisper"}}}'
Show applied diff after all patches:
Applied to {α}:
voice_json → {"tts": {"voice": "nova", ...}}
model → claude-haiku-4-5-20251001
Remind operator: "Run factory agent init --force or restart lyra adapters for voice/model
changes to take effect."
Output:
persona_json from DB only (¬block on missing file).factory agent show output.$ARGUMENTS
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub roxabi/roxabi-factory