skills-ref: Agent Skills Reference Library

0.1.1 · active · verified Thu Apr 16

The `skills-ref` library serves as a foundational reference for the Agent Skills open specification, enabling AI agents to dynamically discover, load, and execute specialized capabilities. It defines the structure and format for 'skills,' which are modular packages of instructions, scripts, and resources for AI agents. Currently at version 0.1.1, its development is closely tied to Anthropic's Agent Skills initiative, with active releases focusing on refining the underlying specification.

Common errors

Warnings

Install

Imports

Quickstart

The `skills-ref` library defines the underlying format for Agent Skills. Therefore, a 'quickstart' for `skills-ref` itself involves understanding the `SKILL.md` file format. Practical interaction with these skills in Python is typically done through a compatible agent framework, such as the `agent-skills` library, which interprets and executes skills conforming to the `skills-ref` specification. The example illustrates the conceptual structure of an Agent Skill and how an agent might load and utilize it.

# The 'skills-ref' library defines the structure, but direct Python usage is typically via an agent framework.
# Here's a conceptual representation of how an agent might 'use' a skill based on the specification.

# Imagine an agent framework loading skill metadata (defined by skills-ref specification):
# from agent_skills import Agent, AgentSkillsToolset # (from related 'agent-skills' library)

# A skill, as defined by the 'skills-ref' specification, is a directory containing a SKILL.md file.
# Example SKILL.md content (conceptual):
# ---
# name: code-reviewer
# description: Reviews Python code for style, errors, and best practices.
# license: Apache-2.0
# ---
# # Code Review Instructions
# 1. Read the provided Python code.
# 2. Check for PEP 8 compliance.
# 3. Identify potential bugs or logical errors.
# 4. Suggest improvements for readability and efficiency.
# 5. Provide a summary of findings.

# In a real agent system (e.g., using 'agent-skills' or similar):
# skills_directory = './my_agent_skills'
# toolset = AgentSkillsToolset(path_to_skills=skills_directory)
# agent = Agent(tools=[toolset])

# user_query = "Review the following Python code for me: def add(a, b): return a + b"
# agent.run(user_query)

# The agent would then (internally) discover the 'code-reviewer' skill based on its description
# and load the instructions from SKILL.md to perform the task.

view raw JSON →