create-agent-adapter

Create Todero agent adapter packages spanning server, UI, and CLI registries.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/nabitllc/todero --skill create-agent-adapter-nabitllc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-agent-adapter
Source: https://github.com/nabitllc/todero/tree/main/.agents/skills/create-agent-adapter
Command: npx skills add https://github.com/nabitllc/todero --skill create-agent-adapter-nabitllc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding support for a new AI agent runtime in Todero requires coordinated changes across three separate registries (server, UI, CLI), each with its own module interface, and mistakes in any one surface break execution, transcript rendering, or terminal output. ## Core Features & Use Cases - Full adapter scaffolding: Defines the package layout, four-export package.json convention, and required files for server execution, UI transcript parsing, and CLI event formatting. - Session management patterns: Specifies codec-based session serialization, cwd-aware resume, and unknown-session retry with clearSession recovery. - Environment diagnostics contract: Standardizes the testEnvironment implementation with info/warn/error severity levels powering the UI test button. - Security guidance: Covers treating agent output as untrusted, env-based secret injection, and skills injection without polluting the agent's working directory. - Use Case: When adding support for a new CLI agent like a custom LLM tool, follow this Skill to create packages/adapters/<name>, implement execute/parse/test modules, and register the adapter in all three registries. ## Quick Start Use the create-agent-adapter skill to scaffold a new Todero adapter package for my custom CLI agent and register it in the server, UI, and CLI registries.

Frequently Asked Questions about create-agent-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new AI agent adapter to Todero?

Create a package under packages/adapters/<name> with four exports (root, server, ui, cli), implement the execute function and session codec for the server, a stdout parser and config builder for the UI, and a terminal formatter for the CLI. Then register the module in all three adapter registries.

What interfaces must a Todero server adapter implement?

A server adapter must implement execute(ctx) returning AdapterExecutionResult and testEnvironment(ctx) returning structured checks with info, warn, or error severity. Optional fields include sessionCodec, models, supportsLocalAgentJwt, and agentConfigurationDoc.

How does session persistence work across Todero agent runs?

Session state is stored as opaque sessionParams in the database and managed through the adapter's sessionCodec with serialize, deserialize, and getDisplayId methods. Adapters should resume sessions when the cwd matches and retry with a fresh session plus clearSession when an unknown-session error occurs.

How do Todero adapters inject skills without modifying the agent's working directory?

The recommended pattern creates a temporary directory, symlinks the repo's skills into the runtime's expected structure, and passes it via a flag like --add-dir, cleaning up afterward. Alternatives include symlinking into the agent tool's global config directory or using an environment variable.

Why should adapter output parsing treat agent stdout as untrusted?

Agent stdout comes from an LLM-driven process that may have read injected content or fetched external data, so it can contain malicious or malformed values. Adapters must use safe extraction helpers like asString and parseJson, never execute output, and validate session IDs before use.