My new agent skill: /setup

I’ve made a /setup skill, the first agent skill I’ve built that’s intended for reuse. It brings the scaffolding and boilerplate for any project up to a high standard, adding things such as mise task management, dependency pinning, issue tracking standards, test coverage, and continuous integration.

Example improvements made with /setup

Here are some pull requests from running /setup along with some of the improvements the agent decided to make:

How it works

The skill is written for opus-class agents, giving high-level instructions that exercise the model’s ability to think and reason. Specific templates ground the model so it knows what good looks like, and it verifies its own work in a fresh context. A sonnet-class model can use the skill but in testing made less comprehensive improvements.

The skill works for greenfield and for brownfield repos. It will initialize new projects based on template projects, while for existing projects it will add what’s missing. The skill is not fully autonomous. It explores first and then asks the user questions in a short batch, but it will ask for more user input and decisions if needed.

This skill works on a large variety of projects. I’ve tested Python / TypeScript / Go / Rust / Monorepo / Markdown and have templates for each of those. It works well for small hobby projects and scales to at least a medium size (~250k LoC) repo.

YMMV

This is an opinionated skill, based on 25 years of setting up software projects and doing large-scale platform engineering to set up many parallel projects. While flexible and context-aware, my preferences and my judgment are encoded in it, so if you disagree with me about what a good project setup really is, you need to swap out the templates.

TIL: phases

It’s good to divide agent skill documents into phases for the agent:

  • exploration and fact-finding
  • plan to do the work
  • ask the user to fill in gaps, assumptions, and make decisions
  • complete the plan based on those answers
  • execute the plan to do the actual work
  • verify the work done achieved the goal (with fresh context)
  • fix the work that failed verification
  • re-verify the fixes

This plan/do/check/act pattern is very similar to an AI-assisted spec-driven TDD loop (spec → tests → code → refactor), with some additional ergonomics to make working with the skill easier for humans.

Rewriting the skill to this structure made the changes it proposed more cohesive and more comprehensive.

Installing

Using skills.sh:

npx skills add lsimons/lsimons-skills

/setup tries to use /complete, so also install that.

Or you can manually copy the setup directory and the complete directory into the skills folder of your agent.

All words in this post were written by me, not by AI, but AI did help review early post drafts and it helped write the skill (Anthropic Claude Opus).

Leave a comment