Agent skill

Polylith Migrate Isolate Base And Big Component

by DavidVujic in DavidVujic/python-polylith

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

MITAuto-check passedBackend & APIs

Install Polylith Migrate Isolate Base And Big Component

skills CLI
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-isolate-base-and-big-component -a claude-code

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

GitHub CLI
$ gh skill install DavidVujic/python-polylith polylith-migrate-isolate-base-and-big-component --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-isolate-base-and-big-component .claude/skills/polylith-migrate-isolate-base-and-big-component && 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-isolate-base-and-big-component
GitHub stars
553
Token cost
~1.7k tokens
SKILL.md length
726 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 7 steps: Create the Big Component → Move Non-Entrypoint Code → Define Public API → …
  • Backend & APIs work in your project
  • SKILL.md covers Goal, Inputs, Steps and Verify, plus 2 more sections
  • Calls git

What it does

Polylith Migrate Isolate Base And Big Component 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.] Shrink the temporary migration base into thin base(s) + one big component. Bases contain only entrypoints/wiring, while the big component contains everything else.

Its SKILL.md is about 1.7k 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 Backend & APIs. The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “/polylith-migrate-isolate-base-and-big-component”

Requirements

  • Python 3

Workflow steps

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

  1. Create the Big Component
  2. Move Non-Entrypoint Code
  3. Define Public API
  4. Update Bases
  5. Update pyproject.toml
  6. Update manifest.md
  7. FastAPI Guidance

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 Isolate Base And Big Component loads about 1.7k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 726 words of instructions outside code blocks.

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

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). 726 words, ~1,685 tokens.

Download SKILL.mdSave it as .claude/skills/polylith-migrate-isolate-base-and-big-component/SKILL.md (or your agent's skills folder).
name
polylith-migrate-isolate-base-and-big-component
description
[Internal sub-skill of `polylith-migrate-orchestrator`. Do not load directly — load `polylith-migrate-orchestrator` first, which drives all phases.] Shrink the temporary migration base into thin base(s) + one big component. Bases contain only entrypoints/wiring, while the big component contains everything else.

Skill: polylith-migrate-isolate-base-and-big-component

Goal

Shrink the temporary migration base into thin base(s) + one big component:

  • Bases: Contain only entrypoints/wiring (e.g., FastAPI endpoints, CLI wiring, consumer wiring).
  • Big Component: Contains all other code.

⚠ Base vs component naming (read first). A base and a component cannot share the same brick name — both would resolve to the Python package <TARGET_TOP_NS>.<name> and collide. So the big component takes INITIAL_BASE_NAME (<TARGET_TOP_NS>.<INITIAL_BASE_NAME>) and each base is renamed to a distinct, entrypoint-specific name (the <base> used in step 5 — e.g. <INITIAL_BASE_NAME>_api, <INITIAL_BASE_NAME>_handler). This is why the temporary base must be renamed when the component claims its name.

Multiple entrypoints → multiple thin bases. A real service often has several deployable entrypoints (an HTTP API + one or more queue consumers + scheduled jobs). Create one thin base per entrypoint (e.g. <x>_api, <x>_handler, <x>_jobs), each exposing only its run/wiring function and importing logic from components. Do not force them into a single base. (Shared startup wiring — init_db, init_logging, … — goes into a small shared component, not duplicated per base; see polylith-migrate-distribute-wiring.)

Inputs

From migration/<PROJECT>/state.md:

  • TARGET_TOP_NS
  • INITIAL_BASE_NAME
  • Verification commands.

From migration/<PROJECT>/manifest.md:

  • Entrypoints list.

All inputs from state.md are assumed to satisfy the validation rules in polylith-migrate-discover (### Validation rules). Validate before proceeding.

Steps

1. Create the Big Component
  • Create components/<TARGET_TOP_NS>/<INITIAL_BASE_NAME>/.
  • ⚠ If the temporary base currently occupies bases/<TARGET_TOP_NS>/<INITIAL_BASE_NAME>/, rename the base(s) first — they must not keep the same name as the big component (see the naming callout above). Create one renamed thin base per entrypoint (<base> in step 5), and update the project's run scripts / Dockerfile to point at the new base name(s).
2. Move Non-Entrypoint Code
  • Move non-entrypoint code from the base(s) to the big component.
3. Define Public API
  • Define a minimal public API in components/<TARGET_TOP_NS>/<INITIAL_BASE_NAME>/__init__.py.
4. Update Bases
  • Update bases to import only from component APIs:
    python
    from <TARGET_TOP_NS>.<INITIAL_BASE_NAME> import ...
5. Update pyproject.toml
  • Add the new component to [tool.polylith.bricks]:
    toml
    [tool.polylith.bricks]
    "../../bases/<TARGET_TOP_NS>/<base>" = "<TARGET_TOP_NS>/<base>"
    "../../components/<TARGET_TOP_NS>/<INITIAL_BASE_NAME>" = "<TARGET_TOP_NS>/<INITIAL_BASE_NAME>"
6. Update manifest.md
  • Reflect the new structure in migration/<PROJECT>/manifest.md.
7. FastAPI Guidance
Stays in BaseMoves to Big Component
app = FastAPI(...)Domain/business logic
Middleware, router registrationPersistence/repositories
Route handlers (endpoints)External integrations
Startup/shutdown/lifespan wiringReusable parsing/validation

Verify

  • RUN_TEST_CMD succeeds.
  • If set, RUN_LINT_CMD and RUN_TYPECHECK_CMD succeed.
  • Run POLY_CMD_PREFIX check to validate the workspace structure.
  • Run POLY_CMD_PREFIX sync to synchronize the [tool.polylith.bricks] table with actual imports.
Show full SKILL.md (360 more words)Show less

Common failure modes

SymptomLikely causeRemediation
Circular import: base imports from component, component imports back from baseSome "non-entrypoint" code was moved but still references base-only helpers (e.g. the FastAPI app instance).Move the helper down into the component, or invert the dependency by passing the needed value as a function argument. The base's app instance must never be imported by a component.
poly check / import error: base and big component both named <INITIAL_BASE_NAME>The base wasn't renamed when the component claimed INITIAL_BASE_NAME — two bricks now map to <TARGET_TOP_NS>.<INITIAL_BASE_NAME>.Rename the base to an entrypoint-specific name (<INITIAL_BASE_NAME>_api, _handler, …), update [tool.polylith.bricks] and the run scripts, then POLY_CMD_PREFIX sync.
ImportError: cannot import name '<x>' from '<TARGET_TOP_NS>.<INITIAL_BASE_NAME>'The big component's __init__.py doesn't re-export <x>. Code that previously reached into submodules now needs the public API.Add from <TARGET_TOP_NS>.<INITIAL_BASE_NAME>.<submodule> import <x> to the component's __init__.py, or have the caller import the submodule directly (and accept the brick-interface violation that poly deps --interface will flag).
Base file becomes near-empty after the splitGood — that's the goal. But check: is there any wiring left, or did you accidentally move the entrypoint itself?If the entrypoint (e.g., app = FastAPI(...)) ended up in the component, move it back to the base. The base must own the entrypoint object.
poly check flags the component as not used by any projectThe base's imports go to the wrong namespace (e.g., from <ORIG_TOP_NS>...) so the import graph doesn't reach the component.Update base imports to from <TARGET_TOP_NS>.<INITIAL_BASE_NAME> import … and re-run POLY_CMD_PREFIX sync.
Tests for moved code now fail to find fixturesconftest.py was left in the base or moved to the wrong scope.Move test fixtures alongside the code they cover; usually that's under test/components/<TARGET_TOP_NS>/<INITIAL_BASE_NAME>/.
Verification fails and you can't quickly diagnosePhase commit not yet made.git reset --hard HEAD to roll back to the previous phase's commit and consult the user.

Commit

After verification passes, commit this phase to the migration branch:

bash
git add -A && git commit -m "migrate(<PROJECT>): phase <N> — isolate-base-and-big-component"

Substitute <PROJECT>, <N>, and <phase-name> from state.md and the orchestrator's phase table. Do not proceed to the next phase without a clean commit — the per-phase commit is the rollback point for the next phase's failure-mode tables.

© 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-isolate-base-and-big-component of DavidVujic/python-polylith.

Open the folder on GitHubat commit a7a80f2

Compare with similar skills

Polylith Migrate Isolate Base And Big Component 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 Isolate Base And Big Component compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polylith Migrate Isolate Base And Big Component this skillDavidVujic/python-polylith553—~1.7kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api44k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    44k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-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

Categories

Questions about Polylith Migrate Isolate Base And Big Component

What does Polylith Migrate Isolate Base And Big Component do?

[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith. Polylith Migrate Isolate Base And Big Component is an agent skill from DavidVujic/python-polylith. [Internal sub-skill of polylith-migrate-orchestrator.

When should I use Polylith Migrate Isolate Base And Big Component?

Polylith Migrate Isolate Base And Big Component fits situations like: backend & APIs work in your project.

How do I install Polylith Migrate Isolate Base And Big Component in Claude Code?

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

How do I install Polylith Migrate Isolate Base And Big Component in Codex?

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

Can I use Polylith Migrate Isolate Base And Big Component 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-isolate-base-and-big-component -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-isolate-base-and-big-component, .gemini/skills/polylith-migrate-isolate-base-and-big-component, .github/skills/polylith-migrate-isolate-base-and-big-component and .opencode/skills/polylith-migrate-isolate-base-and-big-component in your project.

What does Polylith Migrate Isolate Base And Big Component need to run?

Going by SKILL.md and its folder, Polylith Migrate Isolate Base And Big Component needs the command-line tools its instructions call (git). Our summary lists: Python 3.

Does Polylith Migrate Isolate Base And Big Component 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 Isolate Base And Big Component 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 Isolate Base And Big Component use?

Polylith Migrate Isolate Base And Big Component 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 Isolate Base And Big Component use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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 Isolate Base And Big Component?

Skills that share tags, products or a category with Polylith Migrate Isolate Base And Big Component: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 44k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polylith Migrate Isolate Base And Big Component?

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.