$npx -y skills add aviflombaum/claude-code-in-avinyc --skill monitor-configThis skill should be used when the user asks to configure, optimize, or troubleshoot their display/monitor setup. Triggers on "optimize my monitors", "configure displays", "rotate monitor", "set up my screens", "display settings", "monitor resolution", or any request to adjust mu
| 1 | # Monitor Configuration Assistant |
| 2 | |
| 3 | Optimize multi-monitor setups on macOS through an interactive interview process. Discover connected displays, understand the user's physical arrangement and workflow, then configure optimal resolutions, refresh rates, and orientations. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | - macOS |
| 8 | - `displayplacer` CLI tool (will prompt to install if missing) |
| 9 | |
| 10 | ## Workflow |
| 11 | |
| 12 | ### Step 1: Ensure displayplacer is Installed |
| 13 | |
| 14 | Check if displayplacer is available: |
| 15 | |
| 16 | ```bash |
| 17 | command -v displayplacer || echo "NOT_INSTALLED" |
| 18 | ``` |
| 19 | |
| 20 | If not installed, offer to install: |
| 21 | |
| 22 | ```bash |
| 23 | brew install displayplacer |
| 24 | ``` |
| 25 | |
| 26 | ### Step 2: Discover Connected Displays |
| 27 | |
| 28 | Run displayplacer to get full display information: |
| 29 | |
| 30 | ```bash |
| 31 | displayplacer list |
| 32 | ``` |
| 33 | |
| 34 | Parse and present the displays in a clear format: |
| 35 | |
| 36 | ``` |
| 37 | I found these displays: |
| 38 | |
| 39 | 1. [Type] - [Size] inch |
| 40 | - Current: [resolution] @ [hz]Hz |
| 41 | - Rotation: [degrees] |
| 42 | - Position: [origin] |
| 43 | |
| 44 | 2. ... |
| 45 | ``` |
| 46 | |
| 47 | Identify each display by: |
| 48 | - Serial screen ID (persistent across reboots) |
| 49 | - Type (MacBook built-in, external) |
| 50 | - Size (27 inch, 32 inch, etc.) |
| 51 | |
| 52 | ### Step 3: Interview About Physical Setup |
| 53 | |
| 54 | Ask about the physical arrangement: |
| 55 | |
| 56 | 1. "Which monitor is in front of you (center)?" |
| 57 | 2. "What's to your left? Right?" |
| 58 | 3. "Are any monitors rotated vertically (portrait mode)?" |
| 59 | 4. "Roughly how far do you sit from your displays? (helps determine optimal resolution)" |
| 60 | |
| 61 | ### Step 4: Interview About Use Case |
| 62 | |
| 63 | Ask about primary use: |
| 64 | |
| 65 | 1. "What do you primarily use this setup for?" |
| 66 | - Programming/code reading |
| 67 | - Video editing/media production |
| 68 | - General productivity |
| 69 | - Gaming |
| 70 | - Mixed use |
| 71 | |
| 72 | 2. "Do you prefer maximum sharpness (smaller text) or comfortable readability (larger text)?" |
| 73 | |
| 74 | 3. "Is smooth scrolling important to you? (120Hz vs 60Hz)" |
| 75 | |
| 76 | ### Step 5: Analyze and Recommend |
| 77 | |
| 78 | Based on the interview, reference `references/resolution_guidelines.md` for optimal settings. |
| 79 | |
| 80 | Consider: |
| 81 | - **4K displays**: Can run at native 4K, scaled 1440p, or scaled 1080p |
| 82 | - **Portrait orientation**: Use `degree:90` or `degree:270` depending on cable exit preference |
| 83 | - **Refresh rates**: Prioritize 120Hz for programming/gaming if available |
| 84 | - **Main display**: Set the center/primary monitor as main with `origin:(0,0)` |
| 85 | |
| 86 | Present the recommendation: |
| 87 | |
| 88 | ``` |
| 89 | Based on your setup, I recommend: |
| 90 | |
| 91 | Center (32" Dell): 3840x2160 @ 120Hz - Main display |
| 92 | → Maximum 4K sharpness, smooth scrolling |
| 93 | |
| 94 | Left (27" Dell): 1800x3200 @ 60Hz portrait |
| 95 | → Vertical for code reading, high resolution |
| 96 | |
| 97 | Right (MacBook): 1512x982 @ 120Hz |
| 98 | → Native Retina scaling |
| 99 | |
| 100 | Want me to apply this configuration? |
| 101 | ``` |
| 102 | |
| 103 | ### Step 6: Apply Configuration |
| 104 | |
| 105 | Construct and execute the displayplacer command: |
| 106 | |
| 107 | ```bash |
| 108 | displayplacer \ |
| 109 | "id:[DISPLAY_ID] res:[WIDTH]x[HEIGHT] hz:[REFRESH] color_depth:8 enabled:true [scaling:on] origin:([X],[Y]) degree:[ROTATION]" \ |
| 110 | "id:[DISPLAY_ID] ..." \ |
| 111 | "id:[DISPLAY_ID] ..." |
| 112 | ``` |
| 113 | |
| 114 | Key parameters: |
| 115 | - `id:` - Use persistent screen ID for reliability |
| 116 | - `res:` - Resolution (check available modes in displayplacer list) |
| 117 | - `hz:` - Refresh rate |
| 118 | - `scaling:on` - Enable HiDPI scaling (omit for native resolution) |
| 119 | - `origin:` - Position relative to other displays |
| 120 | - `degree:` - Rotation (0, 90, 180, 270) |
| 121 | |
| 122 | ### Step 7: Verify and Save Profile |
| 123 | |
| 124 | After applying, verify the configuration: |
| 125 | |
| 126 | ```bash |
| 127 | displayplacer list | grep -E "(Serial screen id|Resolution:|Origin:|Rotation:)" |
| 128 | ``` |
| 129 | |
| 130 | Offer to save as a reusable profile: |
| 131 | |
| 132 | ```bash |
| 133 | mkdir -p ~/.config/display-profiles |
| 134 | ``` |
| 135 | |
| 136 | Create a shell script for the profile: |
| 137 | |
| 138 | ```bash |
| 139 | #!/bin/bash |
| 140 | # Profile: [name] |
| 141 | # [description] |
| 142 | |
| 143 | displayplacer \ |
| 144 | "id:... res:... hz:... ..." |
| 145 | |
| 146 | echo "Profile [name] applied" |
| 147 | ``` |
| 148 | |
| 149 | Optionally add shell aliases for quick switching. |
| 150 | |
| 151 | ## Troubleshooting |
| 152 | |
| 153 | ### Monitor Shows Upside Down |
| 154 | Change rotation from `degree:90` to `degree:270` or vice versa. |
| 155 | |
| 156 | ### Resolution Mode Not Found |
| 157 | Some resolutions require `scaling:on`, others don't. Check the available modes in `displayplacer list` output and match exactly. |
| 158 | |
| 159 | ### Display IDs Changed |
| 160 | Use serial screen IDs (start with 's') instead of persistent IDs for more reliability, or use contextual IDs with the `--contextual` flag. |
| 161 | |
| 162 | ### Portrait Resolution Format |
| 163 | When rotated, specify resolution in portrait format: `1080x1920` instead of `1920x1080`. |
| 164 | |
| 165 | ## Example Session |
| 166 | |
| 167 | ``` |
| 168 | User: optimize my monitors |
| 169 | |
| 170 | Claude: Let me check your connected displays... |
| 171 | [runs displayplacer list] |
| 172 | |
| 173 | I found 3 displays: |
| 174 | 1. MacBook Pro 16" - Built-in Liquid Retina XDR |
| 175 | 2. Dell S3225QS - 32" 4K @ 120Hz capable |
| 176 | 3. Dell U2720Q - |