Skip to main content

Using Skills

Skills can be used anywhere you would use a prompt — as system instructions for LLM conversations, in IDE config files, via API calls, or in automated pipelines. The structured metadata makes them easier to discover and integrate programmatically.

Programmatic Discovery

Use YAML frontmatter or METADATA.json to filter and select skills:

# Find all Node.js backend security skills
grep -rl '"tags".*nodejs' skills/ --include="METADATA.json"

# List all categories
jq -r '.tags[0]' skills/**/METADATA.json | sort -u

# Find skills by trigger keyword
jq -r 'select(.triggers[] | contains("django")) | .id' skills/**/METADATA.json

Loading Skills in Python

import json
import yaml
from pathlib import Path

def load_skill(skill_dir):
"""Load a skill's instructions and metadata."""
skill_path = Path(skill_dir)

# Load structured metadata
with open(skill_path / "METADATA.json") as f:
metadata = json.load(f)

# Load skill instructions
content = (skill_path / "SKILL.md").read_text()
_, frontmatter, body = content.split("---", 2)

return {"metadata": metadata, "prompt": body.strip()}

# Example: load and use as a system prompt
skill = load_skill("aegis/skills/backend-frameworks/nodejs/secure-express-js-developer")
print(f"Skill: {skill['metadata']['id']}")
print(f"Tokens: ~{skill['metadata']['token_estimate']}")

Loading the Manifest

For bulk operations, use index.json instead of scanning individual directories:

import json

with open("skills/index.json") as f:
manifest = json.load(f)

# Filter by category
backend_skills = [
s for s in manifest["skills"]
if "backend-frameworks" in s.get("tags", [])
]

print(f"Found {len(backend_skills)} backend framework skills")

Integration with Build Pipelines

Skills work in CI/CD pipelines the same way prompts do — load the SKILL.md content and pass it as the system message:

import anthropic

client = anthropic.Anthropic()

skill = load_skill("aegis/skills/backend-frameworks/python/secure-django-developer")

message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=4096,
system=skill["prompt"],
messages=[
{"role": "user", "content": "Review this Django view for security issues:\n\n" + code}
]
)

IDE and Agent Integration

Skills can be deployed the same way as prompts in IDE config files and agent instructions. See the Quick Start for deployment methods.

The key advantage of skills over raw prompts is that METADATA.json enables tooling to automatically select the right skill based on your project's tech stack, rather than requiring manual prompt selection.

Context Budget Management

Each skill's token_estimate field in METADATA.json helps you manage LLM context budgets. When composing multiple skills (e.g., a backend skill + a code review skill), sum the token estimates to ensure you stay within your model's context window.

# Check combined token cost before loading
skills_to_load = ["secure-django-developer", "security-code-review-orchestrator"]
total_tokens = sum(
s["token_estimate"] for s in manifest["skills"]
if s["id"] in skills_to_load
)
print(f"Combined token estimate: {total_tokens}")