corner-diagonals — Claude Code skill: chamfered UI corners
A skill for diagonal-cut corners and chamfered edges on buttons, cards and panels. Useful when a UI needs sharp geometry instead of rounded pills.
npx skills add MengTo/Skills --skill corner-diagonals -a claude-codeWhat corner-diagonals does
The skill ships CSS tokens and ready clip-path: polygon(...) shapes that cut corners on buttons, cards, panels and container shells. Inside are --corner-cut-sm/md/lg variables (8px, 14px, 24px), line and fill colors, and three base silhouettes: all corners cut, top-left plus bottom-right, top-right plus bottom-left. For bordered surfaces it uses a .cut-shell wrapper with an inner layer that inherits the same polygon through clip-path: inherit.
Separate patterns cover primary and secondary buttons, including a gradient outline and a visible focus state. Cut size is meant to scale with the component: 6–10px for small controls, 12–18px for cards, 20–32px for large panels. Buttons keep a 44px minimum height, which is about touch targets rather than looks.
The catch is that clip-path trims the border and the hit area along with the background. Leave a rectangular border or an invisible click zone and the silhouette still reads, but the button gets harder to hit. The skill lists this under what to avoid: clipping only the background while borders and hit areas stay rectangular. It also warns against mixing rounded pills and chamfered geometry in one layer without a clear hierarchy.
What it helps with
- cut corners off a button with
clip-path - build a framed panel with two chamfered corners
- keep one cut size across every card
- preserve a 44px touch target on a clipped button
- make focus states visible around a clipped shape
Example prompts for the agent
- Make a button with chamfered top-left and bottom-right corners, 8px cut
- Build a card with a border using
.cut-shell, 14px cut on two corners - Check that clipped buttons still keep 44px height and a visible focus ring
How to install corner-diagonals
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill corner-diagonals -a claude-code2Manually: put the files in place
~/.claude/skills/corner-diagonals/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/corner-diagonals/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill corner-diagonals -a codex2Manually: put the files in place
.agents/skills/corner-diagonals/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill corner-diagonals -a cursor2Manually: put the files in place
.cursor/skills/corner-diagonals/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MengTo/Skills corner-diagonals2Manually: put the files in place
.github/skills/corner-diagonals/SKILL.md1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill corner-diagonals -a gemini-cli2Platform CLI
gemini skills install https://github.com/MengTo/Skills --path agent-skills/web-design/corner-diagonalsManually: put the files in place
.devin/skills/corner-diagonals/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MengTo/Skills --skill corner-diagonals -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about corner-diagonals
How do I install corner-diagonals in Claude?
Run npx skills add MengTo/Skills --skill corner-diagonals -a claude-code. The skill lands at ~/.claude/skills/corner-diagonals/SKILL.md.
What does corner-diagonals do?
It hands the agent CSS tokens and polygons for diagonal-cut corners on buttons, cards, panels and container shells. Button patterns with a gradient outline and focus state come with it.
How is this different from border-radius?
border-radius rounds a corner; this builds the silhouette with clip-path: polygon(...) and cuts it straight. Because of that the clip trims the border and the click area too, so borders and hit zones have to follow the same geometry.
Source text
SKILL.md · MIT
---
name: corner-diagonals
description: Apply diagonal-cut corners and chamfered edges to buttons, cards, panels, and container shells. Use when a design needs precise geometric framing, sci-fi UI surfaces, clipped-corner controls, or engineered sharp containers instead of rounded pills or plain rectangles.
---
# Corner Diagonals
## Scope
- Apply only to buttons, cards, panels, and container shells.
- Use when surfaces need diagonal-cut corners or chamfered edges.
- Keep the hit area readable and usable even when the visual shape is clipped.
- Reuse the same corner logic across surfaces so it feels like a system.
## Visual Target
- Diagonal cuts should feel engineered, sharp, and intentional.
- Cuts stay subtle and proportional to the component size.
- One or more corners can be chamfered, but the silhouette should still read quickly.
- Use diagonal corners as a repeated structural motif, not a one-off trick.
## Cut Tokens
```css
:root {
--corner-cut-sm: 8px;
--corner-cut-md: 14px;
--corner-cut-lg: 24px;
--corner-line: rgba(255, 255, 255, 0.18);
--corner-line-strong: rgba(255, 255, 255, 0.34);
--corner-fill: rgba(10, 14, 24, 0.82);
--corner-accent: #8b5cf6;
}
```
## Core Shapes
Use `clip-path: polygon(...)` for true diagonal silhouettes.
```css
.cut-all {
--cut: var(--corner-cut-md);
clip-path: polygon(
var(--cut) 0,
calc(100% - var(--cut)) 0,
100% var(--cut),
100% calc(100% - var(--cut)),
calc(100% - var(--cut)) 100%,
var(--cut) 100%,
0 calc(100% - var(--cut)),
0 var(--cut)
);
}
.cut-top-left-bottom-right {
--cut: var(--corner-cut-md);
clip-path: polygon(
var(--cut) 0,
100% 0,
100% calc(100% - var(--cut)),
calc(100% - var(--cut)) 100%,
0 100%,
0 var(--cut)
);
}
.cut-top-right-bottom-left {
--cut: var(--corner-cut-md);
clip-path: polygon(
0 0,
calc(100% - var(--cut)) 0,
100% var(--cut),
100% 100%,
var(--cut) 100%,
0 100%,
0 0
);
}
```
## Bordered Shell
For bordered surfaces, use an outer wrapper and inner surface with the same polygon.
```css
.cut-shell {
--cut: var(--corner-cut-md);
--border-size: 1px;
position: relative;
padding: var(--border-size);
background: linear-gradient(135deg, var(--corner-line-strong), transparent 46%, var(--corner-line));
clip-path: polygon(
var(--cut) 0,
100% 0,
100% calc(100% - var(--cut)),
calc(100% - var(--cut)) 100%,
0 100%,
0 var(--cut)
);
}
.cut-shell__inner {
min-height: 100%;
padding: clamp(16px, 2.4vw, 28px);
background: var(--corner-fill);
clip-path: inherit;
}
```
```html
<section class="cut-shell">
<div class="cut-shell__inner">
...
</div>
</section>
```
## Button Pattern
```css
.cut-button {
--cut: var(--corner-cut-sm);
position: relative;
display: inline-flex;
min-height: 44px;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 18px;
border: 0;
color: white;
background: linear-gradient(135deg, var(--corner-accent), color-mix(in srgb, var(--corner-accent), black 28%));
clip-path: polygon(
var(--cut) 0,
100% 0,
100% calc(100% - var(--cut)),
calc(100% - var(--cut)) 100%,
0 100%,
0 var(--cut)
);
}
.cut-button:hover {
filter: brightness(1.08);
}
.cut-button:focus-visible {
outline: 2px solid color-mix(in srgb, var(--corner-accent), white 45%);
outline-offset: 3px;
}
```
## Secondary Button
Use a darker shell with diagonal outline treatment.
```css
.cut-button-secondary {
--cut: var(--corner-cut-sm);
color: white;
background:
linear-gradient(var(--corner-fill), var(--corner-fill)) padding-box,
linear-gradient(135deg, var(--corner-line-strong), transparent 58%, var(--corner-accent)) border-box;
border: 1px solid transparent;
clip-path: polygon(
var(--cut) 0,
100% 0,
100% calc(100% - var(--cut)),
calc(100% - var(--cut)) 100%,
0 100%,
0 var(--cut)
);
}
```
## Recommended Patterns
- Primary buttons: clipped hex-like or chamfered rectangles with one consistent cut amount.
- Secondary buttons: dark shells with diagonal outline treatment and restrained hover fill.
- Cards and panels: thin framed containers with one or two diagonal corners.
- Large sections: diagonal-corner inner blocks nested inside straight outer frames for hierarchy.
- Mirrored pairings: top-left plus bottom-right, or top-right plus bottom-left.
## Tuning Knobs
- Cut size: `6px-10px` for small controls, `12px-18px` for cards, `20px-32px` for large panels.
- Border treatment: use a thin stroke, gradient shell, or inset line to make the silhouette legible.
- Consistency: reuse the same polygon family across buttons and containers.
- Accent: reserve bright color for primary controls, hover borders, or focal states.
- Motion: brighten fills, reveal borders, or slide overlays; keep the shape stable.
## Avoid
- Random cut sizes across similar components.
- Aggressive clipping that harms readability or makes the component feel broken.
- Mixing rounded pills and chamfered geometry without clear hierarchy.
- Clipping only the background while borders and hit areas stay rectangular.
- Flooding every diagonal surface with a bright accent color.
## Quick Checks
- Border, background, and hit area follow the same diagonal geometry.
- Text still has comfortable horizontal padding after the cut.
- Buttons keep at least `44px` height for touch targets.
- Repeated components use the same `--cut` scale.
- Focus states remain visible around the clipped shape.
© MengTo · MIT · MengTo/Skills