Agent skill

External CLI Agent Adapters

by lobehub in lobehub/lobehub

Helps debug and extend LobeHub's pipeline for external Claude Code and Codex agents: drivers, adapters, event mapping, sessions, persistence and tool-call chains.

Custom licenceAuto-check passedDevelopment

Install External CLI Agent Adapters

skills CLI
$ npx skills add lobehub/lobehub --skill heterogeneous-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lobehub/lobehub heterogeneous-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lobehub/lobehub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/heterogeneous-agent .claude/skills/heterogeneous-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
heterogeneous-agent
GitHub stars
83k
Token cost
~1.5k tokens
SKILL.md length
689 words
Files
2 (incl. references)
Skills in repo
50
Repo updated
First seen
Licence
Custom licence

At a glance

Helps debug and extend LobeHub's pipeline for external Claude Code and Codex agents: drivers, adapters, event mapping, sessions, persistence and tool-call chains.

  • Works in 6 steps: CLI raw stdout / JSONL → Electron main spawns the CLI and… → Adapter maps raw provider events into… → …
  • Fixing duplicate or missing tool results in Claude Code or Codex sessions
  • SKILL.md covers Use This Skill For, Pipeline Map, Read These Files First and Default Debug Order, plus 3 more sections
  • Calls claude

What it does

This skill applies when a bug or feature sits in the external CLI agent pipeline rather than the normal server-side agent runtime. Typical work includes adding or changing a driver in the desktop main process, editing an adapter in the heterogeneous-agents package, and fixing Claude Code stream-json problems such as duplicate partial and full chunks, broken message boundaries, missing tool results, TodoWrite state drift or subagent thread routing.

It also covers Codex JSONL bugs, including mixed multi-tool messages, broken turn boundaries and missing tool-result mapping, plus step-boundary, tool persistence, subagent thread and resume problems in both flows. A pipeline map traces the path from CLI output through the Electron main process, an adapter that maps raw provider events, the executor that persists messages and forwards stream events, and the handler that hydrates the UI.

The default debug order is to prove the raw CLI output is correct before touching UI code, using the app's recorded trace of the latest real session instead of a hand-built reproduction. Next comes a comparison of raw output with adapter output through the dev trace on window.__HETERO_AGENT_TRACE, and only then an inspection of tool persistence, step transitions and subagent routing. A debug-workflow reference and a list of files to read first come with it.

When your agent uses it

  • Fixing duplicate or missing tool results in Claude Code or Codex sessions
  • Adding a new driver or adapter for an external CLI agent
  • Debugging tool messages that mix together, become orphans or never finish loading

Example prompts

  • “Claude Code sessions show duplicate partial chunks in the chat. Find where the adapter goes wrong.”
  • “Debug a Codex turn where two tool calls end up in one message.”
  • “Add a driver for the new external CLI agent, following the existing Claude Code driver.”

Requirements

  • A checkout of the LobeHub repository

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. CLI raw stdout / JSONL
  2. Electron main spawns the CLI and broadcasts heteroAgentRawLine
  3. Adapter maps raw provider events into HeterogeneousAgentEvent
  4. executeHeterogeneousAgent persists assistant/tool messages and forwards stream events
  5. createGatewayEventHandler hydrates the UI
  6. Only after this path looks correct should you move on to agent-tracing or context-engine debugging

What it can do on your machine

Read from SKILL.md and the folder at commit 35d442e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

External CLI Agent Adapters loads about 1.5k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 34 tokens; SKILL.md has 689 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 689 words (~1,469 tokens).

“Use this skill when the bug or feature lives in the external CLI agent pipeline, not the normal server-side agent runtime.”

— opening of SKILL.md by lobehub, Custom licence
name
heterogeneous-agent

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (references) in .agents/skills/heterogeneous-agent of lobehub/lobehub.

  • SKILL.md
  • references/debug-workflow.md

Open the folder on GitHubat commit 35d442e

Compare with similar skills

External CLI Agent Adapters next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

External CLI Agent Adapters compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
External CLI Agent Adapters this skilllobehub/lobehub83k—~1.5kAutomated safety check: PassCustom licence
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Trellis Channelmindfold-ai/Trellis15k4 repos~1.2kAutomated safety check: PassAGPL-3.0
Vibe Coding PartnershareAI-lab/Kode-CLI5.2k—~5.6kAutomated safety check: PassApache-2.0
Leon Coding Agentleon-ai/leon18k—~1.1kAutomated safety check: PassMIT
Octocode Code Researchbgauryy/octocode949—~1.5kAutomated safety check: PassMIT

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Trellis Channel

    mindfold-ai/Trellis

    Use Trellis channel for live multi-agent collaboration, spawned workers, cross-agent review, progress inspection, forum channels, and channel log debugging.

    15k GitHub starsUsed in 4 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Vibe Coding Partner

    shareAI-lab/Kode-CLI

    Gives an agent a set of working rules for any development task: understand first, surface decisions, verify results, and load deeper reference files per scenario.

    5.2k GitHub stars~5.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Leon Coding Agent

    leon-ai/leon

    Has Leon's agent investigate, change and verify code in a repository with its file, search and shell tools, staying inside the scope the owner authorized.

    18k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Octocode Code Research

    bgauryy/octocode

    Researches code with evidence: traces callers, imports and cross-repo links, diagnoses failures and reports findings with exact file and line references and a confidence label.

    949 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Misakanet Failure Memory

    Ikalus1988/MisakaNet

    Search and record failure-recovery lessons from real engineering sessions; submit and verify debugging lessons across the MisakaNet network.

    526 GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from lobehub/lobehub

All 50 skills in this repo
  • Builds single-file interactive HTML prototypes rendered with the real LobeHub UI components and written as production-style React, so they can later be split into files.

    83k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Verifies a delivery end to end by driving the real product on a CLI, web, desktop or iOS Simulator surface, capturing evidence and publishing a round with the lh CLI.

    83k GitHub stars~9.7k tokensUpdated today
    Auto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Guides building LobeHub builtin agent tools, from the manifest and execution runtime to executors, chat UI renders and registry wiring.

    83k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.

    83k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about External CLI Agent Adapters

What does External CLI Agent Adapters do?

Helps debug and extend LobeHub's pipeline for external Claude Code and Codex agents: drivers, adapters, event mapping, sessions, persistence and tool-call chains. This skill applies when a bug or feature sits in the external CLI agent pipeline rather than the normal server-side agent runtime. Typical work includes adding or changing a driver in the desktop main process, editing an adapter in the heterogeneous-agents package, and fixing Claude Code stream-json problems such as duplicate partial and full chunks, broken message boundaries, missing tool results, TodoWrite state drift or subagent thread routing.

When should I use External CLI Agent Adapters?

External CLI Agent Adapters fits situations like: fixing duplicate or missing tool results in Claude Code or Codex sessions; adding a new driver or adapter for an external CLI agent; debugging tool messages that mix together, become orphans or never finish loading.

How do I install External CLI Agent Adapters in Claude Code?

Run `npx skills add lobehub/lobehub --skill heterogeneous-agent -a claude-code`. Or copy the skill folder (.agents/skills/heterogeneous-agent in lobehub/lobehub) into .claude/skills/heterogeneous-agent in your project. Claude Code loads it when a task matches its description.

How do I install External CLI Agent Adapters in Codex?

Run `npx skills add lobehub/lobehub --skill heterogeneous-agent -a codex`. Or copy the skill folder (.agents/skills/heterogeneous-agent in lobehub/lobehub) into .agents/skills/heterogeneous-agent in your project. Codex loads it when a task matches its description.

Can I use External CLI Agent Adapters in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lobehub/lobehub --skill heterogeneous-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/heterogeneous-agent, .gemini/skills/heterogeneous-agent, .github/skills/heterogeneous-agent and .opencode/skills/heterogeneous-agent in your project.

What does External CLI Agent Adapters need to run?

Going by SKILL.md and its folder, External CLI Agent Adapters needs the command-line tools its instructions call (claude). Our summary lists: A checkout of the LobeHub repository.

Does External CLI Agent Adapters access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is External CLI Agent Adapters safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does External CLI Agent Adapters use?

External CLI Agent Adapters has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does External CLI Agent Adapters use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to External CLI Agent Adapters?

Skills that share tags, products or a category with External CLI Agent Adapters: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Trellis Channel (mindfold-ai/Trellis, 15k stars), Vibe Coding Partner (shareAI-lab/Kode-CLI, 5.2k stars) and Leon Coding Agent (leon-ai/leon, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains External CLI Agent Adapters?

lobehub (a GitHub organization) maintains it in lobehub/lobehub, which has 83,074 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 9, 2026.

Source: lobehub/lobehub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.