Agent skill
migrating-agent-systems
Use when setting up or migrating Claude Code agent system for a project. Use when user says "setup agent", "migrate agent system", "configure claude code", "add agent system".
Install this agent skill to your Project
npx add-skill https://github.com/wayne930242/Reflexive-Claude-Code/tree/main/plugins/rcc/skills/migrating-agent-systems
SKILL.md
Migrating Agent Systems
Overview
Migrating agent systems IS routing to the correct workflow based on project state.
Detect whether an agent system already exists, then invoke the appropriate skill chain. This skill is a thin router — all logic lives in the specialized skills.
Core principle: Detect, don't assume. Route, don't implement.
Violating the letter of the rules is violating the spirit of the rules.
Task Initialization (MANDATORY)
Before ANY action, create task list using TaskCreate:
TaskCreate for EACH task below:
- Subject: "[migrating-agent-systems] Task N: <action>"
- ActiveForm: "<doing action>"
Tasks:
- Detect existing agent system
- Route to appropriate skill chain
Announce: "Created 2 tasks. Starting execution..."
Execution rules:
TaskUpdate status="in_progress"BEFORE starting each taskTaskUpdate status="completed"ONLY after verification passes- If task fails → stay in_progress, diagnose, retry
- NEVER skip to next task until current is completed
- At end,
TaskListto confirm all completed
Task 1: Detect Existing Agent System
Goal: Determine if the project already has an agent system.
Check for existence of ANY of these:
CLAUDE.md(project root).claude/directory.claude/rules/directory.claude/settings.json.claude/skills/directory
Classification:
- Existing system → at least one component found
- New project → no components found
Verification: Clear classification as "existing" or "new".
Task 2: Route to Appropriate Skill Chain
Goal: Invoke the correct starting skill.
If existing system:
- Announce: 「偵測到現有 agent system,開始分析...」
- Invoke
analyzing-agent-systemsskill - The chain will automatically continue: analyzing → brainstorming → planning → applying → reviewing → refactoring
If new project:
- Announce: 「全新專案,開始探索工作流程...」
- Invoke
brainstorming-workflowsskill - The chain will automatically continue: brainstorming → planning → applying → reviewing → refactoring
Verification: Correct skill invoked based on detection result.
Red Flags - STOP
These thoughts mean you're rationalizing. STOP and reconsider:
- "I can see it's a new project, skip detection"
- "Just start building without analyzing"
- "Handle everything in this skill instead of routing"
- "Skip brainstorming, I know what's needed"
All of these mean: You're about to bypass the specialized skills. Route correctly.
Common Rationalizations
| Excuse | Reality |
|---|---|
| "Skip detection" | Hidden configs exist. Always check. |
| "Build without analyzing" | Existing systems have history. Analyze first. |
| "Handle here" | This skill is a router. Logic lives in specialized skills. |
| "Skip brainstorming" | Assumptions about workflows lead to misfit systems. |
Flowchart: Agent System Migration
digraph migrate_agent {
rankdir=TB;
start [label="Setup/migrate\nagent system", shape=doublecircle];
detect [label="Task 1: Detect\nexisting system", shape=box];
exists [label="System\nexists?", shape=diamond];
analyze [label="Invoke\nanalyzing-agent-systems", shape=box, style=filled, fillcolor="#ccffcc"];
brainstorm [label="Invoke\nbrainstorming-workflows", shape=box, style=filled, fillcolor="#ccffcc"];
done [label="Routed to\nskill chain", shape=doublecircle];
start -> detect;
detect -> exists;
exists -> analyze [label="yes"];
exists -> brainstorm [label="no"];
analyze -> done;
brainstorm -> done;
}
Skill Chain Reference
| Step | Skill | Purpose |
|---|---|---|
| 0 | analyzing-agent-systems |
Scan + weakness detection (if existing) |
| 1 | brainstorming-workflows |
Role-based workflow exploration |
| 2 | planning-agent-systems |
Component planning |
| 3 | applying-agent-systems |
Invoke writing-* skills |
| 4 | refactoring-agent-systems |
Review + cleanup |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
applying-agent-systems
Use when executing a component plan to build agent system elements. Use when called by planning-agent-systems after plan is confirmed. Use when user says "apply agent plan", "build agent system".
writing-rules
Use when creating rule files in .claude/rules/, adding project conventions, or scoping guidelines to specific paths. Use when user says "add rule", "create convention", "scope guideline". NOT for broad project instructions (use CLAUDE.md).
analyzing-agent-systems
Use when analyzing an existing agent system for weaknesses. Use when user says "analyze agent system", "check agent setup", "audit agent config". Use when called by migrating-agent-systems or refactoring-skills.
reviewing-agent-systems
Use when reviewing agent system components after creation or modification. Use when called by applying-agent-systems after all components are built. Use when user says "review agent system", "check quality".
writing-subagents
Use when creating specialized Claude Code subagents in .claude/agents/. Use when user says "create agent", "add reviewer", "specialized agent", "isolated context task".
initializing-projects
Use when bootstrapping a new project from scratch. Use when user says "create project", "new project", "initialize project", "start new app".
Didn't find tool you were looking for?