# skills-ref Reference library for Agent Skills. > [!IMPORTANT] > This library is intended for demonstration purposes only. It is not meant to be used in production. ## Installation ### macOS / Linux Using pip: ```bash python -m venv .venv source .venv/bin/activate pip install -e . ``` Or using [uv](https://docs.astral.sh/uv/): ```bash uv sync source .venv/bin/activate ``` ### Windows Using pip (PowerShell): ```powershell python -m venv .venv .venv\Scripts\Activate.ps1 pip install -e . ``` Using pip (Command Prompt): ```cmd python -m venv .venv .venv\Scripts\activate.bat pip install -e . ``` Or using [uv](https://docs.astral.sh/uv/): ```powershell uv sync .venv\Scripts\Activate.ps1 ``` After installation, the `skills-ref` executable will be available on your `PATH` (within the activated virtual environment). ## Usage ### CLI ```bash # Validate a skill skills-ref validate path/to/skill # Read skill properties (outputs JSON) skills-ref read-properties path/to/skill # Generate XML for agent prompts skills-ref to-prompt path/to/skill-a path/to/skill-b ``` ### Python API ```python from pathlib import Path from skills_ref import validate, read_properties, to_prompt # Validate a skill directory problems = validate(Path("my-skill")) if problems: print("Validation errors:", problems) # Read skill properties props = read_properties(Path("my-skill")) print(f"Skill: {props.name} - {props.description}") # Generate prompt for available skills prompt = to_prompt([Path("skill-a"), Path("skill-b")]) print(prompt) ``` ## Agent Prompt Integration Use `to-prompt` to generate the suggested `` XML block for your agent's system prompt. This format is recommended for Anthropic's models, but Skill Clients may choose to format it differently based on the model being used. ```xml my-skill What this skill does and when to use it /path/to/my-skill/SKILL.md ``` The `` element tells the agent where to find the full skill instructions. ## License Apache 2.0