name: migrate-workflows description: Automatically migrate legacy workflows to modern skills across global and workspace configurations. Scans for existing workflows, creates target SKILL.md files, and safely archives old workflow files.
Use this skill to autonomously migrate legacy workflow files to modern skills.
Workflows (.agents/workflows/*.md or _agents/workflows/*.md) are deprecated.
Skills (.agents/skills/<name>/SKILL.md or _agents/skills/<name>/SKILL.md)
provide all the capabilities of workflows, plus:
/<name> in the chat input box).When this skill is invoked, you must execute the migration automatically by performing the following steps:
Scan global and workspace (if applicable) configuration directories
using filesystem search tools for legacy .md workflow files and
workflows.json manifests:
Global Workflows:
~/.gemini/config/global_workflows/*.md~/.gemini/config/workflows/*.md~/.gemini/config/workflows.jsonWorkspace Workflows (for each open workspace root and parent directories):
<workspace_root>/.agents/workflows/*.md<workspace_root>/_agents/workflows/*.md<workspace_root>/.agent/workflows/*.md<workspace_root>/_agent/workflows/*.md<workspace_root>/{.agents,_agents,.agent,_agent}/workflows.json[!NOTE] OS-Specific Path and Output Formatting: - Adapt path resolution to the host OS (
%USERPROFILE%on Windows vs.$HOMEon macOS/Linux). - When presenting tables, progress, or summaries to the user, always format paths using the host OS path separators (e.g.\on Windows such as%USERPROFILE%\.gemini\config\global_workflows\<name>.md,/on macOS/Linux).
Check each discovered workflow against existing skills: For each workflow,
check if <target_skill_dir>/<name>/SKILL.md already exists to determine
whether it has already been migrated.
Present the discovered workflows, their migration targets, and status:
| Scope | Workflow Name | Source Path | Target Skill Path | Status |
|---|---|---|---|---|
| Global | <name> |
~/.gemini/config/global_workflows/<name>.md |
~/.gemini/config/skills/<name>/SKILL.md |
Pending / Already Migrated |
| Global | <name> |
~/.gemini/config/workflows/<name>.md |
~/.gemini/config/skills/<name>/SKILL.md |
Pending / Already Migrated |
| Workspace | <name> |
<workspace>/.agents/workflows/<name>.md |
<workspace>/.agents/skills/<name>/SKILL.md |
Pending / Already Migrated |
| Workspace | <name> |
<workspace>/_agents/workflows/<name>.md |
<workspace>/_agents/skills/<name>/SKILL.md |
Pending / Already Migrated |
Already Migrated, inform the user that target
SKILL.md files already exist and proceed directly to archiving/cleaning up
the remaining legacy files without overwriting existing skills.For each workflow file:
Check existing skill (Overwrite Protection):
<target_dir>/<name>/SKILL.md already exists, do not overwrite
it (preserves any manual edits or improvements made after prior
migrations). Skip to Step 2.4 (cleanup/archiving).<target_dir>/<name>/SKILL.md does not exist, proceed with
conversion.Read and format the source workflow:
.md file content.Ensure standard YAML frontmatter with name and description:
name:
Write the target skill file:
<target_dir>/<name>/ (e.g.
<workspace>/.agents/skills/<name>/ or
~/.gemini/config/skills/<name>/)<target_dir>/<name>/SKILL.mdArchive the legacy workflow safely:
.md workflow file to <name>.md.bak (e.g. using mv
my_workflow.md my_workflow.md.bak on Linux/macOS, or using Move-Item /
file tools on Windows). Do not permanently delete the file so that the
original content is safely preserved as a backup.workflows.json manifests.SKILL.md files exist and legacy workflows have been
renamed to .md.bak.SKILL.md).SKILL.md
files)..md.bak.