agentleFS
jaskirat1616jaskirat1616/grok-skills/skills/relay/SKILL.md

relay

Skill22 starsChanged 3 months agoMITView on GitHub

Use claude-relay to run a long or rate-limit-prone task autonomously across subscription accounts. Invoke this skill whenever the user says "use relay", "run this with relay", "do this overnight", "run this autonomously", "use relay for X", or has a multi-hour / multi-step task they want to hand off completely. Also use proactively when a task looks like it will take many turns and the user hasn't thought about rate limits yet. Guides goal writing, picks the right flags, and starts the run.

  • Reads credentials

25 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 2

    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:

    When in doubt: if the repo has a .env or node_modules the task depends on, use --in-place.

    line 82
  2. Distinctive:

    If anything seems misconfigured:

    line 108
  3. Distinctive:

    Should show ✓ for both account slots.

    line 113

“Common” is measured: kept by at least 6 in 10 of the 20 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

relay

Runs a task unattended using claude-relay: drives claude -p in a headless loop, writes a handoff summary when one account's limit approaches, and switches to the next account automatically. You watch logs; relay handles the rest.

Binary: claude-relay (alias relay if added to shell). Config: ~/.claude-relay/relay.config.json.


Step 1: Decide: relay or inline?

Use relay when:

  • Task will take many turns or hours (big refactor, migration, research + implementation)
  • The user wants to hand it off and walk away
  • Rate limits are a real concern (long-running or token-heavy)

Stay inline when:

  • Task is quick (< ~10 turns)
  • User wants to review each step
  • Task needs interactive input that relay can't provide

Step 2: Write the goal

A relay goal is a self-contained spec a fresh Claude agent can execute cold. Write it to /tmp/relay-goal-<short-name>.md. It must include:

  • What to do: concrete deliverables, not vague intent
  • How to verify: the exact command proving success (npm test, curl /api/health, etc.)
  • Scope: explicit list of what NOT to do (no commits, no PRs, no migrations, unless stated)
  • Key files: paths the agent should read first if the context isn't obvious

Template:

## Goal
<1-3 sentences: the deliverable>

## Success criteria
Run `<command>` and confirm it exits 0 / returns the expected result.

## Scope
- DO: <explicit list>
- DO NOT: open PRs / push commits / run migrations / touch unrelated files

## Key files
- <path>: <why it matters>

Good goals are specific. "Add input validation to all POST routes in app/api/" beats "improve the API".


Step 3: Pick flags

SituationFlag
Task needs uncommitted changes, local .env, or a local database--in-place
Everything is committed; task is self-contained(default, isolated git worktree)

When in doubt: if the repo has a .env or node_modules the task depends on, use --in-place.


Step 4: Run

claude-relay run /tmp/relay-goal-<name>.md <absolute-path-to-repo> [--in-place]

Relay logs stream to stderr. The run ends when the agent outputs RELAY_TASK_COMPLETE on its own line, or hits a hard cap (400 turns / 48h wall clock).


Step 5: Tell the user

After starting, report:

  • The exact command you ran
  • What to watch for: RELAY_TASK_COMPLETE in logs, or claude-relay status --config ~/.claude-relay/relay.config.json
  • The flag you picked and why (especially if you chose --in-place)

Health check

If anything seems misconfigured:

claude-relay doctor --config ~/.claude-relay/relay.config.json

Should show ✓ for both account slots. If a slot shows ✗, tell the user to run:

claude-relay login <email>  # must have claude.ai open in browser as that account first

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.