The API, the harness
and the file that teaches an agent a trick.
curl -s https://parley.api.mit.edu/v1/chat/completions \
-H "Authorization: Bearer $PARLEY_API_KEY" \
-H "Content-Type: application/json" \
-d @1-duck.json | jq .
1-duck.json # a list of messages in, one message out
2-name-alone.json # "What is my name?" It has no idea
3-name-with-history.json # same question, earlier turns resent. Now it knows
4-tool-offer.json # a tool on offer. It replies with a request to run it
ls . → 5-tool-result.json # we run the tool, send the result back. It answersThe model asks. It cannot act.
Whoever runs the tool and sends the transcript back is the harness.
pi --no-tools --no-session --system-prompt "You are a duck. Only quack."
pi --no-tools --no-session
pi --no-session
> what files are in this folder?
1. Quack.
2. I can't see your files. Could you paste a listing?
3. [bash: ls] There are 14 files: 1-duck.json, 2-name-alone.json, ...ls, every file, every test logA skill is a file. The harness says it exists.
The model reads it when the task matches.
# SKILL.md, the front matter between the --- fences
name: grill-me
description: Interview the user relentlessly about a
plan or design, resolving the full decision tree.
Use when user says "grill me" or asks for
rigorous design review. ...
Two lines per skill in the system prompt: name, description, and where the file is. The description is the trigger.
grill-me/
└── SKILL.md the instructions
research-figures/
├── SKILL.md when and how
├── scripts/ export helper, examples
├── references/ journal specs, recipes
└── assets/ .mplstyle, palettes
Where pi looks: ~/.pi/agent/skills/, the project’s .pi/skills/, --skill <folder>. Or /skill:name by hand.
head -5 ~/.pi/agent/skills/grill-me/SKILL.md # in the shell: the front matter
pi --no-session # start pi; nothing saved to disk
> What skills do you have, and how do you know? # typed at pi's prompt
<available_skills>
<skill>
<name>grill-me</name>
<description>Interview the user relentlessly about a plan ...</description>
<location>/Users/you/.pi/agent/skills/grill-me/SKILL.md</location>
</skill>
...
</available_skills>Volunteer. Your draft, on screen, for ten minutes.
Watch for: the read that loads the skill; the decision tree; questions that arrive in batches with a recommended answer.
# left: no skills at all
pi --no-session --no-skills "$(cat prompt.txt)"
# right: exactly one
pi --no-session --no-skills --skill ~/codes/AI_skills/skills/research-figures "$(cat prompt.txt)"
prompt.txt: Make a figure of the drag polar data in polar.csv for an AIAA
journal paper: C_L against C_D, and L/D against alpha, with both
configurations on each panel. Put the script and the output in figures/.grill-me, fight-me, tdd. No scripts. They change what the model does next: interview first, attack the premise, write the failing test before the code.
research-figures, research-schematics. Journal widths, palettes, an export helper, a recipe per figure type. They carry judgment someone wrote down once.
The model does not learn from its mistakes. The agent can, if you write them down. A skill is the smallest unit of that.
.pi/skills/<name>/SKILL.md, from the template.Write one skill for a behaviour you want from your agent: how you like plots made, a check it should always run, a fix you kept making by hand. Put it in your portfolio repo under .pi/skills/<name>/SKILL.md, commit it, and note in your dev-log what it does. Template: skills-demo/skill-template/SKILL.md in the session folder.
Simon Willison, Hoard things you know how to do (5 min), and the Agent Skills specification (5 min).
Email me, cc your advisor, ask them to reply-all. Tuesday 22 September.
Sandboxing agents: the lethal trifecta, prompt injection, and running pi inside nono.