Skip to content

feat(cosh): add skill-dirs configuration field in ~/.copilot/settings.json for custom skill directories #69

@casparant

Description

@casparant

Component

copilot-shell (cosh)

Problem Statement

Currently, cosh loads skills from a fixed set of directories. There is no user-configurable way to specify custom skill directories or control the loading order of multiple skill sources. This limits flexibility for users who want to:

  • Add personal or team-specific skill directories
  • Override system-level skills with custom implementations
  • Manage skills across different environments

Proposed Solution

Add a new configuration field skill-dirs to ~/.copilot/settings.json that allows users to specify an ordered list of skill directories. For example:

{
  "skill-dirs": [
    "$HOME/.copilot/skills",
    "/usr/share/anolisa/skills/"
  ]
}

Key behaviors:

  1. Ordered loading: Directories are processed in the order they appear in the array. Earlier paths take precedence over later ones.
  2. Path expansion: Support environment variable expansion (e.g., $HOME, ${USER}) and tilde expansion (~).
  3. Default fallback: If skill-dirs is not specified, use the current default behavior (system-level directories only).
  4. Validation: Warn or error if a specified directory does not exist or is not readable.

Alternatives Considered

  • Hardcoding additional default paths — less flexible and harder to customize per-user.
  • Using environment variables (e.g., COSKILL_DIRS) — less discoverable and harder to manage alongside other cosh settings.

Additional Context

This change would enable better skill management workflows, especially for:

  • Developers maintaining personal skill collections
  • Teams sharing common skill libraries
  • Users who want to test skill modifications before contributing upstream

The configuration should be documented in the cosh settings reference and included in the default settings.json template (if one exists).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions