agentleFS
AkurganowAkurganow/model-router/.agents/skills/live-run/SKILL.md

live-run

Skill1 starsChanged 8 days agoMITView on GitHub

Use when the maintainer asked for a live run of a harness with a model-router plugin, or when you are about to tell the maintainer that a fact about a harness needs one. Not for an ordinary fix, a failing test or a build.

The file

Show its rules and text

We split this skill into the rules it gives an agent

43 rules. About 0 are common, 21 are distinctive, and 22 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈21

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 22

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the steps in order.

    line 9
  2. Distinctive:

    Search the tests for the fact with git grep.

    line 14
  3. Distinctive:

    Read only the sections whose headings match.

    line 16
  4. Very specific:

    Search the client's page in that clone as "Before a run" in its Home.md says.

    line 18
  5. Distinctive:

    Stop when a test, a section or an entry records the fact on the client version in use, and say where.

    line 19
  6. Distinctive:

    When the maintainer asked for the run and the fact is recorded, ask whether to run it anyway.

    line 20
  7. Distinctive:

    Run a harness that has no turn cap under a time limit.

    line 28
  8. Very specific:

    Add -f omp=minimum to test the minimum omp pin.

    line 32
  9. Distinctive:

    No live run starts without the maintainer's word, paid or free, the evals workflow included.

    line 37
  10. Distinctive:

    Ask the maintainer, and state the harness and its version, the model, the cap and the question the run answers.

    line 43
  11. Distinctive:

    Never restore a settings file whole.

    line 49
  12. Distinctive:

    Use the installed harness, and note its version for the entry.

    line 51
  13. Distinctive:

    Ask the maintainer when the harness is absent or the question needs another version.

    line 52
  14. Distinctive:

    Stop at a login prompt, and hand the run to the maintainer.

    line 54
  15. Distinctive:

    When isolation cannot serve the run, stop and ask the maintainer.

    line 55
  16. Distinctive:

    Never print or log a key, and never put one into a brief, a commit or a wiki entry.

    line 59
  17. Distinctive:

    Write a key only where the harness reads it, inside the isolated copy.

    line 63
  18. Distinctive:

    Delete the copy after the run.

    line 64
  19. Very specific:

    Start claude from an empty folder, so that no project settings load, and give --plugin-dir an absolute path.

    line 79
  20. Distinctive:

    Ask the maintainer's word for this form, and say that the run reads the real folder and writes its session history there.

    line 80
  21. Very specific:

    Run: claude -p "<prompt>" --model haiku --max-turns <n> --output-format stream-json --verbose --debug-file <log>, as the Subagent events …

    line 82
  22. Very specific:

    After such an error read the debug log anyway, because the turn has loaded the hooks module and run session.start, as Hooks module says.

    line 84
  23. Distinctive:

    When the check needs more than that load and that hook, run it again isolated for a model turn.

    line 85
  24. Very specific:

    Read the line: the debug log at <log> holds the routing line, as the Subagent events run and

    line 86
  25. Very specific:

    Add PI_NATIVES_DIR=<absolute path in scratch> when the real configuration folder must stay untouched, because a start can touch its …

    line 92
  26. Very specific:

    Run: omp -p --model <provider/model-id> "<prompt>", as the omp tool_call cost and timeout run ran it, with the planned model, because [omp …

    line 93
  27. Distinctive:

    Read the line: with no UI, omp prints it to standard error, as The batch line says.

    line 94
  28. Very specific:

    Start that run's Gateway with --bind loopback --auth token and the token in OPENCLAW_GATEWAY_TOKEN, as OpenClaw project skills and the …

    line 102
  29. Very specific:

    Run: start the Gateway with openclaw gateway run, with gateway.tools.allow naming sessions_spawn, then send POST /tools/invoke with tool …

    line 103
  30. Very specific:

    Read the line: openclaw logs --follow --plain, as The log line says.

    line 104
  31. Very specific:

    After the run: send SIGINT or SIGTERM to the Gateway process this run started, and wait for it to exit before you delete the copy, as …

    line 105
  32. Distinctive:

    Stop no Gateway the run did not start.

    line 106
  33. Very specific:

    Run no hermes --version or hermes --help command as the first one under the fresh home: each skips the build of the home's dependency …

    line 114
  34. Very specific:

    Run no hermes pm command there either: it skips that build too, and it manages the install, which a live run leaves alone.

    line 115
  35. Very specific:

    Remove HERMES_DISABLE_LAZY_INSTALLS from the environment of the commands, because with it a command skips the build and exits with the same …

    line 117
  36. Very specific:

    Run: hermes -z "<prompt>" -m <model> --provider <provider> -t delegation --ignore-rules --usage-file <file>, as the Hermes task parameters …

    line 118
  37. Very specific:

    Read the line: agent.log in the logs folder of the home, unless the plugin host drops INFO lines, as Hermes runtime, logs and environment …

    line 119
  38. Very specific:

    After the run: hermes gateway stop with the same HERMES_HOME, because a hermes -z turn starts a gateway, as Hermes runtime, logs and …

    line 121
  39. Very specific:

    Write the entry in the wiki clone from the template under "Adding an entry" in its Home.md.

    line 137
  40. Distinctive:

    Put the entry at the top of the client's page.

    line 139
  41. Very specific:

    Check the entry against "What an entry never holds" in Home.md.

    line 140
  42. Very specific:

    Add a harness fact the run shows to docs/clients.md as one plain sentence, by the rules of Adding evidence.

    line 141
  43. Very specific:

    Put its evidence on the client's evidence page in the wiki clone, as "Adding evidence" in its Home.md says.

    line 142

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Live run

A live run starts a real harness with a model-router plugin and reads what it does. Follow the steps in order. The bans of Live runs in AGENTS.md hold at every step.

Look for the fact first

  1. Search the tests for the fact with git grep.
  2. List the headings of docs/clients.md with grep -n '^#' docs/clients.md.
  3. Read only the sections whose headings match.
  4. Clone the wiki outside the repository: wiki="$(mktemp -d)/wiki" && git clone https://github.com/Akurganow/model-router.wiki.git "$wiki".
  5. Search the client's page in that clone as "Before a run" in its Home.md says.
  6. Stop when a test, a section or an entry records the fact on the client version in use, and say where.
  7. When the maintainer asked for the run and the fact is recorded, ask whether to run it anyway.

Plan the cost

  1. Plan one case.
  2. Pick the model: haiku in Claude Code, the omp case's model in evals/cases.json.
  3. For OpenClaw and Hermes, pick the models of that client's latest recorded run, unless the maintainer names others.
  4. Cap the turns, for example with --max-turns in Claude Code.
  5. Run a harness that has no turn cap under a time limit.
  6. For Hermes under a fresh home, plan 20 minutes for the first command, because it builds the home's dependency environment, as Hermes project skills and home says.
  7. For Claude Code and omp, when the question is whether the first spawn routes after a change to src/, a plugin folder or a pinned client version, plan the evals workflow instead of a local run.
  8. Plan it for the clients the change touches: gh workflow run evals.yml --ref <branch> -f clients=omp.
  9. Add -f omp=minimum to test the minimum omp pin.
  10. For any other question, plan a local run.

Ask first

No live run starts without the maintainer's word, paid or free, the evals workflow included. A request that already names the harness and its version, the model, the cap and the question is that word. The word covers the run and its entry on the wiki. For a Claude Code model turn, the word also names the real configuration folder, as the Claude Code recipe below says. Paid runs says what needs no clearance.

  1. Ask the maintainer, and state the harness and its version, the model, the cap and the question the run answers.
  2. For Hermes under a fresh home, state that dependency build and its time limit too.

Isolate the harness

Install or update no harness. Never restore a settings file whole; when a run changed one by mistake, revert only the entries it set, after checking each.

  1. Use the installed harness, and note its version for the entry.
  2. Ask the maintainer when the harness is absent or the question needs another version.
  3. Point the harness at a copy of its configuration folder or a fresh home, as its recipe below says.
  4. Stop at a login prompt, and hand the run to the maintainer.
  5. When isolation cannot serve the run, stop and ask the maintainer.

Keep keys secret

Never print or log a key, and never put one into a brief, a commit or a wiki entry.

  1. Take each key from the environment by the variable name its plugin README gives: Claude Code, omp, OpenClaw, Hermes.
  2. Take the harness's own provider key from the environment the same way.
  3. Write a key only where the harness reads it, inside the isolated copy.
  4. Delete the copy after the run.

Run the harness

  1. Fill the four slots of the harness in order: load, isolate, run, read the line.

Claude Code

  • Load: --plugin-dir plugins/model-router, as the Subagent events run loaded it.
  • Isolate a check with no model turn: CLAUDE_CONFIG_DIR=<copy>, as Claude Code project skills and configuration says. A model turn under a copy ends in a sign-in error, as the same section says.
  • Isolate a check with a model turn: keep the real configuration folder, and add --setting-sources project --strict-mcp-config. With these flags the run reads no user settings and no MCP server of the user, and it is signed in, as the same section says. The plugin's stored options stay out with the user settings, so each option takes its default, as Manifest says. A check of an option other than its default is outside this form: ask the maintainer. Start claude from an empty folder, so that no project settings load, and give --plugin-dir an absolute path. Ask the maintainer's word for this form, and say that the run reads the real folder and writes its session history there. Change no file in that folder.
  • Run: claude -p "<prompt>" --model haiku --max-turns <n> --output-format stream-json --verbose --debug-file <log>, as the Subagent events run ran it without the cap and the log. A sign-in error that ends a turn is not the login prompt of the step "Stop at a login prompt": the turn has ended, and nothing waits for input. After such an error read the debug log anyway, because the turn has loaded the hooks module and run session.start, as Hooks module says. When the check needs more than that load and that hook, run it again isolated for a model turn.
  • Read the line: the debug log at <log> holds the routing line, as the Subagent events run and --debug-file show.

omp

  • Load: omp plugin marketplace add <checkout>, then omp plugin install model-router@model-router, as the omp install and update run did.
  • Isolate: PI_CONFIG_DIR=<folder relative to home> and PI_CODING_AGENT_DIR=<copy>/agent, as omp project skills and folders says. Add PI_NATIVES_DIR=<absolute path in scratch> when the real configuration folder must stay untouched, because a start can touch its natives/<version> entry, as the same section says.
  • Run: omp -p --model <provider/model-id> "<prompt>", as the omp tool_call cost and timeout run ran it, with the planned model, because omp project skills and folders puts an explicit model before the saved default.
  • Read the line: with no UI, omp prints it to standard error, as The batch line says.

OpenClaw

  • Load: link the plugin as Try the OpenClaw plugin from a checkout says, then set it up as Set up says.
  • Isolate: OPENCLAW_HOME, OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH on the copy, as OpenClaw project skills and the Gateway says. Set logging.file to a path inside the home before the other commands, because the default file log lies outside it, as OpenClaw runtime, logs and environment says. For a run with no channel and no model, set OPENCLAW_DISABLE_BONJOUR=1, OPENCLAW_NO_RESPAWN=1, OPENCLAW_SKIP_CHANNELS=1, OPENCLAW_SKIP_CRON=1 and OPENCLAW_NO_AUTO_UPDATE=1; OpenClaw runtime, logs and environment says what each switches off. Start that run's Gateway with --bind loopback --auth token and the token in OPENCLAW_GATEWAY_TOKEN, as OpenClaw project skills and the Gateway says.
  • Run: start the Gateway with openclaw gateway run, with gateway.tools.allow naming sessions_spawn, then send POST /tools/invoke with tool sessions_spawn and its args, as OpenClaw project skills and the Gateway says and the OpenClaw hook and spawn runs ran it.
  • Read the line: openclaw logs --follow --plain, as The log line says.
  • After the run: send SIGINT or SIGTERM to the Gateway process this run started, and wait for it to exit before you delete the copy, as OpenClaw project skills and the Gateway says. Stop no Gateway the run did not start.

Hermes

  • Load: commit the change, then run hermes plugins install "file://<checkout>#plugins/model-router-hermes" --enable, because the install takes the committed HEAD, as Hermes project skills and home says.
  • Then set hermes config set delegation.backend model-router, as Install says, and the slot models, as Set up says.
  • Isolate: HERMES_HOME=<fresh home> for every command after the version check, as Hermes project skills and home says. Take the version from hermes --version with no HERMES_HOME. Run no hermes --version or hermes --help command as the first one under the fresh home: each skips the build of the home's dependency environment and exits with no dependency environment is committed for this install, as the same section says. Run no hermes pm command there either: it skips that build too, and it manages the install, which a live run leaves alone. Give the first command under the fresh home the 20 minutes the plan holds. Remove HERMES_DISABLE_LAZY_INSTALLS from the environment of the commands, because with it a command skips the build and exits with the same message.
  • Run: hermes -z "<prompt>" -m <model> --provider <provider> -t delegation --ignore-rules --usage-file <file>, as the Hermes task parameters run ran it.
  • Read the line: agent.log in the logs folder of the home, unless the plugin host drops INFO lines, as Hermes runtime, logs and environment says. The task's route.label carries it too, as Hermes routing and refusals shows; where a hermes -z run shows it is not documented.
  • After the run: hermes gateway stop with the same HERMES_HOME, because a hermes -z turn starts a gateway, as Hermes runtime, logs and environment says.

Drive a check by a script

A script may run the harness's commands and read what they print, with or without a model turn. These steps add to the recipe of the script's harness.

  1. Name the script's option for a file of keys anything but --env-file: Node reads that option even after the script's name, and exits when the file is missing.
  2. Make the script's pass or fail line name each known harmless diagnostic it passes over, so that an expected warning prints no FAIL.
  3. In OpenClaw, when the script puts the plugin into plugins.load.paths with no install, pass over the trust warning and fail on any other diagnostic, as OpenClaw entry and registration says.
  4. In OpenClaw, run a control that writes an undeclared key into the config file only after the Gateway has stopped, because such a file stops the Gateway from starting, as OpenClaw package files says.
  5. In Hermes, run a Python step that imports Hermes on the interpreter that the home's facts.json names, as Hermes project skills and home says.
  6. In Hermes, give a check that needs register a turn or a load of its own, because the install does not call register, as Hermes install and update says.

Record the run

  1. Write the entry in the wiki clone from the template under "Adding an entry" in its Home.md.
  2. Give a run of the evals workflow the kind evals, and link no run.
  3. Put the entry at the top of the client's page.
  4. Check the entry against "What an entry never holds" in Home.md.
  5. Add a harness fact the run shows to docs/clients.md as one plain sentence, by the rules of Adding evidence.
  6. Put its evidence on the client's evidence page in the wiki clone, as "Adding evidence" in its Home.md says.
  7. Set the clone's author to the one its history holds, because the wiki is public and the commit must not carry the machine's identity:

    git -C "$wiki" config user.name "$(git -C "$wiki" log -1 --format=%an)"
    git -C "$wiki" config user.email "$(git -C "$wiki" log -1 --format=%ae)"
  8. Make one commit with the entry and the evidence, and push once.
  9. Without push rights, put the text of the entry and the evidence into your report.

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.