/magic-ui-ux:psychology-routerfrom magic-ui-ux
Routes page sections to relevant psychology skills for UX analysis. Given a page-type and section-type, returns 2-4 focused skills instead of all 14. Called by the UX Agent before analyzing each section of a page layout.
Ships in magic-ui-ux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Prevents the "wall of psychology" anti-pattern. Instead of applying all 14 cognitive psychology skills to every section, the router selects the 2-4 most relevant skills based on section type and page context. This ensures UX advice is focused and actionable rather than generic.
The UX Agent calls this router before analyzing each section of a page layout.
page_type: string
One of: "landing-page", "homepage", "product/service", "content/blog", "checkout/signup"
section_type: string
One of: "hero", "navigation", "features/services", "pricing",
"testimonials/social-proof", "cta", "about/team", "contact/form",
"faq", "footer", "portfolio/case-studies", "onboarding/signup",
"blog/content", "comparison", "notification/alert"
conversion_intent: "high" | "medium" | "low" (optional, defaults to "medium")
skills: string[]
2-4 skill names from the 14 available psychology skills
rationale: string
Brief explanation of why these skills were selected for this section + page combination
skill_summaries: object[]
For each selected skill:
- name: string (matching skill directory name)
- core_principle: string (one sentence)
- key_patterns: string[] (2-3 design patterns)
references/section-skill-map.md master routing tableconversion_intent is "high" OR page_type has a boost modifier in the modifiers table, promote secondary skills up to the 4-skill cappage_type is "content/blog", cap at 2 skills maximumreferences/skill-summaries.md for each selected skillInput:
page_type: "landing-page"
section_type: "hero"
Algorithm:
1. Hero primaries: cognitive-load, curiosity-gap, visual-cues-cta-psychology
2. Hero secondaries: halo-effect-psychology, loss-aversion-psychology
3. Landing-page modifier boosts: loss-aversion-psychology (in secondaries -> promoted)
4. Landing-page hero override: upgrade secondaries to primary
5. Cap at 4: cognitive-load, curiosity-gap, visual-cues-cta-psychology, loss-aversion-psychology
Output:
skills: ["cognitive-load", "curiosity-gap", "visual-cues-cta-psychology", "loss-aversion-psychology"]
rationale: "Hero on landing page: cognitive-load ensures clean first impression, curiosity-gap hooks visitor, visual-cues guides to CTA, loss-aversion boosted for high-conversion page type"
Input:
page_type: "content/blog"
section_type: "blog/content"
Algorithm:
1. Blog primaries: curiosity-gap, cognitive-fluency-psychology, progressive-disclosure
2. Content/blog reduction: cap at 2 skills
3. Content/blog modifier emphasizes: curiosity-gap, cognitive-fluency-psychology
4. Final selection: curiosity-gap, cognitive-fluency-psychology
Output:
skills: ["curiosity-gap", "cognitive-fluency-psychology"]
rationale: "Content page: lighter touch -- curiosity-gap for headline engagement, cognitive-fluency for readable body"
Input:
page_type: "checkout/signup"
section_type: "contact/form"
conversion_intent: "high"
Algorithm:
1. Contact/form primaries: fogg-behavior-model, cognitive-load, trust-psychology
2. Contact/form secondaries: progressive-disclosure, hicks-law
3. Checkout modifier boosts: fogg-behavior-model, cognitive-load, hicks-law
4. High conversion_intent: promote secondaries -> hicks-law promoted
5. Cap at 4: fogg-behavior-model, cognitive-load, trust-psychology, hicks-law
Output:
skills: ["fogg-behavior-model", "cognitive-load", "trust-psychology", "hicks-law"]
rationale: "Checkout form with high conversion intent: fogg-behavior ensures motivation+ability+prompt alignment, cognitive-load minimizes form friction, trust-psychology addresses payment hesitation, hicks-law reduces field/option overwhelm"
Input:
page_type: "homepage"
section_type: "testimonials/social-proof"
Algorithm:
1. Testimonial primaries: social-proof-psychology, trust-psychology, halo-effect-psychology
2. Homepage modifier boosts: trust-psychology, halo-effect-psychology (already primary)
3. Medium conversion_intent: no secondary promotion
4. Final: 3 primary skills (within cap)
Output:
skills: ["social-proof-psychology", "trust-psychology", "halo-effect-psychology"]
rationale: "Homepage testimonials: social-proof validates through others' experience, trust-psychology builds credibility, halo-effect ensures polished presentation colors product perception"
The summaries from references/skill-summaries.md are sufficient for:
Load the full skill file (~/.claude/skills/{name}/SKILL.md) only when:
references/section-skill-map.md -- Master routing table, selection rules, and page-type modifiersreferences/skill-summaries.md -- One-paragraph summaries of all 14 psychology skills with core principles, design applications, key patterns, and skill pathsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ux-analysis, skill-router, cognitive-psychology, page-layout
npx claudepluginhub flyingwebie/skills --plugin magic-ui-ux8 skills in this plugin
/animationGenerates per-page animation choreography specs. Reads UX briefs for psychology context and design tokens for style-appropriate motion. Produces implementation-ready specs with Framer Motion, GSAP + ScrollTrigger, Swup.js, and Lenis code patterns.
/brandingGenerates complete design systems from project niche/industry descriptions. Produces machine-readable tokens (tokens.json) and human-readable design documentation (branding.md) using industry-specific design rules and color psychology.
/copy-generationGenerates page copy (headlines, subheadings, body text, CTAs, labels) based on project niche, page type, and UX brief psychology rationale. Presents all copy for human approval before use. Never passes unapproved copy to the UI Agent.
/image-generationGenerates comprehensive JSON visual specifications from text descriptions, reference images, or both. Translates photography/cinematography parameters into rich natural-language image guidance that dramatically improves Stitch's image rendering in generated screens.
/magic-ui-uxRun psychology-led branding, page design, iteration, image specification, motion, sync, and export workflows in Codex./persistenceManages the .ui-ux/ persistence folder. Handles initialization, reading, and writing of design tokens, project state, and screen references. Every command MUST read from .ui-ux/ before any design operation.
Other plugins' skills for the same job