Agent skill

Polylith Migrate Automate Import Updates

by DavidVujic in DavidVujic/python-polylith

[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith.

MITAuto-check passed

Install Polylith Migrate Automate Import Updates

skills CLI
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-automate-import-updates -a claude-code

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

GitHub CLI
$ gh skill install DavidVujic/python-polylith polylith-migrate-automate-import-updates --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-automate-import-updates .claude/skills/polylith-migrate-automate-import-updates && 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-automate-import-updates
GitHub stars
554
Token cost
~976 tokens
SKILL.md length
384 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith.

  • Works in 3 steps: Identify files in the new base location… → Update imports to reference the new… → Record updated files
  • SKILL.md covers Goal, Inputs, Steps and Output, plus 2 more sections
  • Calls git

What it does

Polylith Migrate Automate Import Updates is an agent skill from DavidVujic/python-polylith. [Internal sub-skill of polylith-migrate-orchestrator. Do not load directly — load polylith-migrate-orchestrator first, which drives all phases.] Update imports in the new base location to reference the new namespace instead of the original namespace.

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

The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.

Example prompts

  • “/polylith-migrate-automate-import-updates”

Requirements

  • Python 3

Workflow steps

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

  1. Identify files in the new base location importing from the original namespace
  2. Update imports to reference the new namespace
  3. Record updated files

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

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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 Automate Import Updates loads about 976 tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 384 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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). 384 words, ~976 tokens.

Download SKILL.mdSave it as .claude/skills/polylith-migrate-automate-import-updates/SKILL.md (or your agent's skills folder).
name
polylith-migrate-automate-import-updates
description
[Internal sub-skill of `polylith-migrate-orchestrator`. Do not load directly — load `polylith-migrate-orchestrator` first, which drives all phases.] Update imports in the new base location to reference the new namespace instead of the original namespace.

Skill: polylith-migrate-automate-import-updates

Goal

Update imports to reference the new namespace instead of the original namespace, ensuring that the codebase remains functional after the namespace migration.

Scope depends on SHIM_STRATEGY (set by polylith-migrate-analyze-imports):

  • shim: rewrite imports in the new base location only — external consumers keep using the original namespace via the shim (phase 4b).
  • shimless: rewrite every reference to the original namespace — base internals, entrypoints / run-scripts, infra (e.g. alembic/env.py), and tests — so nothing imports the old namespace and no shim is needed.

Cover all three reference forms (see polylith-migrate-analyze-imports): dotted from <ns>.<sub> import …, bare-submodule from <ns> import <sub> (incl. multi-name and mixed lines), and quoted string paths (mock.patch("<ns>.x.Y"), logging dict-config). A naive "from <ns>." replace silently misses the bare and quoted forms.

💡 Script the rewrite for anything non-trivial. A small text-in → text-out helper (a pure function: file text + an {old → new} mapping → rewritten text) handles all three forms — including splitting a mixed bare-import line into moved vs. not-moved names — far more reliably than ad-hoc edits across dozens of files. Keep it as plain functions (no classes), run it over bases/, components/, test/, and the project dir, then verify by grepping for any residual <ns> reference. The same helper is reusable for the component-extraction rewrites in polylith-migrate-split-big-component.

Inputs

  • Project name (from migration/<project-name>/state.md)
  • Original namespace (from migration/<project-name>/state.md)
  • New namespace (from migration/<project-name>/state.md)
  • Import analysis report (from migration/<project-name>/import_analysis.md)

Steps

Show full SKILL.md (160 more words)Show less
1. Identify files in the new base location importing from the original namespace
  1. Review the import analysis report to identify files in the new base location (at bases/${TARGET_TOP_NS}/${INITIAL_BASE_NAME}/) that import from the original namespace.
2. Update imports to reference the new namespace
  1. For each file in the new base location that imports from the original namespace:
    • Replace from ${ORIG_TOP_NS} import ... with from ${TARGET_TOP_NS}.${INITIAL_BASE_NAME}.<module> import ...
    • Replace import ${ORIG_TOP_NS} with import ${TARGET_TOP_NS}.${INITIAL_BASE_NAME}

Example:

python
# Before
from myproject.core import MyClass
import myproject.utils

# After
from mynamespace.mybase.core import MyClass
import mynamespace.mybase.utils
3. Record updated files
  1. Record all updated files in migration/${PROJECT}/import_updates.md.

Output

  • Updated files in the new base location
  • A report file: migration/<project-name>/import_updates.md listing all updated files

Verify

  1. Confirm that all files listed in migration/<project-name>/import_updates.md have been updated.
  2. Check that no files in the new base location import from the original namespace.
  3. Verify that the codebase remains functional by running the test command from migration/<project-name>/state.md.

Commit

bash
git add bases/${TARGET_TOP_NS}/${INITIAL_BASE_NAME}/
git add migration/${PROJECT}/import_updates.md
git commit -m "migrate(${PROJECT}): phase <N> — automate-import-updates"

<N> is this phase's number from the polylith-migrate-orchestrator table (the single source of truth) — do not hardcode it.

© 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-automate-import-updates of DavidVujic/python-polylith.

Open the folder on GitHubat commit a7a80f2

Compare with similar skills

Polylith Migrate Automate Import Updates 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 Automate Import Updates compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polylith Migrate Automate Import Updates this skillDavidVujic/python-polylith554—~976Automated safety check: PassMIT
Autom AutomationComposioHQ/awesome-claude-skills77k3 repos~723Automated safety check: PassNone
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Doppler Marketing Automation AutomationComposioHQ/awesome-claude-skills77k3 repos~809Automated safety check: PassNone
Reversible MigrationJuliusBrussee/caveman111k1 repos~196Automated safety check: PassApache-2.0
Importasgeirtj/system_prompts_leaks69k—~3.5kAutomated safety check: PassCC0-1.0

Similar skills

  • Autom Automation

    ComposioHQ/awesome-claude-skills

    Automate Autom tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~723 tokens
    Productivity & AutomationAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Doppler Marketing Automation Automation

    ComposioHQ/awesome-claude-skills

    Automate Doppler Marketing Automation tasks via Rube MCP (Composio).

    77k GitHub starsUsed in 3 repos~809 tokens
    Productivity & AutomationAuto-check passed
  • Reversible Migration

    JuliusBrussee/caveman

    Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and…

    111k GitHub starsUsed in 1 repo~196 tokens
    DevelopmentAuto-check passed
  • Import

    asgeirtj/system_prompts_leaks

    Handle explicit /import requests for read-only transcript recovery and a resume checkpoint, or continue work from other coding agents and unnamed artifacts.

    69k GitHub stars~3.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    276k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-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).

    554 GitHub stars~757 tokensUpdated 6 days ago
    Auto-check passed
  • Polylith Check

    DavidVujic/python-polylith

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

    554 GitHub stars~972 tokensUpdated 6 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.

    554 GitHub stars~800 tokensUpdated 6 days ago
    Auto-check passed
  • Polylith Dependency Management

    DavidVujic/python-polylith

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

    554 GitHub stars~643 tokensUpdated 6 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.

    554 GitHub stars~906 tokensUpdated 6 days ago
    Auto-check passed
  • Polylith Diff

    DavidVujic/python-polylith

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

    554 GitHub stars~1.1k tokensUpdated 6 days ago
    Auto-check passed

Questions about Polylith Migrate Automate Import Updates

What does Polylith Migrate Automate Import Updates do?

[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith. Polylith Migrate Automate Import Updates is an agent skill from DavidVujic/python-polylith. [Internal sub-skill of polylith-migrate-orchestrator.

How do I install Polylith Migrate Automate Import Updates in Claude Code?

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

How do I install Polylith Migrate Automate Import Updates in Codex?

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

Can I use Polylith Migrate Automate Import Updates 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-automate-import-updates -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-automate-import-updates, .gemini/skills/polylith-migrate-automate-import-updates, .github/skills/polylith-migrate-automate-import-updates and .opencode/skills/polylith-migrate-automate-import-updates in your project.

What does Polylith Migrate Automate Import Updates need to run?

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

Does Polylith Migrate Automate Import Updates access the network?

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

Is Polylith Migrate Automate Import Updates safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Polylith Migrate Automate Import Updates use?

Polylith Migrate Automate Import Updates 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 Automate Import Updates use?

About 976 tokens (SKILL.md is roughly 3.9k 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 Automate Import Updates?

Skills that share tags, products or a category with Polylith Migrate Automate Import Updates: Autom Automation (ComposioHQ/awesome-claude-skills, 77k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars), Doppler Marketing Automation Automation (ComposioHQ/awesome-claude-skills, 77k stars) and Reversible Migration (JuliusBrussee/caveman, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polylith Migrate Automate Import Updates?

DavidVujic (a GitHub user) maintains it in DavidVujic/python-polylith, which has 554 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.