Agent Skill

Glove ships with an Agent Skill that gives AI coding assistants deep knowledge of the framework — architecture, API reference, real patterns from the examples, and common gotchas.

Once installed, your coding assistant automatically knows how to use Glove correctly — the right import paths, the right class names, the right patterns. No more guessing or hallucinating APIs.

Supported agents

The skill works with any agent that supports the skills format:

  • Claude Code — Anthropic's CLI agent. Automatically uses the skill when working with Glove code. You can also invoke it directly with /glove.

Install with npx

The fastest way to install the skill is with the skills CLI:

bash
npx skills add porkytheblack/glove -a claude-code

This installs the skill into your project's .claude/skills/glove/ directory. The agent picks it up automatically.

Global install

To make the skill available in all your projects (not just the current one), add the -g flag:

bash
npx skills add porkytheblack/glove -a claude-code -g

Manual install

If you prefer not to use the CLI, copy the skill files directly from the Glove repository:

  1. Clone or download the Glove repo
  2. Copy the .claude/skills/glove/ directory into your project's .claude/skills/ folder

Your project structure should look like:

bash
your-project/
├── .claude/
   └── skills/
       └── glove/
           ├── SKILL.md           # Main skill file
           ├── api-reference.md   # Full API reference
           └── examples.md        # Real patterns from examples
├── src/
└── ...

What the skill knows

The skill gives your coding agent knowledge of:

  • All three packages glove-core, glove-react, and glove-next. Correct import paths, class names, method signatures.
  • The display stack — when to use pushAndWait vs pushAndForget, how SlotRenderProps work, how to wire up renderSlot.
  • Model providers — all 7 supported providers, their env variables, default models, and the createAdapter factory.
  • Real example patterns — tool factories with shared state, WebSocket bridges, subscriber adapters, permission gating, terminal UIs with Ink.
  • Common gotchas — like the Displaymanager casing (lowercase 'm'), the stream: true default, browser-safe import paths, and handling both model_response and model_response_complete events.

Using the skill

Once installed, the skill activates automatically when your coding assistant detects you're working with Glove code. You don't need to do anything special — just write code as normal and the agent will reference the skill for accurate guidance.

You can also invoke it directly in Claude Code:

bash
/glove

This explicitly loads the skill context, which is useful when you want to ask the agent Glove-specific questions or have it scaffold a new tool, set up a provider, or debug a display stack issue.

Example prompts

With the skill installed, your agent can handle prompts like:

  • “Add a confirmation dialog tool that asks the user before deleting”
  • “Set up the server route with Anthropic and connect the React client”
  • “Create a tool factory for my inventory management system”
  • “Why isn't my pushAndWait slot resolving?”
  • “Add a subscriber that logs token usage to the console”

Skill structure

The skill is composed of three files:

FilePurpose
SKILL.mdMain skill file. Architecture overview, quick start, display stack patterns, ToolConfig reference, provider table, common gotchas.
api-reference.mdFull API reference for all three packages — every class, interface, method, type, and event.
examples.mdReal patterns drawn from the four example implementations (weather-agent, coding-agent, nextjs-agent, coffee).

How user-invoked skills land in history

The skill above is the install-time Claude Code skill bundle. The runtime defineSkill system inside glove-core — the /skill-name directives users type into chat — has a behavior worth highlighting because it shows up in your stored message history.

When a user types something like "/research-mode tell me about ribosomes", Glove parses the directive token but does not strip it from the message. Instead, the bound /name token is replaced in the persisted user text with a non-triggerable placeholder of the form [invoked_extension__skill_<name>] for skills, and [invoked_extension__hook_<name>] for hooks. The skill or hook handler runs as expected; the persisted user message records exactly which extensions fired.

text
User typed:
  "/research-mode tell me about ribosomes"

Persisted user message text:
  "[invoked_extension__skill_research-mode] tell me about ribosomes"

Skill handler receives:
  ctx.parsedText = "[invoked_extension__skill_research-mode] tell me about ribosomes"
  ctx.source     = "user"
  ctx.args       = undefined

The placeholder is intentionally non-triggerable — re-parsing it does not re-bind to the skill — so historical messages can be replayed safely without firing the extension a second time. UIs that render the transcript should detect the placeholder and either substitute a chip showing “skill: research-mode” or strip it entirely; the agent reads it verbatim and infers context from it.

Synthetic user messages that the skill itself injects (the handler's return value) are persisted with is_skill_injection: true so transcript renderers can style them differently from real user turns. See the Hooks, Skills & Mentions guide for the full defineSkill / defineHook / defineSubAgent surface.

Updating the skill

To update to the latest version of the skill, re-run the install command:

bash
npx skills add porkytheblack/glove -a claude-code

This overwrites the existing skill files with the latest versions from the repository.