Agent skill

Polylith Diff

by DavidVujic in DavidVujic/python-polylith

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

MITAuto-check passedDevelopment

Install Polylith Diff

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

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

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

At a glance

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

  • Selective deploys (which projects need rebuilding?)
  • SKILL.md covers Quick command, Tag selection, Command reference and Examples, plus 2 more sections
  • Calls uv, pytest and poetry
  • PR scope review

What it does

Polylith Diff is an agent skill from DavidVujic/python-polylith. List Polylith bricks whose implementation changed since a git tag using poly diff. Use for release notes, selective deploys ("which projects need rebuilding?"), and PR scope review. For TEST-code diffs, use polylith-testing instead.

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 Development, covering Changelog and release notes. It works with Git. The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.

When your agent uses it

  • Selective deploys (which projects need rebuilding?)
  • PR scope review

Example prompts

  • “which projects need rebuilding?”
  • “/polylith-diff”

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
    • pytest
    • poetry
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use uv and 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 Diff loads about 1.1k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 415 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
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). 415 words, ~1,066 tokens.

Download SKILL.mdSave it as .claude/skills/polylith-diff/SKILL.md (or your agent's skills folder).
name
polylith-diff
description
List Polylith bricks whose **implementation** changed since a git tag using `poly diff`. Use for release notes, selective deploys ("which projects need rebuilding?"), and PR scope review. For TEST-code diffs, use `polylith-testing` instead.

Diff Skill

Quick command

bash
# Human-readable (default)
uv run poly diff

# Pipe-friendly: comma-separated list of changed bricks (use this in scripts)
uv run poly diff --bricks --short

Agent rule of thumb: when the goal is to do something with the result (run pytest, drive a deploy script, render a list), reach for --bricks --short first. The default output is for human readers.

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.

poly diff vs poly test diff:

  • poly diff → brick implementation changes since a tag (drives releases/deploys).
  • poly test diff → test-code changes since a tag (drives selective test runs). Load polylith-testing.

Tag selection

  • Default: latest git tag matching [tool.polylith.tag.patterns].stable from workspace.toml (e.g. stable-*).
  • --since <ref> — pin a specific tag, branch, or commit-ish. The CLI tries to resolve <ref> as a configured pattern key first, then falls through to using it literally with git diff <ref>.

Command reference

OptionDefaultDescription
--sincelatest matching tagReference tag (or branch/commit) to diff against.
--shortfalseCompact output. Combined with --bricks, emits a comma-separated list of brick names — pipe-friendly.
--bricksfalsePrint the list of bricks that changed (human-readable on its own; CSV when paired with --short).
--depsfalseWith --bricks, also print bricks that depend on the changed bricks (transitive impact).

Examples

bash
# Default: against latest stable-* tag
uv run poly diff

# Selective deploy: every brick changed (incl. transitive consumers) since a release tag
uv run poly diff --since stable-4 --bricks --deps

# Pipe-friendly: comma-separated names of bricks changed vs. main
uv run poly diff --since main --bricks --short
Show full SKILL.md (180 more words)Show less

Running tests for changed bricks

The established Polylith pattern is to feed --bricks --short straight into pytest -k: brick names become an or-expression that pytest matches against test IDs, so the agent doesn't need to resolve namespace / theme / base-vs-component.

bash
changes="$(uv run poly diff --bricks --short)"
[ -n "$changes" ] && uv run pytest -k "${changes//,/ or }"

Example: --bricks --short outputs log,message → pytest runs as pytest -k "log or message", collecting every test whose ID contains log or message (matches test/components/<ns>/log/... and test/bases/<ns>/log/... alike).

⚠ pytest -k does substring matching, so a brick named log will also match tests whose name contains log (e.g. an unrelated logger brick or a test_login function). For short/generic brick names, fall back to passing explicit test directories.

Notes for the agent

  • Operates on git's view of the working tree — uncommitted changes since the tag count as changed.
  • If no matching tag exists and --since isn't passed, the command prints No matching tags or commits found in repository. and exits 0. Guard scripts so they don't run pytest -k "" (which would collect nothing or, worse, every test depending on the version).
  • Map changed bricks → projects with poly info (load polylith-workspace-inspection) to drive selective deploys.

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

Open the folder on GitHubat commit a7a80f2

Compare with similar skills

Polylith Diff 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 Diff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polylith Diff this skillDavidVujic/python-polylith553—~1.1kAutomated safety check: PassMIT
React Router Release Notes Prepremix-run/react-router57k—~1.1kAutomated safety check: PassMIT
Draft Release Notesjamiepine/voicebox57k—~941Automated safety check: PassMIT
Mole Release Notes Publishertw93/Mole70k—~1.9kAutomated safety check: PassGPL-3.0
Release Bumpjamiepine/voicebox57k—~1.1kAutomated safety check: PassMIT
Git Workflow and Versioningaddyosmani/agent-skills103k2 repos~3.5kAutomated safety check: NotesMIT

Similar skills

  • React Router Release Notes Prep

    remix-run/react-router

    Polishes pending React Router change files before the versioning scripts run, and decides whether a long-form What's Changed section is warranted.

    57k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Release Notes

    jamiepine/voicebox

    Writes or refreshes the Unreleased section of CHANGELOG.md as a themed narrative built from the commits, PRs and diff since the last version tag.

    57k GitHub stars~941 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Publishes curated, bilingual release notes for an existing Mole version tag with gh release edit, including contributor thanks and reactions, after the release workflow finishes.

    70k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Release Bump

    jamiepine/voicebox

    Ends a release cycle by moving the Unreleased changelog notes under a dated version heading, bumping version files with bumpversion and tagging the commit.

    57k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated yesterday
    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 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 Libs

    DavidVujic/python-polylith

    Inspect third-party libraries used per Polylith project with poly libs.

    553 GitHub stars~656 tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Polylith Diff

What does Polylith Diff do?

List Polylith bricks whose implementation changed since a git tag using poly diff. Polylith Diff is an agent skill from DavidVujic/python-polylith. List Polylith bricks whose implementation changed since a git tag using poly diff.

When should I use Polylith Diff?

Polylith Diff fits situations like: selective deploys (which projects need rebuilding?); PR scope review.

How do I install Polylith Diff in Claude Code?

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

How do I install Polylith Diff in Codex?

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

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

What does Polylith Diff need to run?

Going by SKILL.md and its folder, Polylith Diff needs the command-line tools its instructions call (uv, pytest, poetry and git).

Does Polylith Diff access the network?

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

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

Polylith Diff 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 Diff use?

About 1.1k tokens (SKILL.md is roughly 4.3k 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 Diff?

Skills that share tags, products or a category with Polylith Diff: React Router Release Notes Prep (remix-run/react-router, 57k stars), Draft Release Notes (jamiepine/voicebox, 57k stars), Mole Release Notes Publisher (tw93/Mole, 70k stars) and Release Bump (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polylith Diff?

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.