<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Agents on Tyler Collins</title>
    <link>https://www.tk11br.ca/tags/agents/</link>
    <description>Recent content in Agents on Tyler Collins</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>2022-2026 Tyler Collins. Content licensed under CC BY-NC 4.0.</copyright>
    <lastBuildDate>Mon, 24 Aug 2026 12:00:00 -0400</lastBuildDate>
    <atom:link href="https://www.tk11br.ca/tags/agents/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Revisiting Cookiecutter in the Age of Coding Agents</title>
      <link>https://www.tk11br.ca/posts/revisiting-cookiecutter-with-agents/</link>
      <pubDate>Mon, 24 Aug 2026 12:00:00 -0400</pubDate>
      <guid>https://www.tk11br.ca/posts/revisiting-cookiecutter-with-agents/</guid>
      <description>A practical comparison of Cookiecutter PyPackage, a coding agent, and using both to build a modern Python package.</description>
      <content:encoded><![CDATA[<p>A few years ago, I used Cookiecutter to show how to get from <code>import blah</code> to <code>pip install blah</code>.</p>
<p>This sounds simple, but it isn&rsquo;t. A Python script can live almost anywhere, but a formal package needs the right structure to be built into a wheel. It needs dependency metadata, versions, releases, a licence, and some way to test that it still works.</p>
<p>Cookiecutter gave us a standard template. Instead of remembering every file and setting and creating them manually, we answered a few questions and started with a working package. I gave <a href="/posts/teaching-python-packaging-cookiecutter/">a talk about that workflow in 2022</a>.</p>
<p>Personally, I stopped shipping tools that needed it, so I stopped thinking about Cookiecutter. Recently, I needed to package something again, and an obvious question came up. Why use a project template when I can ask an agent to build the project?</p>
<h2 id="a-small-comparison">A small comparison</h2>
<p>For comparison, I used the same throwaway project for each attempt. It&rsquo;s a small package called <code>csv-summary</code>. All it does is read a CSV file, summarize its numeric columns, and provide a <code>csv-summary</code> command. I also wanted tests and enough infrastructure to install, check, version, and release the package.</p>
<p>I tried three different options:</p>
<ol>
<li><a href="https://github.com/audreyfeldroy/cookiecutter-pypackage"><code>cookiecutter-pypackage</code></a> without an agent</li>
<li>An agent starting from an empty directory</li>
<li>The Cookiecutter project followed by the same agent</li>
</ol>
<p>I did this with one prompt, not a benchmark. The goal was to see what each approach considered a finished package and where I would have to step in and fix things.</p>
<h2 id="cookiecutter-by-itself">Cookiecutter by itself</h2>
<p>Cookiecutter has changed a lot since my 2022 talk. The current template uses <code>uv</code>, Ruff, pytest, <code>ty</code>, and GitHub Actions. <code>uv</code> wasn&rsquo;t even mainstream until late 2024. The template now includes workflows for continuous integration, documentation, CodeQL, and publishing to PyPI with trusted publishing. It also has Dependabot configuration, release tooling, security documentation, and a changelog.</p>
<p>This is a lot more infrastructure than this example needed, but that&rsquo;s pretty much the trade-off for Cookiecutter. The opinionated set of files is great, but if the package is truly small, this is overkill.</p>
<h2 id="the-agent-by-itself">The agent by itself</h2>
<p>Starting from an empty directory, the agent produced the leanest project. It chose Polars, added a <code>src</code> layout, wrote two focused tests, configured Ruff and pytest, built both a wheel and source distribution, and checked them with Twine.</p>
<p>The agent also stopped at a fairly light definition of &ldquo;done.&rdquo; Releases used a documented sequence of <code>uv</code>, Hatch, and Twine commands. There was no continuous integration, automated PyPI publishing, documentation site, dependency updater, or security scanning.</p>
<p>This is pretty much what you&rsquo;d want for a small internal tool. It&rsquo;s less convincing as the default for a package that other people will depend on.</p>
<p>The prompt had asked for release infrastructure, but the agent gave me a workable manual process. Cookiecutter gave me a repeatable and automated one.</p>
<p>A better prompt could have asked for every missing piece. Of course, writing that prompt means knowing which pieces to request.</p>
<h2 id="cookiecutter-followed-by-the-agent">Cookiecutter followed by the agent</h2>
<p>The combined approach produced the most complete result. Cookiecutter supplied the project policy, while the agent spent its time implementing the package. Its formatting, linting, type checks, tests, and package build all passed.</p>
<p>The agent went further with the combined example. It added a minimum version for <code>pandas</code>, locked the resolved dependencies, and discussed which Python versions to support.</p>
<p>Cookiecutter had already handled much of what my prompt requested. The agent had less setup work to do, so it spent more time on package-specific decisions than it did in the empty-directory test.</p>
<h2 id="templates-still-have-a-job">Templates still have a job</h2>
<p>In general, an agent is good at doing the work in front of it. A maintained template is good at recording work that is easy to forget.</p>
<p>That difference is important. I can ask an agent to create CI, configure trusted publishing, pin GitHub Actions, add release notes, and set up documentation. I can also forget to ask for one of those things at any stage.</p>
<p>Cookiecutter records those decisions in files that have been used and tested together. With a template, the agent&rsquo;s job is smaller. It doesn&rsquo;t need to invent a release process or choose a documentation system. It can focus on other things, such as the consequences of a dependency or which Python versions to support.</p>
<p>There are concerns, of course. A Cookiecutter template can get out of date. A technology can fall out of style while the template keeps generating it. You could even argue that the whole thing could be a Markdown file or an agent skill. Still useful for a beginner, though!</p>
<h2 id="what-i-would-use">What I would use</h2>
<p>For a small internal script that only needs to be installable, I would just let an agent drive. There&rsquo;s no need for all the extra GitHub features.</p>
<p>For a package that I plan to publish and maintain, I would start with Cookiecutter and then give the generated project to an agent. Cookiecutter would provide the boring, repeatable decisions. The agent would adapt them and run with it.</p>
<p>Interesting to see how far we have come in just a few years.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
