Skip to content

Show a skill's SKILL.md as soon as the skill opens - #688

Merged
JacobStephens2 merged 2 commits into
mainfrom
site-skills-expand
Oct 16, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
site-skills-expand

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

Opening a skill on the Prompts and skills page now shows its SKILL.md straight away, so it takes one click instead of two. SKILL.md still folds by its own heading, and the supporting files stay folded.

 <article id="skill-thirdshift-code-review">
   <details class="fold">                        # the skill: starts closed
     <summary><h3>thirdshift-code-review</h3>
-    <details class="fold">                      # SKILL.md: a second click
+    <details class="fold" open>                 # SKILL.md: shows with the skill
       <summary><h4>thirdshift-code-review/SKILL.md</h4>
     <details class="fold">                      # supporting files: still folded

file_block in src/prompts_page.rs takes an open flag. Only the SKILL.md at each skill's root gets it, and site/prompts/index.html is regenerated from that. It's plain HTML, so it also works without JavaScript.

Evidence

  • Before: the new browser test fails, because SKILL.md is hidden after the skill opens:
    ✖ opening a skill shows its SKILL.md, which still folds by its heading
      open Factory skills → open thirdshift-code-review
      SKILL.md visible?  false !== true
    
    After: all 4 browser tests pass:
    ✔ every headed section but a skill's SKILL.md starts closed, and each toggles independently by its heading
    ✔ opening a skill shows its SKILL.md, which still folds by its heading
    ✔ fragment links reveal the prompt or supporting file and its containing sections
    ✔ mobile readers can toggle headings with the keyboard without JavaScript
    
    The full cargo test suite and clippy also pass.

The two older tests that assumed every fold starts closed now check that the SKILL.md folds are exactly the ones that start open, and that every section-level fold still starts closed. That holds with JavaScript on and off.

Merge Danger

Door: two-way

Blast Radius: cosmetic

This only changes how the static site's Prompts and skills page starts out. A fragment link to a skill's supporting file now also shows the open SKILL.md above it, but the page still scrolls to the linked file.

🤖 Generated with Claude Code

JacobStephens2 and others added 2 commits October 13, 2026 14:32
On the Prompts and skills page, opening a skill now shows its SKILL.md
straight away; it still folds by its heading, and the supporting files
stay folded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open the SKILL.md at the skill's root rather than any file of that
name, and have the browser tests read the rendered path rather than
guess from the id. The no-JS test again checks that only SKILL.md
folds start open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit 6d272cf into main Oct 16, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the site-skills-expand branch October 16, 2026 23:55
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 17, 2026
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.

1 participant