agentleFS
BI-BlitzerBI-Blitzer/tandem-tokens/skills/hybrid/SKILL.md

hybrid

Skill1 starsChanged 4 months agoMITView on GitHub

Unified hybrid orchestrator skill for Claude, Grok, and Codex. Offload bulk map-phase work to local ollamaq/Ollama; keep premium tokens for orchestration, reduce/clean, and high-reasoning only. Use when bulk/mechanical/gen_test work appears, or when starting a tandem-tokens session.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never echo bulk worker output into the conversation.

    line 15
  2. Very specific:

    Ensure daemon: ollamaq daemon (one per machine).

    line 49

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

Hybrid orchestrator (Claude / Grok / Codex)

You are the premium orchestrator. Local ollamaq (tandem-tokens) runs map work on Ollama. Energy and cloud $ are scarce — maximize local/offline.

Core contract

  1. Worker output stays on disk under results/<job_id>/.
  2. You read only digest.md (via ollamaq digest / MCP queue_digest / hybrid_digest) — hard-capped ~8 KB.
  3. Pull merged.jsonl only for a deliberate reduce on residue; prefer a slice.
  4. Never echo bulk worker output into the conversation.

When to offload

Offload when ≥ ~20 similar independent items AND one of:

ModeUse for
mapclean / normalize / extract / classify / summarize / boilerplate codegen
gen_testgenerate candidates + scriptable verifier
pipelinecheap triage → stronger model on flagged subset

When NOT to offload

  • Single hard reasoning problem
  • Needs repo-wide context the local model lacks
  • Wrong answers silently corrupt data with no verifier
  • Fewer than ~20 items (overhead > savings)

Routing (config/models.yaml)

model: "auto" + task_tag:

  • clean / extract / code → workhorse (qwen2.5-14b class)
  • summarize → long-context local
  • classify → fast small local
  • generate → gen_test model

Optional residual escalate: job retry.escalate_to or config fallbacks.escalate_to — local bigger model, or cloud:grok / cloud:grok/grok-3-mini (needs cloud.grok.enabled + XAI_API_KEY).

Workflow

  1. Offload — write a validated job spec → ollamaq submit / MCP queue_submit / hybrid_offload.
  2. Ensure daemon: ollamaq daemon (one per machine). Don’t poll tightly.
  3. Harvest — when done, read digest only; reduce residue; write final artifact.
  4. Score — ollamaq score / hybrid_score for tokens, cloud $ avoided, GPU Wh.

MCP tools

StandardGrok aliasPurpose
ollama_quickhybrid_quicktiny one-shot (capped)
queue_submithybrid_offloadenqueue batch
queue_statushybrid_statusqueue state
queue_digesthybrid_digestfinished digest
recommend_modelshybrid_recommendVRAM fit
hybrid_scoresamescoreboard + energy
hybrid_energysamelive nvidia-smi power
hybrid_policysamethis policy text
  • Claude Code: .mcp.json → python -m ollamaq.mcp_server (+ CLAUDE.md / .claude/skills/)
  • Codex: clients/codex.config.toml → ~/.codex/config.toml; policy in AGENTS.md
  • Grok: python -m ollamaq.mcp_grok (hybrid_* aliases) — clients/grok.mcp.json
  • Cursor / VS Code / Continue / Cline / Windsurf: clients/cursor.mcp.json or clients/generic.mcp.json
  • No MCP: shell only — ollamaq submit|run|status|digest|score (works from any agent that can run commands)

Client matrix: clients/README.md.

Example map spec

{
  "name": "clean-contacts",
  "mode": "map",
  "model": "auto",
  "task_tag": "clean",
  "input": {
    "kind": "csv",
    "path": "data/contacts.csv",
    "chunk": { "strategy": "rows", "size": 50 }
  },
  "prompt": {
    "system": "You are a data cleaning engine. Output ONLY JSON.",
    "template": "Normalize these rows... return {\"rows\": [...]}. Input:\\n{{chunk}}",
    "schema": { "type": "object", "required": ["rows"] }
  },
  "params": { "temperature": 0.1 },
  "retry": {
    "max_attempts": 3,
    "on_schema_fail": "repair_then_retry",
    "escalate_to": "auto"
  }
}

Kickoff checklist

  1. ollamaq doctor — config + Ollama OK
  2. ollamaq recommend — models fit GPU
  3. hybrid_policy or re-read this skill
  4. Offload eligible bulk work; harvest digests; report savings

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.