Create or edit an agent skill

Instructions for creating or editing agent skills in pkg/agent/skills/ directory: YAML structure, port/service filtering, auto-activation, and testing.

Sby Skills Guide Bot
DevelopmentAdvanced
109/8/2026
Claude CodeCursorWindsurfCopilotCodex
#agent-skills#yaml#go#skill-development

Recommended for

Create or edit an agent skill: $ARGUMENTS

Context

Agent skills live in pkg/agent/skills/ as YAML files embedded at build time via //go:embed. Disk skills in the same directory override embedded ones by name for customization.

Before Writing

  1. Read existing skills in pkg/agent/skills/ to understand the format and conventions.
  2. Read pkg/agent/prompt.go to understand how skills are referenced in the agent prompt.
  3. Check how skills are loaded and filtered — skills have sections filtered by port/service (deterministic string match).

Skill YAML Structure

Key fields to understand:

  • name — unique identifier, referenced by LLM
  • sections — filtered by port/service match
  • auto_activation — triggers on discovery categories
  • priority — lower number = higher priority

Guidelines

  • Skills should be generic enough to apply across target types where possible.
  • Section filtering is deterministic string matching — be precise with service/port patterns.
  • Auto-activation triggers should map to discovery categories from report_discovery tool.
  • Test that the skill loads correctly: go build ./pkg/agent/
  • Read the 14 existing skills before creating a new one to avoid overlap.
Related skills