pytemplate-uv 3.8: Your AI Agent Can Now Find, Use, and Make Python Templates
Three agent skills, a hub search, and a way to turn the project you already have into a template that anyone can check Ask your coding agent "find me a template for a FastAPI service with Postgres", and it searches
Three agent skills, a hub search, and a way to turn the project you already have into a template that anyone can check
Ask your coding agent "find me a template for a FastAPI service with Postgres", and it searches a verified index, shows you how far each candidate can be trusted, and creates the project once you choose. Ask it "turn this project into a template", and it converts your repository, stops if it finds anything that looks like a secret, and proves the result renders and passes its tests under a new name.
Today I'm releasing pytemplate-uv 3.8.0 on PyPI and pytemplate-hub 1.0.2 on the web. Together they finish a loop I've been building since 3.0:
- use a template: the factory, since 3.0;
- find a template: the hub, since 3.7, and now searchable from the terminal and from your agent;
- make a template: new in 3.8, from an existing project, from a Copier or cookiecutter template, or from scratch.
Each of those now has its own skill for AI coding agents, and each skill sits on a command with JSON output, so the agent drives real tools instead of improvising.
Here is the whole install, with nothing to set up first:
uvx pytemplate-uv@latest skill install
Installed skill at ~/.claude/skills/pytemplate/SKILL.md
Installed skill at ~/.claude/skills/pytemplate-find/SKILL.md
Installed skill at ~/.claude/skills/pytemplate-author/SKILL.md
Let me show you what each one does.
A quick recap
If you're new here: pytemplate-uv is an application factory for uv-native Python projects. You pick a profile (a CLI, a library, a FastAPI service), add components (a database, auth, a worker, an MCP server), and get a project that passes lint, format, strict mypy, and its tests from the first commit.
pytemplate-hub is an open index of template packs: Git repositories that add new profiles and components without forking anything. Every listing pins a tag to an exact commit and a SHA-256 digest of every file, and pytemplate-uv refuses a pack whose tag moved or whose files changed. You get exactly the template that was checked, or nothing.
In 3.7, finding a pack meant browsing the website. Making one meant reading the docs and writing manifests by hand. 3.8 fixes both.
1. Find: pytemplate search and the pytemplate-find skill
Search the hub from your terminal:
uvx pytemplate-uv@latest search fastapi postgres
ββββββββββββββββββββββββββ³βββββββββββββββββββ³βββββββββ³βββββββββ³βββββββββββββββββββ³ββββββββββββββββ³βββββββββββββββββββββββββββββββββββ
β Pack β Name β Tag β Tier β Checked β Profiles β Use β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β yuxuzi/fastapi-service β FastAPI services β v1.1.0 β listed β 2026-11-25 (9 d) β 2 of 2 passed β -h yuxuzi/[email protected] β
ββββββββββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββ΄βββββββββ΄βββββββββββββββββββ΄ββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
Listed means the automated checks passed, not that the pack was reviewed or is safe. Showing 1 of 1.
Every result tells you three things most template registries don't:
-
Tier.
listedmeans the hub's automated checks passed.reviewedmeans a person also read it. The footer says so in plain words every time. - Freshness. When it was last checked, how many days ago, and with which pytemplate-uv.
-
How to use it. The
-h owner/pack@tagstring that creates a project from exactly the checked revision.
You can narrow by category (--category web, from the fixed list cli, library, web, worker, data, ai, quant), and --json gives you the same results for scripts and agents.
What the agent sees
This is where the design matters for AI. In 3.7, the agent skill read the hub's whole index.json: 54,167 bytes of context for every search. In 3.8 the CLI reads the index, ranks it, and hands the agent only the matches:
| Query | JSON the agent reads |
|---|---|
fastapi postgres |
1,332 B |
cli typer |
5,783 B |
| every pack on the hub | 9,457 B |
That's 6 to 40 times less context, and the agent gets structured fields instead of a file it has to parse:
{
"id": "yuxuzi/fastapi-service",
"tier": "listed",
"reviewed_by": null,
"checked_on": "2026-11-25",
"age_days": 9,
"checked_with": "pytemplate-uv==3.6.0",
"profiles": [
{"id": "service", "lifecycle": "passed"},
{"id": "service-sql", "lifecycle": "passed"}
],
"matched": ["fastapi"],
"use": "-h yuxuzi/[email protected]"
}
The conversation
With the skills installed, you just ask:
You: Find me a template for a FastAPI service with a SQL database.
The pytemplate-find skill turns that into a few search words and runs search --json. It shows you each candidate with its tier and the date of its last check, and it calls out anything checked more than 180 days ago. Then it waits for you to choose. It never picks a stranger's template for you.
Once you choose, it hands off to the pytemplate skill, which:
- lists the pack's profiles with the same
-hpins (serviceandservice-sqlhere); - writes a render request and previews it with
plan: components, dependencies, settings, every file; - shows you that preview and waits for your confirmation;
- creates the project, announcing the commit and digest it verified;
- runs the project's own lint, type-check, and tests, and reports the real results.
If the hub website is down, the skill doesn't give up: it searches a shallow clone of the hub's entries with --index, and if that fails too, it offers the bundled profiles.
2. Make: three ways to start a template pack
Every team has a project it's proud of. Until now, turning it into a template meant hand-converting files to Jinja, writing manifests, and hoping you'd caught every hard-coded name. 3.8 adds a pack command group:
init Start a template pack from nothing, a bundled profile, or another pack.
from-project Make a one-profile template pack from a git project (its tracked files only).
check Check a template pack and report every problem (exit 0 when there are no errors).
From a project you already have
Here's a real run. I generated a small CLI called price-feed, committed it, and converted it:
uvx pytemplate-uv@latest pack from-project price-feed feed-pack --project-name price-feed
Pack feed-pack written to β¦/feed-pack (profile feed-pack, kind cli).
Copied 17 file(s):
.github/workflows/ci.yml -> .github/workflows/ci.yml.jinja [template, 1 replacement(s); template syntax escaped]
AGENTS.md -> AGENTS.md.jinja [template, 6 replacement(s)]
README.md -> README.md.jinja [template, 5 replacement(s)]
price_feed/__init__.py -> {{ package_name }}/__init__.py [renamed]
price_feed/cli.py -> {{ package_name }}/cli.py.jinja [template, 6 replacement(s); renamed]
pyproject.toml -> pyproject.toml.jinja [template, 4 replacement(s)]
tests/test_cli.py -> tests/test_cli.py.jinja [template, 2 replacement(s)]
...
Replaced price-feed with {{ project_name }} and price_feed with {{ package_name }}.
Lifecycle commands: uv sync; uv run ruff check .; uv run ruff format --check .; uv run mypy {package}; uv run pytest; uv build
What it did, and what it refused to do:
- It copied only files git tracks, and never ran anything from the project.
- It renamed the package folder and replaced the project and package names as whole words. A file becomes
.jinjaonly when its text actually changed. - It escaped the
${{ β¦ }}GitHub Actions syntax that was already in the CI workflow, so the template engine leaves it alone. - It read the lifecycle commands from
pyproject.toml, the CI workflows, and the Makefile, and kept only commands that start withuv. Deploy jobs, conditional steps, and commands that reach outside the project are reported and dropped.
It stops at secrets
Then I did something careless on purpose: I committed a prod.env and a settings file with an AWS key in it, and converted again:
Left out 1 file(s):
prod.env: an environment file, which may hold secrets (only .env.example is copied)
Secret-looking text in 1 place(s). Stop and ask the user before anything is published:
price_feed/settings.py:1: AWS access key ID (AKIA)
Environment files, .pypirc, .netrc, .npmrc, private keys, uv.lock, and build output are always left out. Text that looks like a secret is reported by file and kind, never echoed. The report goes to your terminal, never into the pack. The pytemplate-author skill is told in so many words: stop at any secret warning, name the file and the kind, and don't go on until you answer.
From another template, or from nothing
uvx pytemplate-uv@latest pack init my-pack # a minimal pack
uvx pytemplate-uv@latest pack init my-service --from bundled:fastapi # a bundled profile, standalone
uvx pytemplate-uv@latest pack init my-fork --from yuxuzi/[email protected] # a hub pack, by its pins
A copy keeps the source's LICENSE, resets the id, name, and version to 0.1.0, and its README says "Adapted from" the source. A blank pack gets no license at all, because choosing one is your decision, not the tool's.
For Copier and cookiecutter templates, the pytemplate-author skill walks the agent through the conversion by hand, with a list of everything that usually goes wrong: hooks that never run, {% now %}, custom filters, include paths, symbolic links, repository-only files, and choices a hook used to make.
3. Check: pytemplate pack check
The hub has checked packs since 1.0. In 3.8 that check lives in pytemplate-uv, so you run the exact check the hub runs before you open a pull request:
uvx pytemplate-uv@latest pack check feed-pack --lifecycle --forbid price-feed --forbid price_feed
Pack feed-pack 0.1.0 (feed-pack): 1 profile(s)
feed-pack: lifecycle passed, agent-ready no
Warnings (2):
[license] The pack has no license file (LICENSE, LICENSE.md, LICENSE.txt, COPYING); the hub requires one for a listing.
[agent-ready] feed-pack AGENTS.md: AGENTS.md does not list the lifecycle command(s): uv build.
Passed with 2 warning(s).
That took 5 seconds. Here's what each part means:
-
Every problem at once, not the first one: manifests, profiles, components, categories, Copier settings that would run code, symbolic links, submodules, lifecycle commands that don't start with
uv, and a missing license. - Each profile is rendered with its default answers, and each optional component together with whatever it requires, with Copier's unsafe mode off.
-
--lifecyclerenders each profile and runs its commands with onlyPATHand an empty home directory. That runs the pack's code, so it's opt-in. -
--forbid TEXTfails if the old project's name appears anywhere in a rendered path or file. That's the "did I catch every hard-coded name?" test, automated. -
--outdatedreads PyPI and warns when a dependency floor is a major version or more behind. It's off by default, so the check stays offline. -
Agent-ready warnings. A pack whose projects have no
AGENTS.md, or whoseAGENTS.mddoesn't list the commands to run, gets a warning. A template is now also instructions for the agent that will work in every project made from it.
And the proof that it worked: I rendered the pack under a new name and ran its tests.
uvx pytemplate-uv@latest create fx-feed --template ./feed-pack -y
cd fx-feed && uv sync && uv run pytest
6 passed in 0.45s
No price left anywhere in the code.
pytemplate.api.check_pack returns the same report as a typed object, and pytemplate-hub 1.0.2 now uses it. The tool you run locally and the gate on the hub are one implementation, so "passes locally, fails in the hub's CI" can't happen because of a second copy of the rules.
4. The agent, end to end
Put together, this is the conversation the pytemplate-author skill is built for:
You: Turn this repository into a template my team can reuse.
- It asks for the project's current name and runs
pack from-project --json. - It goes through the result with you: what was copied, what was left out and why, the names it replaced, the commands it kept, and the ones it skipped. For each skipped command it asks whether to rewrite it as a
uvcommand. - It asks which values should become questions (the author, the Python version) and which optional parts should become components (a database module, say).
- If anything looks like a secret, it stops and asks you to remove it and commit, or to confirm it isn't one.
- It runs
pack checkwith the old name forbidden, fixes what it reports, and checks again. - It renders the pack under a new name and runs that project's tests.
- It publishes only when you say so: a tag, and the hub's
addcommand in a fork of the hub.
With no user present, for example in CI, it makes the conservative choice at every step: keep less, add no license, publish nothing. Then it lists each choice in its report.
Each skill is plain instructions over commands with --json output and stable exit codes (0 done, 1 refused with nothing written, 2 rendering failed). It works the same in Claude Code and, with skill install --agent agents, in Codex and other Agent Skills clients.
Measured, not promised
Before tagging 3.8.0 I tried the new commands on real projects, not toy examples:
| Trial | Result |
|---|---|
| A 102-file numerical library |
--lifecycle passes, and all 493 tests pass under the new name. 2 hand edits left, both flagged in the report. |
| pytemplate-hub itself |
--lifecycle passes in 35 s (605 s before a fix this trial prompted), and all 288 tests pass renamed. |
The copier-uv Copier template |
Adapted with the author skill alone in about 2 minutes of agent time. 0 errors, and the rendered project's tests pass. |
cookiecutter-pytest-plugin |
About 2 minutes, --lifecycle passes, and the rendered project's tests pass. |
| Every pack listed on the hub | All 8, plus the hub's sample pack, pass pack check with no errors. |
The trials also found what didn't work, and that's the point of running them:
- Converting the hub itself dropped files whose names contained template syntax, so 38 tests failed. Fixed.
- A one-word project, where the project name and the package name are the same word, produced
from my-widget import β¦, which isn't valid Python. Fixed: context now decides which name a match becomes. - The two template conversions found 11 gaps in the author skill and 5 unhelpful error messages. All of them are covered now.
The release itself: 903 tests pass, plus 30 opt-in smoke tests that generate projects and run their whole lifecycle. Every number in this post comes from the published 3.8.0, run on the day it was released.
What else is in pytemplate-hub 1.0.2
-
One check, shared.
addandverifyuse pytemplate-uv'scheck_pack. A refused pack lists every error at once, each naming its profile. - New Learn pages on the website: making a pack with an agent, converting a Copier or cookiecutter template, your organization's own templates, and a course as a pack.
-
index.jsonis now a documented format 1 contract, so other tools can read the hub too. - It requires
pytemplate-uv>=3.8,<4.
Who should try 3.8?
- Developers working with AI coding agents who want the agent to find a checked template and prove the result works, instead of improvising boilerplate.
-
Teams with a "golden" service or library they keep copying by hand. Run
from-projectonce, and every new project starts from it. - Template authors on Copier or cookiecutter who want pinned, verifiable distribution and a uv-native toolchain.
- Platform and DevEx teams who want one local check that matches the gate their templates have to pass.
- Teachers: a course's starter project as a pack means every student starts from the same checked commit.
Upgrading
Nothing breaks. 3.8 only adds commands.
Reinstall the skills to get all three (the old install has only pytemplate):
uvx pytemplate-uv@latest skill install --force
skill install now installs all three skills by default, and --skill NAME installs one. The pytemplate skill no longer reads the hub's index itself; it hands off to pytemplate-find.
What's next
-
More packs from people who aren't me. The hub's catalog is still mostly my own packs. With
from-project, publishing yours is a short conversation with your agent. -
Reviewed tiers.
listedis automated. I'd like more packs to reachreviewed, with a named reviewer. - Your feedback on the author skill. Every gap so far came from a real conversion. Point it at your project and tell me where it stumbled.
Get started
# install the three skills for your agent
uvx pytemplate-uv@latest skill install
# find a template
uvx pytemplate-uv@latest search fastapi
# turn your project into one, and check it
uvx pytemplate-uv@latest pack from-project ./my-project ./my-pack --project-name my-project
uvx pytemplate-uv@latest pack check ./my-pack --lifecycle --forbid my-project
- β pytemplate-uv on GitHub: https://github.com/yuxuzi/pytemplate-uv
- π pytemplate-hub: https://yuxuzi.github.io/pytemplate-hub/
- π¦ PyPI: https://pypi.org/project/pytemplate-uv/3.8.0/
- π Changelog: https://github.com/yuxuzi/pytemplate-uv/blob/main/CHANGELOG.md
Both projects are free and MIT-licensed. Issues, criticism, and pull requests are all welcome.
The bottom line
3.0 let you use a template. The hub let you find one you could trust. 3.8 lets you make one from the project you already have, check it the same way the hub does, and hand all three jobs to your coding agent, which runs real commands, stops at secrets, and waits for your word before anything is published.
Generate once. Own your code. Share what works.
pytemplate-uv 3.8.0 is on PyPI; pytemplate-hub 1.0.2 is live. Requires Python 3.11+ on Linux, macOS, or Windows.
Disclosure: written by me, polished with the help of AI.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.