skills

command
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

skills proves runtime skill injection end-to-end with a real local CLI: the agent is given a write-proof skill and only follows it if the skill actually reached the provider's skill directory.

The skill package provides one-line constructors that produce values WithSkills accepts directly:

skill.Dir("./skills/write-proof")  // a local directory
skill.Inline("greet", "# ...")     // literal SKILL.md content
skill.Key("code-review")           // resolved by the host SkillProvider
skill.Require(s, "reason")         // mandatory: missing => run fails

WithSkills is the one append-merged option: skills passed to Run extend the agent defaults rather than replacing them.

It doubles as a callback-form approval demo: the skill wants to write a file, so Permission is routed to Ask and adaptor.OnApproval installs the host gate. Batch Run has no stream, so the callback is the only approval form available here — and the request answers itself, which is why there is no request-ID bookkeeping and no ResolveDecision round-trip anywhere below.

Usage:

go run ./examples/skills -agent=codex

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL