desk-loops
Skill36 starsChanged 3 days agoMITView on GitHub
Start the live desk loops in their own Claude Code window - the 15-minute oil and metals desk-tick crons plus the price trigger watcher. Run once per tick window; re-run after 7 days when the crons expire. Live money on the pathiel wallet.
- Reads credentials
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- desk-tickSkill
- event-calendarSkill
- review-tradesSkill
- desk-tickSkill
- pathiel-agentSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 70
When a tick's line says a position closed (action=CLOSED, STOPPED or TARGET, or any stop or target fill line), run /review-trades once …
- Distinctive: line 77
If a tick for the same desk is still running (started under 20 minutes ago), or one started in the last minute (a cron and a watcher fire …
- Very specific: line 89
Do not restart the pathiel MCP server, touch .env.local, or call a live-money tool outside a desk tick.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
desk-loops
This window runs the desk ticks and nothing else, so the operator's main chat stays clean (operator, 2026-11-02: "move the ticks to their own window"). Start it from the repo root:
claude --model opus --permission-mode auto -n "pathiel desk loops" "/desk-loops"Setup, in order
- Crons.
CronListfirst. Create only the ones missing (never two of the same desk):CronCreatecron3,18,33,48 * * * *, prompt/desk-tick oil, recurring.CronCreatecron10,25,40,55 * * * *, prompt/desk-tick metals, recurring.CronCreatecron7 0 * * *, prompt/review-trades, recurring (the daily trade review: read only, see.claude/skills/review-trades).CronCreatecron17,47 * * * *, prompt/event-calendar scan, recurring (the event scan every 30 minutes, operator 2026-11-13 "every 30 mins"; was every 12 hours: congress.gov, the Federal Register and one research agent, written to the scan overlay; see the "Scan" section of.claude/skills/event-calendar). They are session-only and expire after 7 days; re-run/desk-loopsthen. Then run the deterministic scan once so the brief has today's events before the first tick:python3 scripts/event_scan.py(oneEVENT-SCAN ...line; withoutCONGRESS_API_KEYit says so and still runs the Federal Register part).
- Price watcher.
pgrep -f scripts/trigger_watch.py. If one is already running (another window owns it), do not start a second one. Otherwise run in the background (Bash,run_in_background: true):mkdir -p /tmp/trigger-watch && .venv/bin/python scripts/trigger_watch.py 2>>/tmp/trigger-watch/stderr.log(the venv carriesfinlight-client; system python3 does not, and the Finlight news thread would silently stay off) - Say one line: which crons exist (ids) and whether this window owns the watcher. Then wait.
When the watcher exits
- It printed
{"fire": "<desk>", ...}: run/desk-tick <desk>(the desk-tick skill), then start the watcher again exactly as in step 2. - The fire line says
"reason": "headline"(a surprise headline, an odds jump or a price shock; operator, 2026-11-05: "FIX THEM"): run/desk-tickfor the"fire"desk AND for each desk listed in"also", one agent per desk (the overlap rule below still applies to each), then start the watcher again. The tick runs the rewrite check first; the"headline"field is what it will read about. - The fire line says
"reason": "weekend_flat"(operator, 2026-11-05: "weekend flat"; the oil futures weekend just opened and the oil desk holds a position or a resting entry): run/desk-tick oil; the tick's weekend step closes it. Then start the watcher again. It fires once per weekend; the 15-minute cron covers a tick that fails. - The fire line says
"reason": "signer"(2026-11-09: the API wallet that signs our orders dropped off the account and every order failed for 11 hours): do NOT run a tick, it can only fail. Send the operator one PushNotification and one chat line with the"detail"text (it names the address to approve again on the Hyperliquid API page), then start the watcher again. It repeats at most every 6 hours while the key stays refused. Check by hand any time:python3 scripts/signer_check.py. - It exited without a fire line (error, crash): print the last lines of
/tmp/trigger-watch/stderr.login one line, then start it again. If it crashes 3 times within 10 minutes, stop restarting and say so.
After a close
When a tick's line says a position closed (action=CLOSED, STOPPED or
TARGET, or any stop or target fill line), run /review-trades once after
that tick finishes. One run per close; the daily cron covers the rest. The
review only reads: it never changes a stop, a size or the config.
Overlap rule
If a tick for the same desk is still running (started under 20 minutes
ago), or one started in the last minute (a cron and a watcher fire landing
together), do not launch a second agent. A tick older than 20 minutes is
presumed dead (the desk-tick skill's dead-tick rule): launch a new one. Append
DESK-TICK <desk> <utc> action=SKIP previous tick still running to
/tmp/oil-loop/progress.log instead.
Rules
- The desk-tick skill and the
desk-tickagent carry every trading rule; this skill only decides WHEN a tick runs. - Quiet chat: HOLD, SKIP and repeat-NONE ticks say nothing here either.
- Do not restart the pathiel MCP server, touch
.env.local, or call a live-money tool outside a desk tick.
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.

