Skip to content

Support skill dependencies via frontmatter depends field #860

@serejke

Description

@serejke

Problem

Skills can reference sibling skills via relative paths (e.g., Read ../gws-shared/SKILL.md), but npx skills add has no awareness of these references. When a user selectively installs a single skill, prerequisite skills are silently missing, leaving broken references.

Reproduction

npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-drive -a claude-code -y

This installs only gws-drive/SKILL.md, which contains:

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules.

But gws-shared is never installed. The AI agent following the skill instructions hits a dead reference.

Proposal

Add an optional depends field to the SKILL.md frontmatter spec:

---
name: gws-drive
description: "Google Drive: Manage files, folders, and shared drives."
depends:
  - gws-shared
---

When npx skills add installs a skill with depends, it should automatically resolve and install the listed skills from the same source repository. This is analogous to how package managers resolve peerDependencies.

Current state

  • The frontmatter spec supports only name, description, and metadata
  • No dependency resolution exists — skills are treated as fully independent
  • Skill authors work around this with prose instructions ("Read ../gws-shared/SKILL.md"), which are invisible to the tool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions