Agent skills and the CLI
Week 3 · LO2
Today
Run a workflow by hand → encode it → test its trigger boundary → keep CLI evidence.
A skill is a procedure
SKILL.mdfront matter:nameanddescription- Body:
Steps,Judgement,Verification - Selection is a claim to test
Start by hand
git status --short
git diff --check
python -m pytest -q
Save the revision and output before writing the skill.
The description is the boundary
Specific: “run release checks and report evidence when a change is ready for review.”
Vague: “help with code.”
Which one stays quiet for “implement a new feature”?
The body is the procedure
## Steps
1. Read the boundary.
2. Run the check.
## Judgement
- If unrelated files are edited, stop.
## Verification
Run `git diff --check` and the focused test.
A procedure does not grant permission.
Three positives, one near miss
| Request | Expected |
|---|---|
| Trace a request and cite files | trigger |
| Report handlers before edits | trigger |
| Map an unfamiliar module read-only | trigger |
| Implement the change and add tests | quiet |
Predict before opening the trigger record.
Read the kit examples
research-codebase · facts before edits
plan-change · bounded plan before implementation
review-diff · reproduce findings in an existing diff
Read descriptions first; bodies are loaded after selection.
What the checker checks
skill_check.py checks:
- front matter and directory name
- required sections and links
- 4–12 prompt records
- mismatch revision details
It does not run a model or observe hidden selection.
Run it directly
Run it from the course checkout. PROJECT_ROOT is your project.
python lectures/week-03/fixture/skill_check.py \
"$PROJECT_ROOT/A3-work/skills/my-workflow/SKILL.md" \
"$PROJECT_ROOT/A3-work/trigger-test.yaml"
Expected: Structure checked.
Prediction versus observation
should_trigger: your intended boundarypredicted: what you expected before the runobserved: what the CLI actually showed
A mismatch is evidence. Keep it and revise the description deliberately.
CLI evidence
Keep the exact request, revision, selection line (or “not shown”), command, exit status, stdout/stderr, and verification result.
A final summary without its command is a claim, not evidence.
Safe command line
Use a dedicated directory. Keep employer and cloud credentials out. Do not paste keys into prompts, screenshots, logs, or commits. For generated commands, inspect before running.
Studio handoff
A3 is report.json plus the files it cites:
- hand-run output
SKILL.md- two trials: one trigger, the near miss
agent-run.txt, with the four-row record and checker output as supporting evidence- one decision line
python practice/a3/check.py "$PROJECT_ROOT/A3-work"
Verify before accepting
git rev-parse HEAD
git diff --check
git diff --name-only
git status --short
git diff reads tracked files only. git status --short also lists new files.
Then compare every observed value with the saved transcript.
Common failure modes
- writing before the hand run
- a description broad enough to match everything
- treating quiet as failure
- inventing an observation the CLI did not show
- reporting checker output as model behavior
Exit question
What is the nearest request that should stay quiet for your skill?
Write it down before you submit A3.