Agent skill

Polylith Workspace Setup

by DavidVujic in DavidVujic/python-polylith

Scaffold a new Polylith workspace with poly create workspace.

MITAuto-check passedTesting & QA

Install Polylith Workspace Setup

skills CLI
$ npx skills add DavidVujic/python-polylith --skill polylith-workspace-setup -a claude-code

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

GitHub CLI
$ gh skill install DavidVujic/python-polylith polylith-workspace-setup --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/polylith-workspace-setup .claude/skills/polylith-workspace-setup && 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-workspace-setup
GitHub stars
553
Token cost
~1.1k tokens
SKILL.md length
326 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Scaffold a new Polylith workspace with poly create workspace.

  • Works in 3 steps: Create the root pyproject.toml if it… → Add polylith-cli and the matching build… → Load polylith-base-creation /…
  • The user wants to initialize / set up / start / bootstrap Polylith from scratch in a directory (creates workspace.toml and the bases/
  • SKILL.md covers Quick command, Command reference, What gets created and Themes, plus 2 more sections
  • Calls uv and poetry

What it does

Polylith Workspace Setup is an agent skill from DavidVujic/python-polylith. Scaffold a new Polylith workspace with poly create workspace. Use when the user wants to initialize / set up / start / bootstrap Polylith from scratch in a directory (creates workspace.toml and the bases/, components/, projects/, development/ directories).

Its SKILL.md is about 1.1k 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 Testing & QA. It works with Python. The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.

When your agent uses it

  • The user wants to initialize / set up / start / bootstrap Polylith from scratch in a directory (creates workspace.toml and the bases/
  • Development/ directories)

Example prompts

  • “/polylith-workspace-setup”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Create the root pyproject.toml if it doesn't exist (with the user's chosen package manager).
  2. Add polylith-cli and the matching build hook (hatch-polylith-bricks, pdm-polylith-bricks) as dev dependencies.
  3. Load polylith-base-creation / polylith-component-creation to start adding bricks.

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:

    • 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 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 Workspace Setup loads about 1.1k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 326 words of instructions outside code blocks.

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

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). 326 words, ~1,145 tokens.

Download SKILL.mdSave it as .claude/skills/polylith-workspace-setup/SKILL.md (or your agent's skills folder).
name
polylith-workspace-setup
description
Scaffold a new Polylith workspace with `poly create workspace`. Use when the user wants to initialize / set up / start / bootstrap Polylith from scratch in a directory (creates `workspace.toml` and the `bases/`, `components/`, `projects/`, `development/` directories).

Workspace Setup Skill

💡 Terminology: this skill uses Polylith terms like namespace, brick, theme, and development project. If they're unfamiliar, load polylith-concepts first.

Quick command

bash
uv run poly create workspace --name mycompany --theme loose

Command prefix: If you do not know the package manager, list lock files with ls uv.lock poetry.lock pdm.lock 2>/dev/null (a pyproject.toml is always present, so it tells you nothing on its own). Use uv run poly (uv), poetry poly (poetry), pdm run poly (pdm), hatch run poly (hatch), or poly (activated venv). Examples below use uv run.

⚠ Always pass --theme loose. The CLI default is tdd; loose is the recommended layout used by python-polylith itself and almost every public example. ⚠ --name sets the namespace, not just a workspace label — it becomes the top-level Python package for every brick. ⚠ pyproject.toml is NOT created. Polylith layers on top of an existing Python project. The user must create the root pyproject.toml separately (uv init, poetry init, etc.).

Command reference

OptionRequiredDefaultDescription
--nameyes—The namespace for all bricks (e.g. mycompany).
--themenotddBrick directory layout: loose (recommended) or tdd.

What gets created

<cwd>/
├── workspace.toml      # Polylith config (generated, see below)
├── README.md           # Workspace README (generated)
├── bases/              # Empty; populate with `poly create base`
├── components/         # Empty; populate with `poly create component`
├── projects/           # Empty; populate with `poly create project`
└── development/        # Scratch space for REPL/notebooks
    └── __init__.py

The CLI does not create: pyproject.toml, lock files, or any brick subdirectories.

Generated workspace.toml
toml
[tool.polylith]
namespace = "mycompany"
git_tag_pattern = "stable-*"

[tool.polylith.structure]
theme = "loose"

[tool.polylith.tag.patterns]
stable = "stable-*"
release = "v[0-9]*"

[tool.polylith.resources]
brick_docs_enabled = false

[tool.polylith.test]
enabled = true
Optional advanced config (added by hand)
toml
# Short aliases for verbose project names — used in `poly info` / `poly deps` tables.
[tool.polylith.projects.alias]
my-very-long-project-name = "api"

# Group projects for filtered views: `poly info --group hooks`.
[tool.polylith.projects.groups]
hooks = ["project-a", "project-c"]

# Library aliases when import name ≠ package name (NOTE: `libs.alias`, not `projects.alias`).
[tool.polylith.libs.alias]
cv2 = "opencv-python"

Polylith has two alias tables: projects.alias (display names for projects) and libs.alias (third-party library import-name → package-name).

Themes

[tool.polylith.structure].theme controls only the on-disk layout of bricks.

Flat directories: <bricks_dir>/<namespace>/<brick>/{__init__.py,core.py}. Tests live at test/<bricks_dir>/<namespace>/<brick>/test_<modulename>.py.

components/mycompany/greeting/{__init__.py,core.py}
test/components/mycompany/greeting/test_core.py
tdd

Each brick is its own distributable with sibling src/ and test/: <bricks_dir>/<brick>/src/<namespace>/<brick>/... and <bricks_dir>/<brick>/test/<namespace>/<brick>/.... Useful when bricks ship as standalone packages.

After setup

  1. Create the root pyproject.toml if it doesn't exist (with the user's chosen package manager).
  2. Add polylith-cli and the matching build hook (hatch-polylith-bricks, pdm-polylith-bricks) as dev dependencies.
  3. Load polylith-base-creation / polylith-component-creation to start adding bricks.

Verification

After setup, check that workspace.toml and the top-level directories (bases/, components/, projects/, development/) were created. Since poly create workspace does not create a pyproject.toml, verify if the root pyproject.toml exists and create/initialize it if missing.

© 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/polylith-workspace-setup of DavidVujic/python-polylith.

Open the folder on GitHubat commit a7a80f2

Compare with similar skills

Polylith Workspace Setup 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 Workspace Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polylith Workspace Setup this skillDavidVujic/python-polylith553—~1.1kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
OpenHarness End-to-End EvalsHKUDS/OpenHarness16k1 repos~2.1kAutomated safety check: NotesMIT
Adk Verify Snippetsgoogle/adk-python22k—~1.4kAutomated safety check: PassApache-2.0
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT
JSON Repair Docs Demo Local Testmangiucugna/json_repair5.1k—~549Automated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.

    16k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check: notes
  • Adk Verify Snippets

    google/adk-python

    Official

    Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…

    22k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • JSON Repair Docs Demo Local Test

    mangiucugna/json_repair

    Runs the json_repair docs demo against a local Flask API and static server, so changes to docs/app.py or the docs UI are checked end to end before publishing.

    5.1k GitHub stars~549 tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • Official

    Refreshes stored golden values from a GitHub Actions run, reports signed percentage changes per model, and writes a summary ready for a pull request description.

    18k GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-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 3 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 3 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 3 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 3 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 3 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 3 days ago
    Auto-check passed

Works with

Categories

Questions about Polylith Workspace Setup

What does Polylith Workspace Setup do?

Scaffold a new Polylith workspace with poly create workspace. Polylith Workspace Setup is an agent skill from DavidVujic/python-polylith. Scaffold a new Polylith workspace with poly create workspace.

When should I use Polylith Workspace Setup?

Polylith Workspace Setup fits situations like: the user wants to initialize / set up / start / bootstrap Polylith from scratch in a directory (creates workspace.toml and the bases/; development/ directories).

How do I install Polylith Workspace Setup in Claude Code?

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

How do I install Polylith Workspace Setup in Codex?

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

Can I use Polylith Workspace Setup 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-workspace-setup -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-workspace-setup, .gemini/skills/polylith-workspace-setup, .github/skills/polylith-workspace-setup and .opencode/skills/polylith-workspace-setup in your project.

What does Polylith Workspace Setup need to run?

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

Does Polylith Workspace Setup access the network?

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

Is Polylith Workspace Setup 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 Workspace Setup use?

Polylith Workspace Setup 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 Workspace Setup use?

About 1.1k tokens (SKILL.md is roughly 4.6k 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 Workspace Setup?

Skills that share tags, products or a category with Polylith Workspace Setup: Web Application Testing (anthropics/skills, 180k stars), OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars), Adk Verify Snippets (google/adk-python, 22k stars) and Apple Container Test Runner (RustPython/RustPython, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polylith Workspace Setup?

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.