cyberneticlibrary

Create expandable dropdown content

make-expandable-dropdownskillsetup L1381
majiayu000/claude-skill-registry
What it does

Convert highlighted text to expandable HTML details element

Best for

Making long documentation sections collapsible to reduce cognitive load while preserving full information for users who need detail.

Inputs
  • · Selected text block from MDX file
  • · Summary phrase (extracted from first bullet if list, otherwise requested)
Outputs
  • · HTML <details> and <summary> tags wrapping content
  • · Summary as visible toggle text
  • · Content preserved inside expandable section
Requires
  • · Edit tool (to replace text in file)
  • · Markdown/MDX editor
Preconditions
  • · Text is selected in editor
  • · Content starts with bullet list (preferred) or user provides summary
  • · MDX/HTML context supports <details> element
Failure modes
  • · No summary provided and content doesn't start with bullet
  • · First bullet not removed causing duplication
  • · Indentation lost causing markdown rendering failure
  • · Nested lists incorrectly processed
Trust signals
  • · Automatic summary extraction from first bullet reduces manual work
  • · Formatting and indentation preserved during conversion
  • · Works with existing MDX/HTML infrastructure