agentleFS
mmgordon82mmgordon82/agent-skills/skills/agent-workdir/SKILL.md

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.

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
  1. Very specific:

    Read ${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/settings.toml, key root under [workdir].

    line 13
  2. Very specific:

    If <root> already has a dir for the same project under another name, reuse it.

    line 43
  3. Very specific:

    Not meaningful (home dir, /tmp, a hash) → <root>/_misc/<session-id or timestamp>/.

    line 44
  4. Very specific:

    Create the dir when you first write to it.

    line 49
  5. Distinctive:

    Don't move existing project files into the work dir.

    line 51

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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].

SituationDo
No file, or no root keyUse the default, ~/agent-work. Don't ask.
root set and validUse 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 checkoutUse ~/agent-work for this task. Tell the user once: the file, the key, what's wrong.
<root> doesn't existCreate it (mkdir -p).
<root> can't be created or writtenStop and ask the user. Never fall back to the repo or the current directory.

Where things go

OutputWhere
Audits, reports, probes, research notes<root>/<project>/<date>-<topic>/
Scratch/test scripts, logs, screenshotssame 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 repothe repo
One-off intermediate files you will deletescratchpad

<date> is today as YYYY-MM-DD (date +%F).

Resolve <project>

  1. In a git checkout (worktrees included), use the main checkout's directory name:
    basename "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"
  2. Otherwise, the working folder's name.
  3. If <root> already has a dir for the same project under another name, reuse it.
  4. 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 latest symlink.
  • 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.