agentleFS
Toom68Toom68/cleanskill/AGENTS.md

cleanskill

AGENTS.md0 starsChanged 8 days agoMITView on GitHub

Repo of Orca agent skills. Currently holds one skill: clean — lists live Orca sessions with per-session RAM, warns/closes idle ones, trims long chats by archiving context to disk + native /compact. Commit on the worktree's Toom68/* branch; remote is github.com/Toom68/cleanskill (origin). list, peek, warn, close --dry-run, trim --dry-run are all safe. trim --dry-run still writes the archive file (to .clean-archive/, gitignored) — that IS the feature. Real trim, close --hard and park have all been run live. To test…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Commit on the worktree's Toom68/* branch.

    line 27
  2. Very specific:

    No npm/package.json — the repo is plain files.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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
AGENTS.md

AGENTS.md — cleanskill

Repo of Orca agent skills. Currently holds one skill: clean — lists live Orca sessions with per-session RAM, warns/closes idle ones, trims long chats by archiving context to disk + native /compact.

Layout

skills/<name>/SKILL.md        agent-facing doc — frontmatter: name + description (>– folded,
                             description is the discovery trigger, word it for user phrases)
skills/<name>/scripts/        helper CLIs — node 18+, stdlib only, no deps
skills/<name>/references/     deeper docs loaded on demand
install.mjs                   copies skills/* → ~/.agents/skills + ~/.claude/skills

Dev loop

# edit in worktree, then:
node install.mjs                                    # reinstall to skill dirs
node --check skills/clean/scripts/clean.mjs        # syntax check
node skills/clean/scripts/clean.mjs list           # read-only smoke test
node skills/clean/scripts/clean.mjs close <t> --dry-run   # safe action test

Commit on the worktree's Toom68/* branch; remote is github.com/Toom68/cleanskill (origin).

Verification

list, peek, warn, close --dry-run, trim --dry-run are all safe. trim --dry-run still writes the archive file (to .clean-archive/, gitignored) — that IS the feature. Real trim, close --hard and park have all been run live. To test park, use a throwaway — never a real session:

H=$(orca terminal create --worktree active --title park-test --json | python -c "import json,sys;print(json.load(sys.stdin)['result']['terminal']['handle'])")
orca terminal send --terminal $H --text devin --enter   # then one tiny prompt so it saves
node skills/clean/scripts/clean.mjs close $H --no-warn  # park → expect resume pre-typed
orca terminal send --terminal $H --enter                # resumes the conversation
node skills/clean/scripts/clean.mjs close $H --no-warn --hard && devin rm <id> --force

Orca + devin facts that bite (learned the hard way)

  • Handles are runtime-scoped. terminal_handle_stale = Orca restarted; re-list, never reuse. Env ORCA_TERMINAL_HANDLE/ORCA_PANE_KEY/ ORCA_WORKTREE_ID identify your own session — guard them.
  • orca diagnostics memory --json is the per-session memory source (same sweep as the app's Resource Usage popover). It reports only live managed terminals; sessionId = terminal list's ptyId; pid is the PTY-root shell and memory/privateMemory are whole-tree aggregates.
  • terminal read --screen → result.terminal.tail = array of visible lines; non-screen reads page backwards via oldestCursor.
  • Dispatch flags: worker-stop/worker-release take --dispatch, NOT --dispatch-id. Settled workers (succeeded/failed/abandoned) get release; live ones get stop.
  • orca chat only has rename — chat sessions have no PTY handle and no hard CLI close (only worktree rm). They take orca_session_id:<id> mailboxes.
  • orchestration send --to <mailbox> needs --subject + --type question.
  • devin: session = devin.exe TUI + devin.exe acp child (~300MB–2.8GB, grows with context). Transcripts live in %APPDATA%\devin\cli\sessions.db (SQLite WAL, message_nodes.chat_message = JSON role/content/tool_calls; sessions.working_directory matches worktree path; ids like tide-spatula, resumable via devin --resume <id>). Native cmds: /compact, /clear, /handoff, /summarize. devin --cloud offloads the agent backend to Devin Cloud. devin skills paths shows skill dirs.
  • devin exit/resume: /exit prints devin.exe -r <id> and then … devin.exe -r lists recent sessions, so anchor the regex to the whole line. The TUI process's command line (child of the PTY-root pid) holds --resume <id> plus Orca's launch flags (--permission-mode bypass --respect-workspace-trust false). A bare devin --resume without those flags stops at the workspace-trust prompt. Several sessions can share one working dir, and the newest one in sessions.db may well be you, so only fall back to it last.
  • Prompts block input: while an agent shows a trust/permission prompt, terminal send --text … --enter fails with agent_prompt_blocked. To answer it, send --text and --enter as separate calls. Bare-shell PowerShell clears the line with --text $'\x1b'.
  • Agent tagging lags: Orca's agentIdentity can still say shell for a few seconds after devin is started by hand. sniffAgent checks the screen for the devin TUI as a fallback.
  • Machine: Windows, Git Bash, ~16GB RAM often tight — prefer --json, small commands, and don't fork-bomb. For PowerShell commands use a PowerShell shell (Git Bash mangles $_). sqlite3 CLI absent — use python's sqlite3 module. devin list can hang (TUI lock) — don't rely on it.
  • Lone surrogates in transcripts can crash python print — always sys.stdout.reconfigure(encoding='utf-8', errors='replace').

Conventions

  • No npm/package.json — the repo is plain files; keep it that way.
  • Cross-agent portability matters: isolate platform specifics behind the 5-verb contract (references/protocol.md), so other delegation platforms can adopt later.

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.