What is shelby?
Shelby is a coding agent that runs in your terminal, inside your project. You ask in plain English, and it reads your files, makes edits and runs commands, asking before each change. It works with many models through one API, so you pick the model and pay only for what you use.
It is also small enough to read in an afternoon, so today is as much about how an agent works as about using one.
The model never touches your files. It only asks for a tool, shelby does the work and sends the result back, and this repeats until the model has an answer.
- The loopModel, tools, model again. About 300 lines in
agent.ts. - ToolsRead, search, edit, run commands. You can add your own as a single file.
- Skills and knowledgePlain markdown in your repo that teaches it how your project works.
- The message listEverything said so far, resent each step. It is the agent's only memory.
Skill or tool?
Code with a name, a description and inputs. The model asks for it, shelby runs it and sends the result back. Reading a file, running a command and searching are all tools.
Example:read_file reads a file from your project, run_command runs your tests, and subagent hands a job to a helper. You can add your own as a small .mjs file in .shelby/tools/.
A markdown file of instructions for one kind of job in your project. No code runs. The agent loads it when the task matches, then follows it using its tools.
Example:add-page says where a page goes, how to wire it into the nav and which pattern to copy. It lives in .shelby/skills/, and the agent can write one for you.
Rule of thumb: if it has to compute, fetch or change something, build a tool. If it has to do a job the way your project does it, write a skill. A skill often tells the agent which tools to use, and in what order.
Setup handout
Install shelby, add your API key and check it works. About ten minutes, with fixes for the usual problems.
Open the handout → ThenTask board
13 tasks across four levels: use it, teach it a skill, evaluate it, and compare models and subagents. Ticks are saved in your browser.
Open the task board →