AFUI Customize Skill

Use this skill when asked to change how an AFUI Web Host surface looks or scans: highlight thresholds, change colors, tune density, rearrange presentation, or add local viewer preferences. Write only trusted local viewer files under .afui/; do not edit producer-owned space data to satisfy presentation requests.

Decision Order

  1. Prefer rules.json when the request is conditional on data. Rules are display-only: match owner/unit/key, evaluate a binding, then set only state, prominence, or emphasis.
  2. Use user.css for visual treatment of stable data attributes and classes. Put rules in @layer user.
  3. Use theme.json for token changes such as --accent, --card, --ink, or --page-bg.
  4. Use packs for host presentation defaults such as slots, zoom, order, and accent. Do not use packs for business thresholds.
  5. Use user.js only for trusted local behavior that cannot be expressed as rules/CSS/theme/pack.

Hard Rules

Workflow

  1. Inspect the snapshot to find owner keys, unit ids, field keys, and available bindings.
  2. Create or edit .afui/rules.json, .afui/user.css, .afui/theme.json, or .afui/packs/*.pack.json.
  3. Serve the snapshot through the Web Host and verify with a headless screenshot. In the Agent-First UI Host repository, prefer scripts/render-gallery.sh without --out; it creates a system temporary output directory and prints its path for fixed-script verification. Set AFUI_GALLERY_OUT only when the result must be retained at a stable path.
  4. If the screenshot misses the requested effect, adjust selectors/rules rather than changing producer data.