agentleFS
kartikkabadikartikkabadi/synara-beta/.agents/skills/hygiene/SKILL.md

hygiene

Skill6 starsChanged 2 months agoMITView on GitHub

Restore the environment after agent work: close only tabs you opened, kill only processes you started, delete only scratch you created, revert state you changed. Use when finishing any task or ending a session, after creating temp files, opening browser tabs or workspaces, or starting background processes.

10 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-policy, auto-perf-optimize and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenCortexIDESkill

    add-policy

    Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.

    Also in 4 projects that use this

  • MicrosoftSkill

    auto-perf-optimize

    Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

    Also in 4 projects that use this

  • MicrosoftSkill

    chat-customizations-editor

    Use when working on the Chat Customizations editor — the management UI for agents, skills, instructions, hooks, prompts, MCP servers, and plugins.

    Also in 4 projects that use this

  • +9 more from microsoft

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Scratch goes in /tmp or the system temp dir: Never the home directory, never the repo root, never ~/Downloads unless the user asked for a …

    line 20
  2. Distinctive:

    Do not create files the user did not ask for: No summary.md, notes.md, plan.md unless they requested a document.

    line 21
  3. Distinctive:

    Before you report done, walk the mess:

    line 27
  4. Distinctive:

    State you changed: If you toggled a setting, checked out a branch, or pointed a config somewhere temporary, put it back.

    line 33
  5. Distinctive:

    If cleanup deleted or closed things, one line in the final report: "cleaned up: removed /tmp scratch, closed 3 tabs, killed the dev …

    line 37

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Hygiene

The rule: leave the environment as you found it, minus the one artifact the user asked for. The cleanup pass covers only what you created — files, tabs, workspaces, processes, state. Run it when work ends, not someday.

Own it, or leave it

Cleanup only ever touches what you created. The test for anything you find is: did I make this? If not, leave it. If you are unsure, leave it and mention it.

User things are off limits: their files, their tabs and workspaces, their processes, their uncommitted changes. Deleting is for scratch only. The deliverable, verification artifacts the user will want (a diff, a log of a failure you are reporting), and anything referenced in your report all stay.

During the work

Prevention beats cleanup, and the habits that prevent mess are also the record of what you created:

  • Scratch goes in /tmp or the system temp dir. Never the home directory, never the repo root, never ~/Downloads unless the user asked for a file there. Name scratch files clearly: /tmp/hygiene-audio-probe.py beats ~/test2.py.
  • Do not create files the user did not ask for. No summary.md, notes.md, plan.md unless they requested a document. The chat reply is the summary.
  • One browser tab per task; one workspace per session. Whatever browser surface you used — an in-app browser, ego-browser, Playwright, a CLI automation tool — keep its tabs and workspaces tidy by the same rule: tabs you opened close after the check; workspaces, spaces, or contexts you created close with the task. Use the browser tool's own teardown API when it has one (ego-browser's completeTaskSpace, Playwright's context close); that tool's skill documents its cleanup contract.
  • Kill what you start. Background servers, watchers, tail -f, dev processes: stop them when done or hand them off explicitly ("left the dev server running, it's on :3000").

At the end

Before you report done, walk the mess:

  1. Files. List what you created outside the deliverable: scripts, downloaded fixtures, extracted archives, build output, screenshots. Delete the scratch ones. Keep only what the user asked for or what a future session genuinely needs, and put keepers somewhere sensible (the repo, a project folder), not /tmp and not home.
  2. Tabs, workspaces, windows. Close the tabs you opened and the workspaces, spaces, or contexts you created, using the browser tool's own teardown API where one exists (ego-browser completeTaskSpace, Playwright context close, in-app browser close). Close preview panes and terminals you spawned for one-off checks. What you did not open stays: the user's tabs, workspaces, windows, and the browser's restore history are theirs.
  3. Processes. Kill anything still running that isn't meant to outlive the session.
  4. Bloat inside files. The cleanup applies to content too, not just file count. If you wrote 40 lines where 10 work, trim. Delete debug prints, commented-out dead code, and "notes to self" comments before calling it done.
  5. State you changed. If you toggled a setting, checked out a branch, or pointed a config somewhere temporary, put it back.

The report

If cleanup deleted or closed things, one line in the final report: "cleaned up: removed /tmp scratch, closed 3 tabs, killed the dev server." If nothing needed cleaning, say nothing.

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.