feat(skills): add Skill package schema and agent-side skill loading support #88
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#22 Epic: Package Registry Client — Support Package Registry Standard v1.0.0
cleveragents/cleveractors-core
#94 feat(skills): add skill package schema and agent-side skill loading support
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
feat(skills): add skill package schema and agent-side skill loading supportfeature/skill-package-supportBackground and context
The Package Registry Standard (§3.2) already defines
skillas a first-class package type (prefixpkg_skl_, description "Skill packagesdefining capabilities for AI agents"), and it appears throughout the registry client docs
(
docs/registry/*.md) as an example package type resolved through the same generic API asactor,graph,agent, andtemplatepackages.However, two things are missing:
actorpackages (which conform to theActor Configuration Standard,
docs/index.md), askillpackage has no defined internalstructure beyond the generic package requirements (name, description). There is no
specification for what fields a skill must declare or how they should be interpreted.
docs/index.md§4.4, LLM Agents) has no
skillsconfiguration field or any other mechanism for an Actorto reference and load a Skill package into an agent. The generic
cleveractors.registryclient (PackageContentResolver,RegistryCache,ReferenceResolver) can already fetch askill-typed package by reference, but nothing incleveractors.agentscalls it — resolved skill content has nowhere to attach.This Epic (#22) delivered the generic, package-type-agnostic registry client. This issue
covers extending that work so
skillpackages become a fully supported, structurallydefined, and actually consumable capability — not just an enum value used in examples.
External reference specification — agentskills.io
Before designing our own schema, the ADR must consult the open Agent Skills
format at https://agentskills.io/home and its normative specification at
https://agentskills.io/specification. This format was originally developed by
Anthropic, released as an open standard, and is now supported by a large number of
agentic clients (Claude Code, Claude, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot,
VS Code, Goose, OpenHands, and dozens of others — see the client showcase at
agentskills.io). Aligning with it (rather than inventing an incompatible schema) means
cleveractors could consume/produce skills that interoperate with this existing ecosystem.
Key points from the specification that the ADR must account for:
SKILL.mdfile; it may also contain
scripts/(executable code),references/(additionaldocs),
assets/(templates/data), and arbitrary other files: This is a structural mismatch with our Package Registry Standard, where every packageis a single canonicalized YAML document, content-addressed as one SHA-1 blob
(§6 of
docs/actor-registry-standard.md). The ADR must resolve this — e.g. bydefining a directory→single-document packing convention (inline file contents as a
mapping field, tar+base64 encode the tree, extend canonicalization to hash a file
tree, etc.) — before a
pkg_skl_package can faithfully round-trip anagentskills.io-conformant skill.
SKILL.mdfrontmatter fields (YAML frontmatter + Markdown body):namedescriptionlicensecompatibilitymetadataallowed-toolsname+descriptionloaded at startup, for allskills.
SKILL.mdbody is loaded into context once a task matchesa skill's description (recommended to stay under ~5000 tokens / 500 lines).
scripts//references//assets/files are loaded/run onlyas needed.
skills-refCLI(
skills-ref validate ./my-skill) that validates frontmatter and naming conventions —worth evaluating as a dependency or as a model for our own validation.
Expected behavior
An Actor configuration author can declare skill references on a
type: llmagent, e.g.:At agent-creation time, each reference resolves through the existing
cleveractors.registryclient, the resolved content is validated against the Skillpackage schema defined by the ADR (which must itself be grounded in the agentskills.io
specification — see above), and the skill's
name/description/instructions(and, per progressive disclosure, its bundled scripts/references/assets on demand) are
loaded into the agent.
Acceptance criteria
skills:LLM agent config field, per this project's Specification-First Development process
(see ADR-2030 through ADR-2033 for the established ADR format and spec-extension
precedent). The ADR must explicitly evaluate the agentskills.io Agent Skills
specification (https://agentskills.io/specification) as the reference format,
document how our
pkg_skl_package schema maps to/from aSKILL.md-plus-directoryskill (including the single-document-vs-directory packaging question above), and
justify any deviation from the open spec.
docs/actor-registry-standard.md,specifying required/optional fields for
skill-type packages, informed by theagentskills.io frontmatter fields (
name,description,license,compatibility,metadata,allowed-tools) and the progressive-disclosure loading model.docs/index.md§4.4) documents a new optionalskillsfieldaccepting a list of package references using the existing reference schemes
(
registry:,ID:,local:).skillsentries resolve via the existingcleveractors.registryclient (
ReferenceResolver+PackageContentResolver+RegistryCache) and validateagainst the Skill schema, raising a typed error consistent with the existing
RegistryError/ExecutionErrorhierarchies on missing or invalid skill packages.and/or effective system prompt), consistent with the progressive-disclosure model
(name/description always available; full instructions loaded on activation).
skill package, invalid skill package content (including
name/descriptionconstraint violations per the agentskills.io rules), and a skill reference using each
of the three reference schemes.
skills:-configured LLMagent resolving a skill package end-to-end.
nox -s coverage_report); fullnoxsuite passes.docs/registry/) is updated to reflect the Skill schema andusage.
Supporting information
docs/actor-registry-standard.md§3.2 (package types), §5.3 (reference formats),§6 (canonicalization — single-document, content-addressed model)
docs/index.md§4.4 (LLM agent config), §1.3 (extensibility clause used by prior ADRs)docs/registry/index.md,docs/registry/integration.md(existing generic client usageof
package_type="skill"as an illustrative example only — no schema behind it today)open Agent Skills format (originally developed by Anthropic) that the ADR must
consult and evaluate for alignment; see "External reference specification" above for
the extracted normative details
specification-extension ADRs in this project
builds on
Subtasks
overview at https://agentskills.io/home) and summarize its applicability/gaps
relative to the Package Registry Standard's single-document packaging model
skills:LLM agent config field, grounded in the agentskills.io specification
docs/actor-registry-standard.mdper the approved ADR
skillsfield ontype: llmagents indocs/index.md§4.4 per theapproved ADR
cleveractors.agents(reusing the existing
cleveractors.registryclient)skillsfield and Skill package schemanox -s coverage_reportnox(all default sessions), fix any errorsDefinition of Done
This issue is complete when:
Commit Message in Metadata exactly, followed by a blank line, then additional lines
providing relevant implementation details.
exactly.
master, reviewed, and mergedbefore this issue is marked done.
Note: bundled
scripts/resources are readable, not directly runnableA question came up after this PR landed: if a skill's
instructionssay something like "runscripts/extract.py <file.pdf>", how does thetype: llmagent actually execute that script? Documenting the answer here since it's not obvious from the code alone.What the
skilltool actually gives the model is text, not a runnable file. Callingskill(skill_name="pdf-processing", resource="scripts/extract.py")returns the script's source as a string (cleveractors.agents.tool.ToolAgent._skill_tool, commitbf1f138) — formatted as[SKILL_RESOURCE_READ]...[FILE_CONTENT_START]...[FILE_CONTENT_END]. Nothing is ever written to a real filesystem path; resources live only in the in-memory_loaded_skillsmapping threaded throughcontext["_skills"]. This is intentional, per ADR-2034 D-5: resources are exposed for execution-stage reads "without touching the host filesystem," not for by-path execution.How a bundled Python script can actually run today — no code changes needed, but it requires the model to inline the source rather than reference it by path:
skill(skill_name="pdf-processing", resource="scripts/extract.py")→ returns the source textpython_exec(code="<that source text>")→ executes it viacleveractors.agents.tool.ToolAgent._execute_python_codeThis only works when the agent config sets
exec_python: true. Worth flagging: that sandbox isn't airtight — its restricted-builtins dict still includes an unrestricted__import__, so executed code canimport os/import subprocessand go beyond the tool's documented builtin list. Pre-existing behavior, not something this PR changed, but relevant to anyone relying on it as a security boundary for skill-provided code.What does not work today: a bundled
.shscript, or any Python script that assumes it's a real file on disk (relative imports, sibling files, real argv, real cwd). There's no materialized file forshellor a real interpreter invocation to point at. A model could try to smuggle the whole script intobash -c '<script>'via theshelltool (needsallow_shell: true), but that's fragile and wasn't a designed path — it just happens to be technically possible givenshell's existing arbitrary-commandargument.If genuine file-backed execution is wanted (skill resources materialized to a real temp directory so
shell/python_exec/file_readcan operate on real paths), that's a new capability this issue didn't build. It would need its own small design decision — materialization lifecycle, cleanup, interaction withsafe_mode/unsafe_mode— similar in shape to thepack_skill_directoryfollow-up already flagged in ADR-2034's "Follow-up Required" section. Happy to scope that as a separate issue if it's wanted.Closing ticet, PR was merged despite saying it was just closed.