Promote frequent pattern to knowledge base (skill or agent)
Converts recurring workflow patterns into reusable skills or agents for future sessions.
/plugin marketplace add h315uk3/as_you/plugin install as-you@as-you[pattern-name]Promote a frequent pattern to knowledge base (Skill or Agent).
Get current directory and retrieve candidates:
pwd
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/commands/promotion_analyzer.py"
If 0 candidates:
If $ARGUMENTS is empty:
{pattern} [{score}%] - {reason}If $ARGUMENTS is provided:
Analyze selected pattern to determine if it should be Skill or Agent:
Read pattern context:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/commands/pattern_context.py" PATTERN_NAME
Analyze characteristics:
Agent indicators (task-oriented):
Skill indicators (knowledge-oriented):
AI Decision:
If determined as Agent:
Infer required tools from pattern:
Use plugin-dev:agent-development skill
Launch component-generator agent:
subagent_type: "as-you:component-generator"
prompt: "Create agent '{pattern-name}' with tools: {inferred-tools}. Context: {contexts}. Working directory: {pwd} (use absolute paths for all file operations)"
description: "Generate agent component"
If determined as Skill:
subagent_type: "as-you:component-generator"
prompt: "Create skill '{pattern-name}'. Context: {contexts}. Working directory: {pwd} (use absolute paths for all file operations)"
description: "Generate skill component"
Present generated component and ask:
If "Yes":
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/lib/promotion_marker.py" "PATTERN_NAME" {skill|agent} "{path}"
If "Modify first":
If "Cancel":
Before creating, search existing using Glob with absolute paths (where {pwd} is from step 1):
{pwd}/skills/*/SKILL.md{pwd}/agents/*.mdIf similar name exists, warn and ask for confirmation.
/as-you:memory - View promotion candidates/as-you:notes - View pattern sources