agent-workdir
Skill3 starsChanged 7 days agoMITView on GitHub
Use before writing any audit, report, probe, scratch/test script, log, screenshot, handoff, plan, spec, or research output. Decides the <root>/<project>/<date>-<topic>/ path (default root ~/agent-work) so agent output never lands inside a checkout.
In this repository12 other files it gives its agents.
- adversarial-reviewSkill
- airgapSkill
- db-migrationsSkill
- delegateSkill
- docker-packagingSkill
- handoffSkill
- impeccableSkill
- run-validationSkill
- security-huntSkill
- ship-auditSkill
- skill-critiqueSkill
- web-perimeter-auditSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read ${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/settings.toml, key root under [workdir].
- Very specific: line 43
If <root> already has a dir for the same project under another name, reuse it.
- Very specific: line 44
Not meaningful (home dir, /tmp, a hash) → <root>/_misc/<session-id or timestamp>/.
- Very specific: line 49
Create the dir when you first write to it.
- Distinctive: line 51
Don't move existing project files into the work dir.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent work dir
Agent output that a human might want later goes to <root>/<project>/<YYYY-MM-DD>-<topic>/,
never inside a git checkout. Session-only throwaways go to the session scratchpad.
Resolve <root>
Read ${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/settings.toml, key root under [workdir].
| Situation | Do |
No file, or no root key | Use the default, ~/agent-work. Don't ask. |
root set and valid | Use it. Expand a leading ~. |
File doesn't parse as TOML, or root isn't a string, isn't absolute or ~-prefixed, or points inside a git checkout | Use ~/agent-work for this task. Tell the user once: the file, the key, what's wrong. |
<root> doesn't exist | Create it (mkdir -p). |
<root> can't be created or written | Stop and ask the user. Never fall back to the repo or the current directory. |
Where things go
| Output | Where |
| Audits, reports, probes, research notes | <root>/<project>/<date>-<topic>/ |
| Scratch/test scripts, logs, screenshots | same dir (screenshots for a browser check: scratchpad) |
| Skill outputs (plans, specs) | same dir, unless the user names a path |
| Handoffs | <root>/<project>/<handoff dir>/<date>-<short-name>.md; <handoff dir> is [handoff] dir in the settings, default handoffs |
| Code or docs the user asked to add to the repo | the repo |
| One-off intermediate files you will delete | scratchpad |
<date> is today as YYYY-MM-DD (date +%F).
Resolve <project>
- In a git checkout (worktrees included), use the main checkout's directory name:
basename "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")" - Otherwise, the working folder's name.
- If
<root>already has a dir for the same project under another name, reuse it. - Not meaningful (home dir,
/tmp, a hash) →<root>/_misc/<session-id or timestamp>/.
<topic> is 2–4 kebab-case words (2026-11-19-auth-audit). Reuse today's dir for the same topic.
Rules
- Create the dir when you first write to it; no README, index, or
latestsymlink. - Tell the user the full path of anything they will want to open.
- Don't move existing project files into the work dir; this applies to new agent output only.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

