agentleFS
samsam007bsamsam007b/claude-code-standards-kit/skills/ux-progressive-disclosure/SKILL.md

ux-progressive-disclosure

Skill2 starsChanged 8 months agoMITView on GitHub

Apply the Progressive Disclosure pattern to a complex component, reorganizing it into 3 hierarchical levels (Essential / Advanced / Expert).

The file

Files
SKILL.md

UX Progressive Disclosure Skill

Description

Applies the Progressive Disclosure pattern to a complex component. Reorganizes information into hierarchical levels (Level 1: Essential, Level 2: Advanced, Level 3: Expert) according to scientific principles.

Usage

/ux-progressive-disclosure [file_path] [--levels=3] [--preview]

Workflow

  1. Analysis of the Current Component
    • Counts the number of visible elements
    • Identifies complexity (number of options, inputs, sections)
    • Detects Miller's Law violations (> 7±2)
  2. Categorization by Level
    • Level 1 (Always Visible): 5-7 essential elements
      • Criteria: Used by 80%+ of users, critical for the task
    • Level 2 (On Demand): Advanced features
      • Criteria: Used by 20-50% of users, optional
    • Level 3 (Expert): Fine-grained configuration
      • Criteria: Used by < 20% of users, power features
  3. Refactored Code Generation
    • Creates collapsible sections (Accordion pattern)
    • Adds expand/collapse logic
    • Preserves all functionality (nothing removed)
  4. Adding UI Affordances
    • "More options" indicators (+)
    • Explanatory tooltips
    • Smooth animations (Framer Motion)

Examples

Example 1: FilterSidebar with 30+ options

Before:

<FilterSidebar>
  {/* 30 checkboxes visible at the same time */}
  <Checkbox label="WiFi" />
  <Checkbox label="Parking" />
  <Checkbox label="Elevator" />
  {/* ... 27 more */}
</FilterSidebar>

After (with /ux-progressive-disclosure):

<FilterSidebar>
  {/* Level 1: Always visible (5 essentials) */}
  <FilterSection title="💰 Price" expanded={true}>
    <RangeSlider />
  </FilterSection>
  <FilterSection title="🏠 Type" expanded={true}>
    <ButtonGroup options={['Apartment', 'House']} />
  </FilterSection>

  {/* Level 2: Collapsed by default */}
  <FilterSection title="⚡ Amenities" expanded={false}>
    <CheckboxGroup
      visible={['WiFi', 'Parking', 'Furnished']} // 3 visible
      hidden={[...27 others]} // Revealed on "See more"
    />
  </FilterSection>

  {/* Level 3: Expert modal */}
  <FilterSection title="👥 Roommates" expanded={false}>
    <Button onClick={openModal}>+ Configure</Button>
  </FilterSection>
</FilterSidebar>

Example 2: Complex Settings Page

Command:

/ux-progressive-disclosure app/seeker/settings/page.tsx --levels=3

Output:

  • Reorganizes settings into 3 tabs (Account, Preferences, Advanced)
  • Each tab with max 7 visible options
  • Dangerous options (delete account) hidden in Advanced

Output

The skill generates:

  1. Refactored code (with progressive disclosure applied)
  2. Analysis report:
    # Progressive Disclosure Analysis
    
    ## Before
    - Total elements visible: 32
    - Cognitive load: HIGH (violates Miller's Law)
    
    ## After
    - Level 1: 5 elements (essential)
    - Level 2: 15 elements (advanced, collapsed)
    - Level 3: 12 elements (expert, modal)
    - Cognitive load: LOW ✅
    
    ## User Impact
    - Novice users: See only 5 options → No overwhelm
    - Advanced users: Can expand → Full control
    - Experts: Modal for fine-tuning → Power features

Configuration

Options:

  • --levels=N : Number of levels (default: 3)
  • --preview : Generates visual mockup (ASCII art) without modifying code
  • --preserve-state : Keeps expand/collapse states in localStorage

References

Based on:

  • Hick's Law: Reduce visible choices → faster decision
  • Miller's Law: Max 7±2 elements → manageable cognitive load
  • Progressive Disclosure Pattern: NN/g Research

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.