Skip to content

feat(goose): Add skills support for Goose (.goose/skills/) #1115

Description

@dyoshikawa

Summary

Add native skills support for the goose tool target via .goose/skills/<name>/SKILL.md files (project scope).

Motivation / Purpose

Goose supports the Agent Skills specification, loading skills from .goose/skills/ (Goose-specific) and .agents/skills/ (portable) directories. Supporting this in Rulesync allows teams to synchronize skill definitions across Goose and other AI tools from a unified .rulesync/skills/ source.

Details

Goose Skills File Format

  • Directory: .goose/skills/<skill-name>/ (Goose-specific) or .agents/skills/<skill-name>/ (portable)
  • Main file: SKILL.md within each skill directory
  • Format: YAML frontmatter + Markdown body

SKILL.md structure

---
name: my-skill
description: What this skill does - used for semantic matching
---

# Skill Instructions

Detailed instructions that Goose follows when this skill is activated.

Required frontmatter fields

Field Type Description
name string Unique identifier (lowercase with hyphens). Must match parent directory name.
description string Used for semantic matching - AI compares user requests against this field

Behavior

  • Skills are loaded automatically when Goose determines a user request matches the skill's description
  • Unlike recipes (explicit triggers), skills are contextual expertise loaded on-demand
  • The full SKILL.md body is loaded when activated (recommended: < 5000 tokens, < 500 lines)
  • Skills can include supporting files (scripts, templates, configs) in the skill directory

Implementation Checklist

1. Create GooseSkill class

  • File: src/features/skills/goose-skill.ts
  • Extends: ToolSkill
  • Reference pattern: Follow AgentsSkillsSkill (Agent Skills spec) or ClaudecodeSkill
  • Settable paths:
    • relativeDirPath: ".goose/skills" (Goose-specific directory)
  • Frontmatter mapping:
    • Rulesync name → Goose name (also determines directory name)
    • Rulesync description → Goose description
  • File name: SKILL.md within each <skill-name>/ subdirectory

2. Register in skills processor

  • Add "goose" entry to toolSkillFactories in src/features/skills/skills-processor.ts:
    [
      "goose",
      {
        class: GooseSkill,
        meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: false },
      },
    ],

3. Conversion logic

  • Rulesync → Goose: Convert .rulesync/skills/<name>.md (YAML frontmatter + body) to .goose/skills/<name>/SKILL.md (YAML frontmatter with name + description + body)
  • Goose → Rulesync: Convert .goose/skills/<name>/SKILL.md to .rulesync/skills/<name>.md
  • Key constraint: The name field in SKILL.md frontmatter must match the parent directory name. If they don't match, Goose won't load the skill.

4. Tests

  • File: src/features/skills/goose-skill.test.ts
  • Follow existing test patterns (e.g., claudecode-skill.test.ts or agentsskills-skill.test.ts)
  • Test scenarios:
    • SKILL.md generation with correct frontmatter (name, description)
    • Directory name matching name field
    • Round-trip conversion (Rulesync ↔ Goose)
    • fromDir, fromRulesyncSkill, toRulesyncSkill, forDeletion
    • Skills with supporting files (optional)

Design Considerations

  • Agent Skills specification alignment: Goose follows the open Agent Skills standard. The agentsskills target already exists in Rulesync for .agents/skills/. Consider whether goose skills should generate to .goose/skills/ (Goose-specific) or .agents/skills/ (portable). Generating to .goose/skills/ is recommended as the Goose-specific path, and users who want portable skills can use the existing agentsskills target.
  • Project scope only: Goose skills appear to only support project-level configuration (no global skills directory).
  • No simulated skills: Goose natively supports skills, so no simulation needed.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions