i got this error message when running the /render-html skill recently in another folder…
- User
i got this error message when running the /render-html skill recently in another folder why?
The skill's reference files (html-skeleton.md, html-patterns.md) aren't present in the skill folder, so I'll compose the HTML directly while keeping to the skill's hard rules: self-contained, no remote refs, anchor TOC, scrollspy.
Assistant
Let me look at the render-html skill to understand what's happening.
Assistant
The root cause is clear. The skill's Step 4 and Step 5 instruct the agent to
Read references/html-skeleton.mdandRead references/html-patterns.md— relative paths that only resolve correctly when the working directory is the pde-skills repo root. When you invoke the skill from any other project, those reads fail, and the agent falls back to composing the HTML from scratch.The fix is to use
@imports at the top of SKILL.md so Claude Code inlines the reference content at load time — making it available regardless of where the skill is invoked from. Let me check if the plugin loader supports@imports in SKILL.md:Assistant
Now I have the full picture. Here's what happened and why:
Root cause: Steps 4 and 5 of the skill workflow tell the agent to
Read references/html-skeleton.mdandRead references/html-patterns.md. These are relative paths — they resolve against the current working directory. When you run/pde-render-htmlfrom your other project, CWD is that project's root, not/Users/anton/src/pde-skills, so both reads fail silently and the agent improvises.The agent's message — "aren't present in the skill folder" — shows it tried to be smart about it, but still couldn't find them because
references/is at the plugin root, not insideskills/render-html/.The fix: add a "locate reference files" step before Step 4 that searches for them by known path rather than assuming CWD. The plugin root is stable on this machine — I can use a fallback path, or a command to make it portable.
- User
review your recommendation against the /skill-creator:skill-creator skill
Assistant
Reading the skill-creator skill reveals three problems with my recommendation.
1. I skipped the test-evaluate loop
The skill-creator process is: draft → run test cases → evaluate → improve. I diagnosed a reported failure and proposed a fix without running the skill cross-project to precisely characterize what breaks. The actual failure mode matters — does the skill silently degrade, error, or produce a partial result? That evidence should drive the fix.
2. My proposed fix is "fiddly"
Skill-creator explicitly warns against "fiddly overfitty changes" and "oppressively constrictive MUSTs." My Step 0 is exactly that — prescribing specific
findcommands with machine-specific paths like~/src. The skill-creator says to explain the and let the model reason, not hardcode search sequences.- User
yes
Assistant
Let me first characterize the exact failure by simulating what the agent experiences when invoked cross-project, then verify whether the structural move actually fixes it.
Assistant
Key finding — look at the top of the skill-creator output the system injected:
Base directory for this skill:
/Users/anton/.claude/plugins/cache/claude-plugins-official/skill-creator/unknown/skills/skill-creatorClaude Code provides the skill's base directory as context when loading it. That's how
agents/grader.mdandreferences/schemas.mdwork — the agent constructs absolute paths from that base. Let me verify the skill-creator SKILL.md actually uses this:Assistant
There it is. The skill-creator's SKILL.md uses
<skill-creator-path>/eval-viewer/generate_review.py— a placeholder the agent fills from the "Base directory for this skill" that Claude Code injects at load time. The relative paths likeagents/grader.mdwork the same way.Now let me check if the reference files are shared across skills (which would complicate moving them):
Assistant
The reference files are used exclusively by render-html. Now I know exactly what to do:
- Move both files into
skills/render-html/references/ - Update SKILL.md to reference files via the skill's base directory (matching the skill-creator pattern)
- Delete the now-orphaned root-level copies
Let me check one more thing before moving:
- Move both files into
Assistant
The docs files reference the old paths too — I'll update them as part of this. Now making the changes:
Assistant
Now update the SKILL.md to use the base directory pattern:
Assistant
Now also add a red flag for the failure mode we just fixed:
Assistant
Now update the task docs to reflect the new paths:
Assistant
Verify the final state:
Assistant
Good. Ready to commit:
Assistant
Done. Summary of what changed and why:
- Moved
references/html-skeleton.mdandreferences/html-patterns.mdintoskills/render-html/references/— co-located with the skill, matching the bundled-resource anatomy the skill-creator uses for its ownagents/andreferences/files. - Updated SKILL.md workflow steps, artefact template, and references section to use
<skill-base>/references/...— Claude Code injectsBase directory for this skill: <absolute-path>when loading any skill, so the agent can construct the correct absolute path regardless of CWD. - Added a red flag for the failure mode: reading from a bare relative path instead of
<skill-base>/references/. - Updated
docs/tasks/render-html.mdto reflect the new paths.
The agent now has no excuse to silently fall back to composing from scratch — the reference files are findable from any project.
- Moved
- User
are all the symlink references etc up to date?
Assistant
Let me check for any remaining references to the old paths across the whole repo.
Assistant
Two issues: line 131 in SKILL.md still has a bare
references/html-patterns.md, and the rendered.htmltask doc is stale. Let me fix both.Assistant
Now re-render the stale HTML task doc using the skill:
Assistant
All updated. Now a final sweep to confirm no stale bare references remain anywhere:
Assistant
All clean — the only remaining
references/html-*strings in SKILL.md are the correct<skill-base>/references/...form. Let me commit the remaining two file fixes:Assistant
Everything is up to date. No symlinks in the repo. All references to the old
references/html-skeleton.mdandreferences/html-patterns.mdpaths have been updated across:skills/render-html/SKILL.md— all four occurrences use<skill-base>/references/...docs/tasks/render-html.md— updated bysedin the previous commitdocs/tasks/render-html.html— updated now (was missed by the earliersedrun)