Migrate skills and agents between this plugin and another project. Use when: syncing workflow tools to a target project, pulling improvements back from a project, comparing skill versions, or adapting tools to a different architecture. Supports bidirectional migration with architecture adaptation.
Migrate skills and agents between this plugin (lw-workflow) and a target project directory. Adapts tools to the target's architecture, infrastructure, and conventions.
| Direction | Syntax | Purpose |
|-----------|--------|---------|
| to | /tools-migrate to <project-path> | Push skills/agents from this plugin to a target project |
| from | /tools-migrate from <project-path> | Pull improvements from a project back into this plugin |
Parse $ARGUMENTS to extract:
to or fromIf direction or path is missing/ambiguous, ask the user before proceeding.
Resolve the project path to an absolute path. Verify it exists and contains a project (look for package.json, CLAUDE.md, .git, or similar markers). If the path doesn't exist, STOP and tell the user.
Perform all discovery in parallel where possible.
Read the plugin manifest and enumerate all skills and agents:
Skills — For each directory under skills/:
SKILL.md frontmatter (name, description, allowed-tools)git log -1 --format=%ai -- skills/<name>/Agents — For each file under agents/:
git log -1 --format=%ai -- agents/<name>.mdRead the target project's structure:
CLAUDE.md — Read fully. Extract:
Existing skills — Glob for .claude/skills/*/SKILL.md in the target project
Existing agents — Glob for .claude/agents/*.md in the target project
Package/config files — Read package.json, tsconfig.json to understand:
For skills/agents that exist in both locations, use git log to understand the evolution of changes on each side. This is critical for understanding why things diverged, not just what differs.
Plugin side (always available):
git log --oneline --since="<target-last-modified>" -- skills/<name>/
This shows commits in the plugin since the target's version was last updated.Target project side (if git available):
git -C <target-path> log --oneline -- .claude/skills/<name>/ .claude/agents/<name>.md
This shows the full history of how the target's version evolved — revealing local adaptations, bug fixes, or improvements made in-context.Content diff — For each matching skill/agent, use diff or read both files to identify:
Interpreting history for migration decisions:
from backportto updateUse WebSearch and WebFetch to look up documentation when:
to Direction (Plugin → Project)Classify each plugin skill/agent into one of these categories:
| Category | Criteria | Action | |----------|----------|--------| | New | Doesn't exist in target | Evaluate relevance, propose adding | | Update Available | Exists in target but plugin has newer changes | Show diff summary, propose update | | Up to Date | Exists in target, no changes since last sync | Skip (mention in report) | | Not Applicable | Skill depends on infrastructure the target lacks | Skip with explanation | | Needs Adaptation | Applicable but requires changes for target arch | Propose with adaptation details |
Relevance Assessment for New Skills:
| Skill Type | Relevant When Target Has... | |------------|----------------------------| | Planning skills (plan-inline, plan-backlog, plan-fix, etc.) | Any issue tracker (Linear, Jira, GitHub Issues) | | Implementation skills (plan-implement, plan-review-implementation) | Test runner + linter configured | | Audit skills (code-audit, frontend-review, deep-review) | Source code to audit | | Investigation (investigate) | Always relevant | | Release (push-to-production) | Deployment pipeline | | Backlog (add-to-backlog, backlog-refine, roadmap) | Issue tracker | | Meta (tools-improve) | Always relevant | | Migration (tools-migrate) | Should NOT be migrated (stays in plugin only) |
Adaptation Analysis:
For each skill marked "Needs Adaptation", identify:
mcp__linear__* → mcp__jira__* or GitHub Issues API)npm test → bun test, pytest)src/ → app/, test file co-location vs separate directory)from Direction (Project → Plugin)For each skill/agent in the target project:
| Category | Criteria | Action | |----------|----------|--------| | Improvement | Target has a better version of a plugin skill | Show diff, propose backport | | New Capability | Target has a skill the plugin doesn't | Evaluate for generalization | | Project-Specific | Target skill is too specific to generalize | Skip with explanation | | Diverged | Both changed independently | Show both versions, ask user |
When evaluating improvements:
Present a structured proposal to the user and start an interactive conversation.
## Migration Proposal: [to|from] [project-name]
### Summary
- Direction: [to project / from project]
- Plugin skills: [count] | Plugin agents: [count]
- Target skills: [count] | Target agents: [count]
- Actions proposed: [count new] | [count updates] | [count skipped]
### Proposed Actions
#### New (will be created)
1. **[skill-name]** — [why it's relevant] → [any adaptations needed]
#### Updates (newer version available)
1. **[skill-name]** — [what changed] → [adaptation notes]
#### Skipped
1. **[skill-name]** — [reason: up to date | not applicable | project-specific]
### Adaptations Required
[For each skill needing adaptation, explain what changes and why]
### Questions
[Any decisions that need user input]
After presenting the proposal, engage in conversation with the user:
Use AskUserQuestion for structured choices. Use regular conversation for open-ended discussion.
Do NOT proceed to execution until the user explicitly confirms.
to DirectionFor each confirmed skill:
<target-project>/.claude/skills/<name>/allowed-tools and instructions<target-project>/.claude/agents/<name>.mdFor each confirmed agent:
After all files are written: 5. Update target CLAUDE.md — If it has a skills/agents table, update it. If not, suggest adding one. 6. Verify — Read back each written file to confirm it was written correctly
from DirectionFor each confirmed improvement:
After all files are updated: 5. Update plugin CLAUDE.md — Update the skill/agent tables if they changed 6. Verify — Read back each modified file
When adapting skills to a different tech stack, apply these transformations:
Issue Tracker Adaptation:
mcp__linear__* tool names, adjust state names, update field mappingsgh CLI instead of MCP tools, map labels/milestonesTest Runner Adaptation:
Deployment Adaptation:
Language Adaptation:
Framework Adaptation:
| Situation | Action | |-----------|--------| | Target path doesn't exist | STOP — ask user to verify path | | Target has no CLAUDE.md | Continue — use package.json and file structure for context | | Target uses unknown framework | Use WebSearch to research, ask user if unclear | | Skill has no equivalent in target | Mark as "New" and let user decide | | Conflicting changes (from direction) | Show both versions, ask user to choose or merge | | Write permission denied | STOP — tell user about the permission issue | | Git not available in target | Skip history comparison, use file modification dates | | MCP tools in skill don't exist in target | Flag in adaptation, suggest alternatives or removal |
tools-migrate itself — This skill stays in the plugin onlyto or from, not bothAfter execution completes, output:
## Migration Complete
**Direction:** [to|from] [project-name]
**Skills migrated:** [count] ([count] new, [count] updated)
**Agents migrated:** [count] ([count] new, [count] updated)
**Skipped:** [count] ([reasons])
### Changes Made
- [list of files created/modified with brief description]
### Manual Steps Required
- [any steps the user needs to take, e.g., "Connect Linear MCP in target project"]
- [e.g., "Review adapted push-to-production for your deploy commands"]
### Recommendations
- [suggestions for getting the most out of migrated tools]
Do not offer to do additional work. Output the report and stop.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer