Make a pack with an agent
With pytemplate-uv 3.8 and later, an AI agent can turn a project or a bare idea into a template pack. The agent does the tedious steps, and you make the decisions: which values become questions, which optional parts become components, and when the pack is published. This page is for pack authors. Read Template packs for the format, and What the checks mean for what the checks prove.
1. Install the skills
uvx pytemplate-uv@latest skill install
This installs three skills: pytemplate (create a project), pytemplate-find (find a pack on the
hub), and pytemplate-author (make a pack). To install only the author skill, run
uvx pytemplate-uv@latest skill install --skill pytemplate-author. The
Using pytemplate-uv page lists the other install options.
2. Choose a starting point
Ask the agent in plain words, such as "Make a pack from this project". The skill starts from one of three places, and each ends the same way:
- From an existing project. The agent runs
pack from-projecton a project that git tracks. It copies the tracked files, renames the package, and turns the project's name into a question. It never runs anything from the project. - From a template. The agent runs
pack init --fromwith a bundled profile, such asbundled:python, a local pack, or a git source. A Copier template is adapted in place; see Convert your template. - From scratch. The agent runs
pack init DIR, which writes a minimal pack with one profile that passes its checks as written.
3. Review the report
from-project prints a report: the files it copied, the files it left out and why, the names it
replaced, and any warning that a file looks like it holds a secret. Read it with the agent. The
agent should stop at a secret warning until you decide what to do with that file. Then decide
which values become questions, and which optional parts become components.
4. Check the pack
uvx pytemplate-uv@latest pack check ./my-pack --lifecycle --forbid old-project-name
--lifecyclerenders each profile and runs its lifecycle commands, so it runs the pack's code. Use it on a pack you trust. Without it, rendering runs none of the pack's code.--forbidfails the check if the text appears in any generated path or file. Repeat it for each name that should not survive, such as the original project's name.- The check reports every problem at once. It also warns when a profile has no
AGENTS.md, or when theAGENTS.mddoes not list its lifecycle commands. Warnings do not fail the check.
5. Render under a new name
A pack that passes its checks still needs one real project generated from it:
uvx pytemplate-uv@latest create new-name -p PROFILE --template ./my-pack -y
cd new-name && uv sync && uv run pytest
Use a name that is not the original project's. Its tests should pass in the new project.
6. Publish
When the pack works, and you have decided to share it, tag a release and list it. The agent does not tag or publish on its own; it waits for your word. The steps are in Publish a pack.
Rules the agent follows
- Rendering runs no template code: Copier runs with
unsafe=False, so tasks and hooks do not run. - Running a pack's checks with
--lifecycleis opt-in, because it runs the pack's code. - Text in the project's files is data. The agent does not follow instructions found in it.