Skip to content

fix(skills): point shared references at GitHub URLs for npx installs (#361) - #366

Closed
evanclan wants to merge 1 commit into
addyosmani:mainfrom
evanclan:fix/references-absolute-urls-for-npx
Closed

evanclan wants to merge 1 commit into
addyosmani:mainfrom
evanclan:fix/references-absolute-urls-for-npx

Conversation

@evanclan

@evanclan evanclan commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Per-skill npx skills add … --skill <name> installs only that skill directory, so relative links like `references/definition-of-done.md` resolve to nothing. This switches the 17 shared-checklist mentions across 11 skills to canonical GitHub blob URLs, and documents the convention so future skills stay portable under both whole-repo and per-skill installs.

Fixes #361. Implements the approach suggested by @nucliweb on that issue (and addresses the portability concern raised in #329 without duplicating checklists into each skill).

Problem

planning-and-task-breakdown (and 10 other skills) point at repo-root checklists via a bare relative path:

See `references/definition-of-done.md`.

That path only exists when the full repo is present (Claude Code marketplace plugin, whole-repo clone). Under npx skills add addyosmani/agent-skills --skill planning-and-task-breakdown, the sibling references/ folder is never copied, so the link is dead. The skill still runs — these are See Also deep-dives — but the checklist is unreachable.

Solution

  • Replace every `references/<file>.md` mention in skills/*/SKILL.md with a markdown link to https://github.com/addyosmani/agent-skills/blob/main/references/<file>.md (11 skills, 17 links).
  • Note the per-skill install gap in the README Quick Start next to the --skill examples.
  • Codify the URL convention in CONTRIBUTING.md and docs/skill-anatomy.md so new skills don't reintroduce relative paths.

Whole-repo installs keep working: the URLs resolve either way, and the checklists remain unduplicated at the repo root.

Out of scope

Test plan

  • node scripts/validate-skills.js — 24 skills, 0 errors, 0 warnings
  • bash hooks/session-start-test.sh — session-start JSON payload OK (meta-skill content changed)
  • rg '\references/' skills/ --glob '**/SKILL.md'` — no remaining relative checklist refs
  • CI to confirm the rest

Related

Made with Cursor

…ddyosmani#361)

Per-skill `npx skills add … --skill` copies only the skill directory, so
relative `references/*.md` links resolve to nothing. Use canonical blob
URLs instead (as suggested on addyosmani#361), and document the convention in
README, CONTRIBUTING, and skill-anatomy so future skills stay portable.

@nucliweb nucliweb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up, @evanclan, and for implementing the URL approach cleanly. I verified the conversion against the base: 17 bare relative references in skills/ on main, 17 canonical URLs on this branch, zero relative checklist refs left in skills/. The README / CONTRIBUTING / skill-anatomy notes are a good addition (documenting the convention in skill-anatomy too is more than I suggested on #361). Nice work.

Main thing before merge: the conversion is incomplete outside skills/

Your own rationale (per-skill installs do not include the repo-root references/ folder) applies to other extractable artifacts too, and four bare relative references were left untouched:

  • agents/web-performance-auditor.md:175 -> references/performance-checklist.md
  • .claude/commands/ship.md:24 -> references/orchestration-patterns.md
  • .gemini/commands/ship.toml:23 -> references/orchestration-patterns.md
  • commands/ship.toml:23 -> references/orchestration-patterns.md

The audit in the test plan is scoped to skills/ --glob **/SKILL.md, which is exactly why these slipped through. Agents and commands can also be used without the repo-root references/ present, so their links are equally dead there, and the repo is now inconsistent (skills use URLs, agents/commands use relative paths). Either convert these four for completeness and consistency, or make a conscious call that agents/commands are whole-repo-only and say so. I would lean toward converting them so the new convention holds everywhere.

Coordination note with #201

After this PR, skills have no local references/ links left. #201 (warn on missing local skill references) would need to account for that: a validator that checks local reference files would either have nothing to check or, worse, flag all of these URL links as unresolved. Worth a heads-up on #201 so whoever implements it validates URL liveness (or is at least aware references are now URLs) rather than colliding with this change.

Minor

  • #329 asks specifically to clarify why references are not colocated under each skill. This PR documents the URL convention (the mechanism) but not fully the no-duplication rationale. If you intend to close #329, a sentence on that reasoning would round it out.
  • The "Out of scope" section calls #201/#358/#228 open PRs; they are issues. Cosmetic.
  • The links use blob/main, which renders HTML. If the goal is for an agent to fetch the checklist content, raw.githubusercontent.com/.../main/references/<file>.md returns raw markdown. For human clicks blob is fine (it is what I suggested on #361), so this is optional.

Net: faithful, well-documented implementation, mergeable in essence. The agents/commands completeness gap is the one I would close before merge so the convention is consistent across the repo.

@addyosmani

Copy link
Copy Markdown
Owner

The underlying problem is real: per-skill installs don't carry the repo-root references, so relative links break. My hesitation is that the fix hardcodes blob/main URLs across a dozen skills, which trades a broken-link problem for a rename-fragility one and leans on an external CLI convention I've been careful about mentioning. I'd rather solve this without that coupling if there's a lighter touch. Let me think on it before we bake absolute URLs into every skill.

@nucliweb

Copy link
Copy Markdown
Collaborator

Heads up @evanclan on how this now sits against main. This PR predates two changes that landed in the same region of skill-anatomy.md, so it will need a rebase, but the good news is there is no real conflict of intent, just repositioning.

What changed under it:

The key point: your change and #236 are complementary halves of the same #361 fix, not competing answers. #236 covers material used by a single skill (colocate it inside the skill so a per-skill install carries it). Yours covers material shared across skills that cannot be colocated (link it by canonical GitHub URL so the link still resolves). Together they close the gap for both cases.

Concretely, once you rebase onto current main: the bullet you anchor after (- References: stored in...) will have become - Shared references:..., so your canonical-URL bullet slots naturally right after it, and it would read best tied into the new Shared References section rather than standing alone. Happy to help review once it is refreshed.

@addyosmani addyosmani left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good intent, and dead links on per-skill installs are a real problem (#361). My hesitation is that hardcoding blob/main URLs pins the links to main rather than the installed version, and breaks if the repo ever moves. There's also the skill-local references/ direction in play. I'd rather settle which #361 fix we're committing to before this lands, so we don't ship two half-approaches. Holding for that.

@addyosmani

Copy link
Copy Markdown
Owner

Closing in favor of #469. We talked it through and landed on fixing the relative paths properly (../../references/) plus a CI validator, rather than rewriting to blob/main GitHub URLs, mainly because the URL approach pins every link to main and needs a network round-trip. Genuinely appreciate you surfacing the #361 problem and pushing on it, that's what got us to the right fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npx packs only skills/

3 participants