pageel/para-workspace/mobile-responsive
Claude Code and agent skill by pageel/para-workspace
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Complete AI Agent harness for mobile responsive UI engineering — includes fluid layout rules (clamp, container queries), automated AST/CSS linter script (scripts/check-responsive.js), DOM Bounding Box inspection for Chrome DevTools MCP (scripts/inspect-viewport.js), and responsive component contract templates. MANDATORY: Trigger when building, auditing, or refactoring UI components, CSS/Tailwind styles, Astro/React/HTML layouts, or verifying mobile responsiveness.
Install
npx vskill@latest install pageel/para-workspace/mobile-responsiveSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Mobile Responsive Engineering Harness
Skill Version: 1.1.0 | Scope: Global (All Web Projects)
This skill equips AI Agents with a 4-Layer Quality Harness to design, code, audit, and visually inspect mobile-responsive web interfaces without layout breakage or visual bugs.
🎯 The 4-Layer Control Pipeline
- Layer 1 (Write-Time Fluid Tokens): Enforce zero-hardcoded pixel layout rules. Use
clamp(),min(),max(), Flexbox wrap, and Container Queries. - Layer 2 (Design Contract): Define
PAGE_MAP.mdResponsive Component Contracts for complex layouts before writing code. - Layer 3 (Static Linter Guard): Execute
node .agents/skills/mobile-responsive/scripts/check-responsive.js <file-or-dir>to catch CSS anti-patterns at build time. - Layer 4 (Visual Runtime Inspection): Use Chrome DevTools MCP
evaluate_scriptwithscripts/inspect-viewport.json viewports320px,375px,768pxto catch actual DOM overflows.
📋 Quality Rules & Invariants
- R1 (Zero Fixed Layout Widths): Never use
width: 600pxorw-[600px]. - Why: A 600px fixed container overflows on any device < 600px viewport width, causing horizontal scroll and breaking touch interactions. Always use
max-width: 100%,w-full, orminmax(). - R2 (Minimum Touch Targets): All interactive elements (
<button>,<a>,<input>,<select>) MUST have minimum dimensions of44x44px(ormin-h-[44px] min-w-[44px]). - Why: Apple HIG and WCAG 2.5.5 require 44×44px minimum. Smaller targets cause mis-taps on mobile, especially for users with motor impairments.
- R3 (Text Overflow Safety): All containers with dynamic or long text MUST include
break-words(overflow-wrap: break-word) andmax-width: 100%. - Why: A single long URL, email, or hashtag without
break-wordcan push the container width past the viewport, causing the entire page to scroll horizontally. - R4 (Media Fluidity): All
<img>,<video>,<svg>,<canvas>,<iframe>elements MUST havemax-width: 100%; height: auto;. - Why: A 1200px-wide image without
max-width: 100%will overflow a 375px iPhone screen, creating a horizontal scrollbar and hiding page content. - R5 (Viewport Meta Tag): HTML pages MUST contain
<meta name="viewport" content="width=device-width, initial-scale=1.0">. - Why: Without this meta tag, mobile browsers render the page at desktop width (~980px) and zoom out, making all text unreadable and interactive elements untappable.
- R6 (Off-Screen Drawer Visibility Guard): Off-screen navigation drawers (
right: -100%,left: -280px,transform: translateX(-100%)) MUST includevisibility: hiddenorpointer-events: nonewhen closed. - Why: Position-offset drawers without
visibility: hiddenremain in the browser's scrollable canvas calculation, causing horizontal swipe/scroll overflow on touch devices.
🔄 Layer 3→4 Workflow (Step-by-Step)
When auditing or fixing responsive issues, follow this pipeline:
Step 1: Run Static Linter (Layer 3)
Step 2: Interpret Linter Output
- If
✅ VERDICT: PASS→ proceed to Layer 4 visual check - If
❌ VERDICT: FAIL→ fix all violations first, re-run linter until PASS
Step 3: Run Visual Inspection (Layer 4) — requires dev server running
Step 4: Record Results Update the component's BLUEPRINT.md Linter Check and MCP Visual Check columns.
🛠️ Executable Tools & Scripts
1. Static Linter (scripts/check-responsive.js)
Run this script via run_command during pre-commit or phase verification:
Checks performed: R1 (fixed widths > 320px), R2 (touch targets < 44px), R3 (text overflow), R4 (unconstrained media), R5 (viewport meta tag).
Example Output — PASS:
Example Output — FAIL:
2. Chrome DevTools MCP Inspector (scripts/inspect-viewport.js)
When dev server is running, use Chrome DevTools MCP evaluate_script with the JS code in scripts/inspect-viewport.js.
Target viewports: 320px (small mobile), 375px (iPhone), 768px (tablet).
Example Return JSON — PASS:
Example Return JSON — FAIL:
📚 References & Templates
- CSS Fluid Recipes:
references/fluid-recipes.md - Component Contract Template:
references/responsive-contract-template.md
🧪 Test Prompts
Use these prompts to verify the skill works correctly:
| # | Test Prompt | Expected Result | Type | |
|---|---|---|---|---|
| T1 | Create a file with <div style="width: 600px"> and run linter | R1 violation detected on that line | Objective | |
| T2 | Create a file with <button class="h-[30px]"> and run linter | R2 violation: height 30px < 44px minimum | Objective | |
| T3 | Create a file with <img src="photo.jpg"> (no max-w-full) and run linter | R4 violation: media without max-width | Objective | |
| T4 | Run MCP inspector on a page with 375px viewport containing a 600px fixed div | hasHorizontalOverflow: true, verdict: FAIL | Objective | |
| T5 | Run MCP inspector on a fully fluid page at 375px | verdict: PASS, all counts = 0 | Objective |
🧪 Test Mode (Sandbox Override)
When testing this skill in isolation (via /para-skill test or manual testing):
- Containment path:
Projects/<project>/repo/.test-responsive/ - Test fixtures: Create
.astro/.htmltest files with deliberate violations in the containment path - Report output: Generate
test-report.mdin the containment path with the following structure:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/common/agents/skills/mobile-responsive/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 18
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pageel/para-workspace/mobile-responsive)