Skip to content

Bug: pair package --layout target produces .skills/ output with links still relative to .claude/skills/ depth (off-by-one ../) #187

@omar-diop

Description

@omar-diop

Summary

When packaging from target layout (pair package --layout target), the produced artifact is structured as source layout (skills end up under .skills/<skill>/SKILL.md). However, links inside the packaged SKILL.md remain relative to the consumer target depth (.claude/skills/<skill>/...), resulting in off-by-one ../ and broken internal links when validating the KB repo/artifact in source layout.

Context

  • Consumer target layout installs skills at: .claude/skills/pair-<skill-name>/SKILL.md (3 levels deep to repo root)
  • Source/packaged layout stores skills at: .skills/pair-<skill-name>/SKILL.md (2 levels deep to repo root)

Reproduction

  1. In a consumer repo, have installed skills in target layout (e.g. .claude/skills/pair-capability-assess-ai/SKILL.md).
  2. Ensure SKILL.md contains links to KB files under .pair/... that are correct for the consumer target depth, e.g.:
    • ../../../.pair/adoption/tech/tech-stack.md
  3. Run:
    • pair package --layout target (packaging from targets)
  4. Inspect the produced package contents:
    • skills are located under .skills/pair-capability-assess-ai/SKILL.md
    • but links still use ../../../... (consumer depth)
  5. Validate the packaged KB/repo in source layout:
    • pair kb-validate --layout source

Expected

When the package output places skills under .skills/<skill>/, links should be rewritten to the correct source-layout depth, e.g.:

  • ../../.pair/adoption/tech/tech-stack.md

Actual

Packaged skills still contain links with consumer-depth ../../../..., which resolve outside the repo root in source layout and are reported as broken by kb-validate.

Notes

This is distinct from update-time link rewriting issues: this is about packaging from target layout while emitting a source-layout artifact, but not normalizing internal relative links for the output layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions