Canonical root marketplace path normalization

From ychampion/cskill-agents · View interactive version

Canonical root marketplace path normalization is an AI agent skill from the GitHub repository ychampion/cskill-agents. Normalize relative extension source paths against a canonical repo root so shared marketplace records stay stable across worktrees.

How to use this skill

Skill file

SKILL: Canonical-Root Marketplace Path Normalization

Domain: extensions-mcp

Trigger: Use when project settings declare relative extension paths but the shared registry spans multiple worktrees or checkouts.

Source Pattern: Distilled from reviewed shared-registry path normalization logic.

Core Method

Resolve relative local source paths against the repository's canonical root rather than the current worktree directory before comparing them to shared registry entries. This produces one stable identity for a shared record, prevents worktrees from overwriting each other with checkout-specific paths, and avoids dead paths when temporary worktrees disappear. Normalize before diffing so equivalent repo-relative settings are treated as the same source.

Key Rules

Example Application

If a repo declares ./plugins/internal, normalize it against the canonical checkout root so every worktree resolves to the same shared registry path.

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.