agent

Create typed internal agents that translate business intentions into single provider-CLI runs.

4|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/gabriellst/codm --skill agent-gabriellst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent
Source: https://github.com/gabriellst/codm/tree/main/.claude/skills/agent
Command: npx skills add https://github.com/gabriellst/codm --skill agent-gabriellst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a feature needs an LLM or coding-agent turn (classifying an inbound message, working an issue), teams often scatter prompt logic, identity handling, and tool permissions across services and use cases. This Skill enforces a single, consistent pattern: one agent class per business intention, built on a concrete template-method base, so run tokens, identity stamping, and tool scope each live in exactly one place. ## Core Features & Use Cases - Standardized agent structure: One directory per agent (<Name>Agent.ts, prompt.ts, types.ts, index.ts) with input schemas built via z.agentInput() so the run envelope (ownerId/threadId/cwd) is inherited by construction. - Enforced architectural invariants: A registry of 15 patterns (AGT-01 to AGT-15) and 18 documented bad practices covering template-method discipline, static identity schemas parsed before token issuance, declared tool scopes, and transient class-token DI. - Testing guidance: Stub the AgentRunner seam to record requests and yield canned events, asserting the base stamps identity and failures surface as named errors. - Use Case: You need an agent that classifies incoming WhatsApp messages into issues. Scaffold it with bun cli agent <context> ClassifyMessage, implement buildRequest, declare an output schema, and expose one public classify() method delegating to collect(). ## Quick Start Ask the AI to scaffold a new agent in a given context using the agent skill, for example to create a ClassifyMessage agent with an input schema, prompt builder, and stubbed-runner test.

Frequently Asked Questions about agent

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

FAQPage Schema
How do I create a new agent in this codebase?

Run `bun cli agent <context> <Name>` to scaffold the four files (`<Name>Agent.ts`, `prompt.ts`, `types.ts`, `index.ts`) plus a colocated test. Then implement `buildRequest`, define the input schema with `z.agentInput()`, and register the agent in the context registry via `expandBindings`.

How do I define an agent input schema with zod?

Use `z.agentInput({ ...ownFields })` in `types.ts`. The verb extends the base input schema, so `ownerId`, `threadId`, and `cwd` are inherited by construction and must never be restated by hand.

Can an agent override the run() method?

No. `run()` is a concrete template method on the base Agent class and the only place allowed to stamp identity and mint the run token. The single variation point is `protected buildRequest(input)`; overriding `run()` is a documented critical bad practice.

When should an agent expose a public method?

Only when it declares an `outputSchema`. It may then expose exactly one public method named for the business purpose (e.g. `classify`) whose body is just `return this.collect(input)`. Agents without an output schema expose nothing beyond the inherited `run()`.

How are agents tested without a real LLM?

Construct the agent directly with a stubbed `AgentRunner` that records requests and yields canned events. Assert `buildRequest`'s output via the recorded request, that the base stamped `agentName`, and that failures surface as your named error rather than thrown parse errors.

Is there a Go variant of the agent pattern?

No. The agent runtime is TypeScript-owned; the Go side runs the WhatsApp channel gateway and owns no provider-CLI process. Dispatch routes only to the TypeScript playbook and registry.