Skip to content

Support skills discovery from global config directory #410

@jhurray

Description

@jhurray

Problem

When using ruler init --global, rules and MCP servers defined in ~/.config/ruler/ (or $XDG_CONFIG_HOME/ruler/) are correctly discovered and applied. However, skills placed in ~/.config/ruler/skills/ are not discovered — the SkillsProcessor only looks for .ruler/skills/ relative to projectRoot.

This means there's no way to define global skills that get propagated to all projects via ruler apply.

Current behavior

$ ruler apply --dry-run --verbose
[ruler:verbose] Found .ruler directory with 297 characters of rules
[ruler:dry-run] No .ruler/skills directory found, skipping skills propagation

Skills in ~/.config/ruler/skills/axe/SKILL.md are ignored.

Expected behavior

ruler apply should discover skills from the global config directory (~/.config/ruler/skills/) in addition to the local .ruler/skills/ directory, consistent with how rules and MCP config are already handled globally.

When both global and local skills exist, local should take precedence (same skill name in local overrides global).

Context

Many agents (Claude Code, Codex CLI, Cursor) support global skills directories:

  • ~/.claude/skills/
  • ~/.agents/skills/
  • ~/.cursor/skills/

Ruler already propagates skills to these agent-specific directories from .ruler/skills/, but only at the project level. Supporting global skills in Ruler would let users define skills once in ~/.config/ruler/skills/ and have them propagated to all agents globally — matching the existing pattern for rules and MCP servers.

References

  • RULER_SKILLS_PATH is hardcoded to .ruler/skills in constants.js
  • SkillsProcessor.discoverSkills() only checks path.join(projectRoot, RULER_SKILLS_PATH)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions