Agent skill

Polylith Migrate Orchestrator

by DavidVujic in DavidVujic/python-polylith

[ENTRY POINT] Load this skill first when the user asks to migrate a non-Polylith Python project to Polylith (e.g.

MITAuto-check: notesDevelopment

Install Polylith Migrate Orchestrator

skills CLI
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-orchestrator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DavidVujic/python-polylith polylith-migrate-orchestrator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-orchestrator .claude/skills/polylith-migrate-orchestrator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
polylith-migrate-orchestrator
GitHub stars
553
Token cost
~3.5k tokens
SKILL.md length
1,411 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

[ENTRY POINT] Load this skill first when the user asks to migrate a non-Polylith Python project to Polylith (e.g.

  • Works in 2 steps: User Confirmation → Safety Net (git checkpoint)
  • Asks to migrate a non-Polylith Python project to Polylith (e.g
  • SKILL.md covers Goal, Usage, Pre-flight and Workflow, plus 3 more sections
  • Calls git, uv and poetry

What it does

Polylith Migrate Orchestrator is an agent skill from DavidVujic/python-polylith. [ENTRY POINT] Load this skill first when the user asks to migrate a non-Polylith Python project to Polylith (e.g. "migrate projects/<name to Polylith"). Drives the full migration workflow plus optional tooling conversions; do not load any other polylith-migrate- skill directly — they are sub-skills this orchestrator invokes.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Python and Git. The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.

When your agent uses it

  • Asks to migrate a non-Polylith Python project to Polylith (e.g

Example prompts

  • “migrate projects/<name to Polylith”
  • “/polylith-migrate-orchestrator”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. User Confirmation
  2. Safety Net (git checkpoint)

What it can do on your machine

Read from SKILL.md and the folder at commit a7a80f2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • uv
    • poetry

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Polylith Migrate Orchestrator loads about 3.5k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 1,411 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:49
    can still leave **untracked** secrets (`.env*`, `*.pem`,
  • NoteMentions a .env fileSKILL.md:52
    - Confirm `.gitignore` covers `.venv/`, `.env*`, and common secret material.
  • NoteMentions a .env fileSKILL.md:65
    de anything matching secret patterns** (`.env*`, `*.pem`, `*.key`,

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DavidVujic/python-polylith at commit a7a80f2, republished under its MIT licence (© DavidVujic). 1,411 words, ~3,465 tokens.

Download SKILL.mdSave it as .claude/skills/polylith-migrate-orchestrator/SKILL.md (or your agent's skills folder).
name
polylith-migrate-orchestrator
description
[ENTRY POINT] Load this skill first when the user asks to migrate a non-Polylith Python project to Polylith (e.g. "migrate `projects/<name>` to Polylith"). Drives the full migration workflow plus optional tooling conversions; do not load any other `polylith-migrate-*` skill directly — they are sub-skills this orchestrator invokes.

Skill: polylith-migrate-orchestrator

🧭 You are in the right place. This is the entry point for migrating a non-Polylith Python project into a Polylith workspace. If you arrived here from a fuzzy match on a sub-skill name (e.g., polylith-migrate-discover, polylith-migrate-extract-to-base), stay here — those sub-skills depend on state and a git safety net that only this orchestrator sets up. Loading them in isolation is undefined behaviour. Execute the phases below in order.

Goal

Define and execute the workflow for migrating a non-Polylith Python project to a Polylith workspace. This skill must be explicitly invoked by a human with the project name/path.

Usage

To migrate a project, load the polylith-migrate-orchestrator skill and provide the project name (the subdirectory under projects/):

Load the `polylith-migrate-orchestrator` skill and migrate `projects/<project-name>`.

💡 How sub-skills are loaded. Each phase points to another skill named polylith-migrate-<phase> (e.g., polylith-migrate-discover, polylith-migrate-extract-to-base). Load each via your skill loader before executing the phase. Do not interleave phases — finish and verify one before starting the next.

Pre-flight

0. User Confirmation

Ask the user to confirm the project path and migration intent before doing anything else:

You are about to migrate `projects/<project-name>` to Polylith. This will refactor
the project into bases and components and move files. Proceed? (yes/no)

If the user declines, abort:

Migration aborted by user.
Phase 0. Safety Net (git checkpoint)

Migration is destructive — files move, directories are deleted, pyproject.tomls are rewritten. Before loading polylith-migrate-discover, establish rollback points:

  1. Confirm the working tree is clean:
    bash
    git status
    If there are uncommitted changes, ask the user to commit/stash before proceeding. Do not start a migration on top of a dirty tree. (If the repo has no commits yet, create an initial baseline commit so there is a GIT_BASE_SHA to roll back to.)
  2. Secret-hygiene precondition (do this before any phase stages files). Later phases stage changes broadly, and the migration creates untracked files mid-flow (e.g. .venv/ from uv sync/poetry install, regenerated lock files). A "clean" tracked tree can still leave untracked secrets (.env*, *.pem, *.key, *_rsa, *service-account*.json, credential files) that a broad stage would commit. Before proceeding:
    • Confirm .gitignore covers .venv/, .env*, and common secret material.
    • Review git status --porcelain for untracked sensitive files; have the user remove, relocate, or ignore them. Do not start until no untracked secret material remains stageable.
  3. Create a dedicated migration branch:
    bash
    git checkout -b migrate/<project-name>
  4. After each completed phase, commit per that phase's ## Commit section. The commit message follows the pattern migrate(<project-name>): phase <N> — <phase-name> so phases can be located in git log later.
    • Stage narrowly. Prefer scoped git add <path> over git add -A, limiting the stage to migration-relevant paths (the bricks/components/bases touched, the project dir, and migration/<project-name>/). Where a phase's ## Commit section still shows git add -A, first run git status --porcelain and exclude anything matching secret patterns (.env*, *.pem, *.key, *_rsa, *service-account*.json, credential files) or build artifacts (.venv/, caches). Never stage a file you have not accounted for.
    bash
    git add <scoped paths> && git commit -m "migrate(<project-name>): phase <N> — <phase-name>"

    This gives the user (and the agent) a discrete, named rollback point per phase. If a later phase fails verification, the agent can git reset --hard HEAD~1 to back out exactly one phase without losing earlier progress.

  5. Record the branch name and starting commit SHA in migration/<project-name>/state.md (the polylith-migrate-discover skill defines that file).

⚠ Never git reset --hard past the start of the migration branch without explicit user approval — the user's pre-migration work lives there. ⚠ Because phases may stage broadly, a git reset --hard HEAD before a commit also discards untracked work. This is a second reason to stage narrowly (step 4).

Workflow

The table below is the single source of truth for phase order and numbering. Execute phases top to bottom. Verify each phase's Verify section before starting the next, and commit between phases (see Phase 0 step 3). Where a sub-skill's own ## Commit section or description: hardcodes a different phase number, ignore that number — use the # from this table in the commit message.

Main line (always run)
#PhaseSkillDepends on
1Discoverpolylith-migrate-discover—
2Analyze imports + choose rewrite strategypolylith-migrate-analyze-imports1
3Extract to basepolylith-migrate-extract-to-base2
4Update imports in the new basepolylith-migrate-automate-import-updates3
5Prepare projectpolylith-migrate-prepare-project4 (+ 4b if taken)
6Verify stabilitypolylith-migrate-verify-stability5
7Isolate base and big componentpolylith-migrate-isolate-base-and-big-component6
8Split big componentpolylith-migrate-split-big-component7
9Extract standalone modulespolylith-migrate-extract-standalone-modules8
10Isolate shared and project logicpolylith-migrate-isolate-shared-and-project-logic9
11Distribute wiringpolylith-migrate-distribute-wiring10
12Split component internalspolylith-migrate-split-component-internals11
13Refactor testspolylith-migrate-refactor-tests12
14Definition of donepolylith-migrate-definition-of-done13
Conditional namespace-shim sub-track (phase 4b)

polylith-migrate-analyze-imports (phase 2) sets a SHIM_STRATEGY in state.md:

  • shimless (recommended when imports are submodule-qualified — e.g. from <ns>.<sub> import … — and <ns>/__init__.py exports little or nothing; a top-level re-export shim would resolve nothing there): phase 4 rewrites all references — base internals, entrypoints, infra, and tests — directly to the new namespace. Skip the sub-track below.

  • shim (a top-level re-export shim is viable): after phase 4, run this sub-track before phase 5, then continue the main line:

    #PhaseSkillDepends on
    4b.iGenerate compatibility shimpolylith-migrate-generate-shim3, 4
    4b.iiDetect circular importspolylith-migrate-detect-circular-imports4b.i
    4b.iiiResolve circular importspolylith-migrate-resolve-circular-imports4b.ii
    4b.ivUpdate test filespolylith-migrate-update-tests4b.iii

Dependency note (why this is a post-extraction sub-track): the shim re-exports the original namespace from the new base location, so it can only be generated after polylith-migrate-extract-to-base (phase 3) and after the base's own imports point at the new namespace (polylith-migrate-automate-import-updates, phase 4). A shim generated before extraction would re-export from a location that does not exist yet.

Show full SKILL.md (540 more words)Show less
Skippable / mergeable phases

Some phases are no-ops for certain projects. Skip with a one-line rationale recorded in state.md, and still commit the (possibly empty) phase so the git log stays complete:

  • Phase 10 (isolate shared and project logic) — skip on the first project migrated into the workspace (there is no second project to compare against). Revisit when a 2nd overlapping project is migrated.
  • Phase 12 (split component internals) — skip when components are already cohesive (no monolithic core.py mixing multiple domains).
  • Infra relocation / per-brick test layout — if a step cannot be verified in the migration environment (e.g. a deploy cycle is required), it may be deferred with a documented rationale rather than blocking the migration (see polylith-migrate-prepare-project and polylith-migrate-definition-of-done).

Optional Skills

These are not part of the linear flow above. They are triggered when the user opts in during polylith-migrate-discover (or, for polylith-migrate-dedupe, when duplication candidates surface). When triggered, insert them at the indicated point in the flow.

SkillWhen to runTrigger
polylith-migrate-convert-linterAfter polylith-migrate-discover, before polylith-migrate-analyze-imports.User opts in during polylith-migrate-discover.
polylith-migrate-convert-type-checkerAfter polylith-migrate-discover, before polylith-migrate-analyze-imports.User opts in during polylith-migrate-discover.
polylith-migrate-convert-package-managerAfter polylith-migrate-discover, before polylith-migrate-analyze-imports.User opts in during polylith-migrate-discover AND the workspace itself uses uv. The skill is opinionated about uv — see its header for the gating rule.
polylith-migrate-dedupeAfter polylith-migrate-split-big-component or polylith-migrate-extract-standalone-modules surfaces duplication candidates.Duplication candidates surfaced and user approves.

⚠ polylith-migrate-convert-package-manager only converts to uv. If the workspace uses Poetry, PDM, or Hatch as its standard, skip this skill entirely — the project should be aligned to the workspace's manager via a manual step instead.

Ordering when multiple converters are opted in

When the user opts into more than one of the optional polylith-migrate-convert-* skills during polylith-migrate-discover, run them in this order between polylith-migrate-discover and polylith-migrate-analyze-imports:

  1. polylith-migrate-convert-package-manager — runs first because it rewrites pyproject.toml wholesale; subsequent skills must operate on the final layout.
  2. polylith-migrate-convert-linter — runs second so workspace-level lint config consolidation happens against the final pyproject.toml.
  3. polylith-migrate-convert-type-checker — runs last; type-checker config is the most localized of the three.

polylith-migrate-dedupe is triggered later (after the big component is split and duplication candidates surface) and has no ordering dependency with the converters.

Commit between each optional skill the same way the main phases commit (see each skill's ## Commit section).

Execution checklist

For each phase:

  1. Validate state.md against the rules in polylith-migrate-discover (### Validation rules). Abort the phase if validation fails.
  2. Load the skill (polylith-migrate-<phase>).
  3. Execute its Steps in order.
  4. Run its Verify section. If verification fails, do not commit and do not proceed. Either fix the issue, or git reset --hard to back out the phase and consult the user.
  5. On success, commit per the phase's ## Commit section, using the # from this orchestrator table (not any number baked into the sub-skill).

Validation

  • The phase graph is a DAG. Every Depends on entry references an earlier-numbered phase (or an earlier step of the 4b sub-track), so a strict top-to-bottom execution always satisfies dependencies. (An earlier version of this table violated that — it listed generate-shim before extract-to-base; the shim phases are now a post-extraction sub-track, phase 4b.)
  • Every skill referenced above exists as polylith-migrate-<name>/SKILL.md under .agents/skills/polylith/migrate-project/.
  • Each phase's Verify block uses the commands recorded in migration/<project-name>/state.md (RUN_TEST_CMD, optionally RUN_LINT_CMD and RUN_TYPECHECK_CMD, plus POLY_CMD_PREFIX check).

© DavidVujic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/polylith/migrate-project/polylith-migrate-orchestrator of DavidVujic/python-polylith.

Open the folder on GitHubat commit a7a80f2

Compare with similar skills

Polylith Migrate Orchestrator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Polylith Migrate Orchestrator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polylith Migrate Orchestrator this skillDavidVujic/python-polylith553—~3.5kAutomated safety check: NotesMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Skyvern Version BumpSkyvern-AI/skyvern23k—~1kAutomated safety check: NotesAGPL-3.0
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Commitizencommitizen-tools/commitizen3.5k—~839Automated safety check: PassMIT
pybind11 Release Preparationpybind/pybind1118k—~1.7kAutomated safety check: PassCustom licence

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Skyvern Version Bump

    Skyvern-AI/skyvern

    Walks through a Skyvern open-source release bump: update the version, rebuild the Python and TypeScript SDKs with Fern, commit, and open a pull request.

    23k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check: notes
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commitizen

    commitizen-tools/commitizen

    A skill your agent uses for tasks involving Conventional Commits, commit message validation, Commitizen configuration, semantic version bumps, changelog generation, or CI/release automation with the…

    3.5k GitHub stars~839 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Opens the pybind11 release-preparation pull request: picking the release base, bumping the version in common.h and integrating the changelog, following docs/release.rst.

    18k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • A skill your agent uses when you need to run interactive CLI tools (vim, git rebase -i, Python REPL, etc.) that require real-time input/output - provides tmux-based approach for controlling…

    430 GitHub starsUsed in 3 repos~1.3k tokens
    DevelopmentAuto-check passed

More from DavidVujic/python-polylith

All 37 skills in this repo
  • Polylith Base Creation

    DavidVujic/python-polylith

    Create a Polylith base with poly create base — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job).

    553 GitHub stars~757 tokensUpdated 4 days ago
    Auto-check passed
  • Polylith Check

    DavidVujic/python-polylith

    Validate a Polylith workspace with poly check — the canonical CI gate.

    553 GitHub stars~972 tokensUpdated 4 days ago
    Auto-check passed
  • Polylith Component Creation

    DavidVujic/python-polylith

    Create a Polylith component with poly create component — a reusable, isolated brick implementing business logic, a feature, a domain module, or a capability.

    553 GitHub stars~800 tokensUpdated 4 days ago
    Auto-check passed
  • Polylith Dependency Management

    DavidVujic/python-polylith

    Add or manage third-party dependencies in a Polylith workspace.

    553 GitHub stars~643 tokensUpdated 4 days ago
    Auto-check passed
  • Polylith Dependency Visualization

    DavidVujic/python-polylith

    Visualize brick × brick dependencies with poly deps — find circular dependencies, inspect a brick's public interface, and detect interface-bypass violations.

    553 GitHub stars~906 tokensUpdated 4 days ago
    Auto-check passed
  • Polylith Diff

    DavidVujic/python-polylith

    List Polylith bricks whose implementation changed since a git tag using poly diff.

    553 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Polylith Migrate Orchestrator

What does Polylith Migrate Orchestrator do?

[ENTRY POINT] Load this skill first when the user asks to migrate a non-Polylith Python project to Polylith (e.g. Polylith Migrate Orchestrator is an agent skill from DavidVujic/python-polylith.g.

When should I use Polylith Migrate Orchestrator?

Polylith Migrate Orchestrator fits situations like: asks to migrate a non-Polylith Python project to Polylith (e.g.

How do I install Polylith Migrate Orchestrator in Claude Code?

Run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-orchestrator -a claude-code`. Or copy the skill folder (.agents/skills/polylith/migrate-project/polylith-migrate-orchestrator in DavidVujic/python-polylith) into .claude/skills/polylith-migrate-orchestrator in your project. Claude Code loads it when a task matches its description.

How do I install Polylith Migrate Orchestrator in Codex?

Run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-orchestrator -a codex`. Or copy the skill folder (.agents/skills/polylith/migrate-project/polylith-migrate-orchestrator in DavidVujic/python-polylith) into .agents/skills/polylith-migrate-orchestrator in your project. Codex loads it when a task matches its description.

Can I use Polylith Migrate Orchestrator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-orchestrator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/polylith-migrate-orchestrator, .gemini/skills/polylith-migrate-orchestrator, .github/skills/polylith-migrate-orchestrator and .opencode/skills/polylith-migrate-orchestrator in your project.

What does Polylith Migrate Orchestrator need to run?

Going by SKILL.md and its folder, Polylith Migrate Orchestrator needs the command-line tools its instructions call (git, uv and poetry). Our summary lists: Python 3.

Does Polylith Migrate Orchestrator access the network?

SKILL.md contains no URLs. Its commands use git and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Polylith Migrate Orchestrator safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Polylith Migrate Orchestrator use?

Polylith Migrate Orchestrator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Polylith Migrate Orchestrator use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Polylith Migrate Orchestrator?

Skills that share tags, products or a category with Polylith Migrate Orchestrator: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Skyvern Version Bump (Skyvern-AI/skyvern, 23k stars), Saleor Commit Workflow (saleor/saleor, 23k stars) and Commitizen (commitizen-tools/commitizen, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polylith Migrate Orchestrator?

DavidVujic (a GitHub user) maintains it in DavidVujic/python-polylith, which has 553 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 4, 2026.

Source: DavidVujic/python-polylith on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.