agentleFS
haoxiang-xuhaoxiang-xu/PuPu/.agents/skills/dev-ui-modal-standard/SKILL.md

dev-ui-modal-standard

Skill36 starsChanged 37 days agoApache-2.0View on GitHub

Standardize modal UI to match the Settings/Tools baseline used in this repo. Use when a user asks to align modal style/spacing/typography/close-button behavior, or says a modal looks inconsistent (for example close button position, border radius, title size/font, or empty-state panel visibility).

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read these files before editing so the standard is copied from the real implementation:

    line 13
  2. Distinctive:

    Use these values as the default modal standard in this repo:

    line 20
  3. Distinctive:

    Do not hardcode modal corner radius unless explicitly requested.

    line 23
  4. Very specific:

    Use Button close control for Settings/Tools parity (not ModalCloseButton) when standardization is requested.

    line 27
  5. Distinctive:

    Use exact style values:

    line 28
  6. Distinctive:

    If user asks to hide detail/sidebar in empty state, conditionally render that block.

    line 59
  7. Distinctive:

    Default pattern: render the side panel only when state is not empty.

    line 60
  8. Distinctive:

    Keep loading/error behavior unchanged unless user asks otherwise.

    line 61
  9. Distinctive:

    Run file-level eslint for changed files.

    line 64
  10. Distinctive:

    If available, run targeted tests relevant to changed behavior.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dev UI: Modal Standard

Overview

Apply the repo's modal baseline from Settings/Tools to a target modal with minimal scope. Lock exact values for close button and title styling unless the user explicitly requests otherwise.

Baseline Sources

Read these files before editing so the standard is copied from the real implementation:

  • src/COMPONENTs/settings/settings_modal.js
  • src/COMPONENTs/toolkit/toolkit_modal.js
  • src/BUILTIN_COMPONENTs/modal/modal.js
  • src/BUILTIN_COMPONENTs/theme/default_mini_theme.json

Standard Spec

Use these values as the default modal standard in this repo:

  1. Modal container
  • Do not hardcode modal corner radius unless explicitly requested.
  • Let modal corner radius come from theme (theme.modal.borderRadius, currently 12).
  1. Close button
  • Use Button close control for Settings/Tools parity (not ModalCloseButton) when standardization is requested.
  • Use exact style values:
    • position: "absolute"
    • top: 12
    • right: 12
    • paddingVertical: 6
    • paddingHorizontal: 6
    • borderRadius: 6
    • opacity: 0.45
    • zIndex: 2
    • content.prefixIconWrap: centered flex with lineHeight: 0
    • content.icon: { width: 14, height: 14 }
  1. Title typography
  • Match Settings title defaults when asked to align title style:
    • fontSize: 22
    • fontWeight: 600
    • fontFamily: "NunitoSans, sans-serif"

Workflow

  1. Audit
  • Inspect the target modal and identify deltas against baseline:
    • close button implementation and offsets
    • modal corner radius source
    • title size/font/weight
    • state-based layout behavior (for example empty-state side panels)
  1. Patch minimally
  • Change only the target modal and only the requested inconsistencies.
  • Preserve existing behavior unless the user asked for behavior changes.
  1. Handle empty-state side panels when requested
  • If user asks to hide detail/sidebar in empty state, conditionally render that block.
  • Default pattern: render the side panel only when state is not empty.
  • Keep loading/error behavior unchanged unless user asks otherwise.
  1. Verify
  • Run file-level eslint for changed files.
  • If available, run targeted tests relevant to changed behavior.
  • Report any unrelated pre-existing test failures explicitly.

Output Checklist

Include these in your final response:

  • Which modal(s) were aligned
  • Exact styling decisions applied
  • File references to changed lines
  • Validation commands run and results
  • Any known unrelated failures

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.

Reviews can't be read right now.

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.