drain skill
Work through the local queue that cloud scheduled runs left for this machine — LinkedIn comments to post, LinkedIn feed scans, analytics pulls, posts approved for publishing — using this computer's logged-in browser, then mark each item done or expired and report. Use when a session starts with queued items, when the user says "catch up", "run the queue", "post what's pending", or when the launchd/cron drain job fires. Runs only on a machine with a browser.
- GitHub stars
- 6
- Files
- 1
- Last commit
- Nov 10, 2026
- License
- MIT
- Allowed tools
- —
What does the drain skill do?
drain is an agent skill. Work through the local queue that cloud scheduled runs left for this machine — LinkedIn comments to post, LinkedIn feed scans, analytics pulls, posts approved for publishing — using this computer's logged-in browser, then mark each item done or expired and report. Use when a session starts with queued items, when the user says "catch up", "run the queue", "post what's pending", or when the launchd/cron drain job fires. Runs only on a machine with a browser.
How to install the drain skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the drain skill in Plugin
/plugin marketplace add Harmix/open-stanley /plugin install open-stanley@open-stanley
Install the drain skill in Claude Code
~/.claude/skills/drain/SKILL.md
$ npx degit Harmix/open-stanley/open-stanley/skills/drain ~/.claude/skills/drainInstall the drain skill in Claude Code (project)
.claude/skills/drain/SKILL.md
$ npx degit Harmix/open-stanley/open-stanley/skills/drain .claude/skills/drainInstall the drain skill in Codex
~/.agents/skills/drain/SKILL.md
$ npx degit Harmix/open-stanley/open-stanley/skills/drain ~/.agents/skills/drainInstall the drain skill in Gemini CLI
~/.gemini/skills/drain/SKILL.md
$ npx degit Harmix/open-stanley/open-stanley/skills/drain ~/.gemini/skills/drainInstall the drain skill in Claude.ai
npx degit Harmix/open-stanley/open-stanley/skills/drain drain && zip -r drain.zip drain # claude.ai → Customize → Skills → + → Create skill → Upload a skill → drain.zip
SKILL.md
View on GitHubDrain the local queue
Cloud mode only. In laptop mode (the default) every job runs with the browser and nothing is queued, so this skill has nothing to do; queue-check prints nothing and that is the normal outcome. In cloud mode, scheduled runs can reach your MCPs but not your browser, so anything that needs LinkedIn's UI or an X reply box is parked in ledger/local-queue.jsonl with an expiry. This skill is the worker. It runs whenever the laptop is online: from the queue-check --brief line the stanley skill runs at the start of every session (it tells you at the top that items are waiting), from the launchd job in templates/launchd/ inside your window, or when you ask.
1. Read the queue
skills/stanley/scripts/stanley-vault queue-check prints pending, unexpired items as JSON lines and marks expired ones. If the vault is on Google Drive, sync first so you see what the cloud wrote. Group by job type and do the oldest first.
2. Job types and what to do
job |
payload | action |
|---|---|---|
comment |
platform, url, text, author | Open the post, confirm it still exists and the author is not the user, post text exactly, reload and verify (../stanley/references/verify-live.md), comment-add --verified, surfaced-add |
publish |
platform, draft path or text, assets, schedule time | Follow /open-stanley:publish; if the scheduled time has passed by more than 2h, ask before posting |
scan |
platform, lanes, since | Follow /open-stanley:scout steps 1–5 for that platform only; results go to the user through notify and to surfaced.jsonl |
analytics |
post urls | Pull metrics via the browser, metrics-add for each |
study |
creator handle | Follow /open-stanley:study |
Items whose payload references a URL that no longer exists, or whose target is older than the expiry, are marked --failed with the reason. Never post a comment on a stale thread just because it was queued.
3. Close each item
skills/stanley/scripts/stanley-vault queue-done <id> --result "<one line>" or --failed. Then sync.
4. Report
One message: what was done (with URLs), what failed and why, what's still pending and when it expires. Keep it under eight lines. This message is what the next cloud recap reads, so it must be in the vault (runs.jsonl via run-start/run-end) as well as in chat.
Files in this skill
1drain skill questions
How do I install the drain skill in Claude Code?
Run npx degit Harmix/open-stanley/open-stanley/skills/drain ~/.claude/skills/drain. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the drain skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.