Project root scoped local skill loading

From ychampion/cskill-agents · View interactive version

Project root scoped local skill loading is an AI agent skill from the GitHub repository ychampion/cskill-agents. Resolve a stable project root first, then load local skills relative to that scope before combining them with other sources.

How to use this skill

Skill file

SKILL: Project-Root Scoped Local Skill Loading

Domain: skill-loading

Trigger: Apply when local commands or skills must be discovered from the current workspace and later merged with other registries such as MCP or bundled sources.

Source Pattern: Distilled from reviewed command-surface, skill-discovery, and CLI capability implementations.

Core Method

Resolve the canonical project scope before loading any local command or skill surface. Feed that stable root into the local loader so discovery is anchored to the workspace boundary rather than to whatever transient working directory or caller context happened to invoke the pipeline. Once the local set is loaded from that scoped root, it can be safely merged with remote or external sources without mixing project-relative lookup with cross-source combination logic.

Key Rules

Example Application

If a coding agent builds a skill listing from both the current repository and connected MCP servers, resolve the repository root first, load local skills relative to that root, then merge the resulting local commands with the MCP skills. This prevents a subdirectory invocation from silently narrowing the local skill surface.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.