css-border-gradient — Claude Code skill: what it does, how to install
Applies refined gradient border treatments to cards, modals, and buttons in CSS or Tailwind. Useful when surfaces need subtle edge highlights without loud glowing outlines.
npx skills add MengTo/Skills --skill css-border-gradient -a claude-codeWhat css-border-gradient does
The skill provides CSS snippets and design guidelines for delicate borders on interface components. Instead of flat borders or intense neon glows, the agent builds quiet edge highlights at 135deg or 160deg angles. The standard border width is 1px; 2px is reserved for large hero panels or active states. Stop opacity stays below 0.4 so the border frames the content without overpowering it.
Three implementation techniques are included. The standard pattern combines two linear-gradient layers with padding-box and border-box alongside a transparent border. When an element already has a complex background image, a masked pseudo-element with mask-composite: exclude preserves the underlying graphics. A Tailwind shortcut also maps the properties into arbitrary utility classes.
The same alpha value rarely works for both light and dark themes. Contrast shifts between color modes, so border stops require separate tuning for dark and light surfaces.
What it helps with
- Highlight pricing cards with a subtle gradient edge
- Render a gradient border over complex backgrounds using CSS masks
- Construct Tailwind arbitrary utility classes for border highlights
- Style active tabs or focused buttons without loud glow effects
Example prompts for the agent
- Create a 1px subtle gradient border for a pricing card with a brand accent.
- Add a masked pseudo-element border to a modal without overwriting its background.
- Convert this gradient border treatment into Tailwind arbitrary utility classes.
How to install css-border-gradient
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill css-border-gradient -a claude-code2Manually: put the files in place
~/.claude/skills/css-border-gradient/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/css-border-gradient/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill css-border-gradient -a codex2Manually: put the files in place
.agents/skills/css-border-gradient/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill css-border-gradient -a cursor2Manually: put the files in place
.cursor/skills/css-border-gradient/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MengTo/Skills css-border-gradient2Manually: put the files in place
.github/skills/css-border-gradient/SKILL.md1Skills CLI (Vercel)
npx skills add MengTo/Skills --skill css-border-gradient -a gemini-cli2Platform CLI
gemini skills install https://github.com/MengTo/Skills --path agent-skills/web-design/css-border-gradientManually: put the files in place
.devin/skills/css-border-gradient/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MengTo/Skills --skill css-border-gradient -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 css-border-gradient
How do I install css-border-gradient in Claude Code?
Run npx skills add MengTo/Skills --skill css-border-gradient -a claude-code.
What does css-border-gradient do?
It instructs the coding assistant how to write subtle gradient borders using CSS and Tailwind. The instructions keep border accents quiet and prevent noisy rainbow gradients.
When should I use the masked pattern instead of padding-box?
Use the masked pseudo-element pattern when the container has an existing image or complex background that would be overwritten by a standard surface fill.
Source text
SKILL.md · MIT
---
name: css-border-gradient
description: Apply subtle gradient-border treatments for premium web surfaces. Use when cards, pricing panels, nav bars, modals, buttons, or hero surfaces need a refined edge highlight without a loud glow.
---
# Border Gradients
## Use When
- A surface needs a more premium edge than a flat `border`.
- Dark glass, pricing, hero, modal, or feature-card UI feels too plain.
- A hover or focus state needs a quiet brand accent.
## Defaults
- Width: `1px`; use `2px` only for large hero cards or active states.
- Radius: inherit the parent radius.
- Angle: `135deg` or `160deg`.
- Stops: neutral highlight, one brand accent, neutral fade.
- Opacity: keep most stops below `0.4`; subtle beats shiny.
## Simple CSS Pattern
Use this when the surface has a solid or translucent fill.
```css
.gradient-border {
--surface: rgba(10, 14, 24, 0.72);
--border-a: rgba(255, 255, 255, 0.34);
--border-b: rgba(125, 92, 255, 0.36);
--border-c: rgba(255, 255, 255, 0.08);
border: 1px solid transparent;
border-radius: 20px;
background:
linear-gradient(var(--surface), var(--surface)) padding-box,
linear-gradient(135deg, var(--border-a), var(--border-b), var(--border-c)) border-box;
}
```
```html
<div class="gradient-border">
...
</div>
```
## Masked Pattern
Use this when the surface already has a complex background that should not be overwritten.
```css
.gradient-border-mask {
position: relative;
border-radius: 20px;
}
.gradient-border-mask::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
padding: 1px;
background: linear-gradient(
145deg,
rgba(255, 255, 255, 0.34),
rgba(125, 92, 255, 0.36) 45%,
rgba(255, 255, 255, 0.08)
);
-webkit-mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
```
## Tailwind Shortcut
Use arbitrary properties for one-off surfaces.
```html
<div class="rounded-2xl border border-transparent [background:linear-gradient(rgba(10,14,24,.72),rgba(10,14,24,.72))_padding-box,linear-gradient(135deg,rgba(255,255,255,.34),rgba(125,92,255,.36),rgba(255,255,255,.08))_border-box]">
...
</div>
```
## Taste Rules
- Apply to one hierarchy level at a time: primary card, active tab, selected plan, or hero panel.
- Do not use rainbow borders, full-saturation neon, or animated gradients by default.
- Keep the border quieter than the content. It should frame, not compete.
- Pair with restrained depth: a soft shadow or inner highlight is enough.
- Check light and dark themes separately; the same alpha rarely works for both.
## Quick Checks
- No double border from an existing `border-color`.
- Radius matches the surface exactly.
- The gradient is visible at normal zoom but barely noticeable when scanning.
- Focus states remain accessible and do not rely only on the gradient.
© MengTo · MIT · MengTo/Skills