Guide · Agent skill
How to use the CSS Alpha Masking agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The css-alpha-masking skill is a set of instructions that lets an AI agent write CSS which fades the edges of an element to transparent using a linear gradient mask. It is aimed at front-end developers and designers who want a scrolling list, image strip, text block or container to fade out at its left, right, top or bottom edge without creating extra image assets. After reading this guide you will know how to install the skill, how to ask for an edge fade in plain language, and what to check before using the CSS it produces.
Quick start
- 1Download the ZIP. Get the css-alpha-masking ZIP from this directory page.
- 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
- 4Describe the fade in plain words. Ask for an edge fade, alpha mask or CSS mask gradient, naming the element and the direction.
- 5Check the CSS includes both properties. Confirm the output contains mask-image and -webkit-mask-image with the same linear-gradient.
- 6Adjust the fade. Ask for changes to direction, fade stops or strength, then apply the CSS and test it on an element with visible content.
What does the skill make the agent do?
When the skill is active, the agent writes CSS that applies mask-image to an element with a linear-gradient. A horizontal fade runs along the left and right edges; a vertical fade runs along the top and bottom edges. The skill's standard example makes the first and last parts of the element transparent and keeps the middle fully visible, with the fade ending at 15% and starting again at 85%.
The skill always includes the -webkit-mask-image version next to the standard property so the effect also works in Safari. On request, the agent can change the fade direction, the depth of the fade (the stop percentages) and the strength of the fade (for example, using a semi-transparent colour instead of fully transparent for a softer effect).
The skill only produces CSS snippets and asks clarifying questions when details are missing. It does not run code and does not contact external services.
How do you install the css-alpha-masking skill?
Download the ZIP for the skill from this directory page and unzip it. The skill folder contains SKILL.md, which holds the instructions, and a demo folder with demo/index.html and demo/PROMPT.md.
To install it for yourself across projects, unzip it into ~/.claude/skills/. To install it for a single project, unzip it into that project's .claude/skills/ folder.
If you use the Claude apps instead, you can upload the skill under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
How do you trigger the skill with a natural request?
You do not need a special command. Describe the effect you want in ordinary words. The skill's description mentions alpha masks, fade edges and CSS mask gradients, so requests using those ideas are the most likely to load it.
The skill's own demo prompts refer to it as $css-alpha-masking, so naming it that way can make the intent explicit. Good requests state the direction, the element and, if you know them, the fade width.
- Fade the left and right edges of this image carousel to transparent.
- Add an alpha mask fade to the top and bottom of this scrolling list.
- Use a CSS mask gradient so this text container fades out at the bottom.
- Use $css-alpha-masking to make the edges of this card fade horizontally, 10% on each side.
What does a typical result look like?
For a horizontal fade, the agent gives a rule like the one below. It is a copy of the skill's example, and you add it to any element that has visible content.
Ask for small tweaks afterwards, such as a different direction or stop positions. The skill's workflow is to confirm the direction and fade stops, give the snippet and any class usage, then offer small adjustments only.
mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
-webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);What does the skill need, and is it safe to use?
The skill lists no requirements. It does not run scripts and does not use the network, so it only shapes the agent's written CSS. You still review and apply the CSS in your own project.
Be aware of the limits. The mask only reveals or hides alpha that already exists, so the element needs visible content behind the fade. The skill's pitfalls section warns that masks will not show on an element with overflow: hidden if there is no visible content behind it. The skill also only adds the standard and -webkit- prefixed versions, so it is not aimed at very old browsers without mask-image support.
- Requirements: none listed
- Runs scripts: no
- Uses network: no
- Give the element visible content; a mask cannot create content.
- Forgetting -webkit-mask-image breaks the Safari version.
What tips help you get better results?
Tell the agent whether the content is an image, text or a container background, because the skill asks this when specs are missing. State the fade width in percentages if you have a target, since the stop positions control how deep the fade is.
For a softer look, ask for a semi-transparent colour in place of transparent. Check the result in Safari as well as your main browser, because the prefixed property is the one that matters there.
- Name the direction: to right, to left, to top or to bottom.
- Specify fade depth in percent (the default example uses 15% and 85%).
- Ask for rgba(0,0,0,0.2) style colours for a gentler fade.
What people use it for
- Fading the left and right edges of an image or card strip so items appear to slide in and out.
- Softening the top and bottom of a scrolling list or long text container.
- Creating an edge fade on a container background without adding an extra image file.
- Prototyping soft edge treatments on hero images or product thumbnails in a landing page.
Frequently asked questions
How do I install the css-alpha-masking skill?
Download the ZIP from this directory page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.
Is the css-alpha-masking skill free?
The skill is published under the MIT licence. The source does not state any price, so check the directory page for the current terms of use.
Does the skill require anything else to run?
The skill lists no requirements. It does not run scripts and does not use the network, so it only supplies instructions for writing CSS.
Why does my fade not show up?
The mask only reveals or hides existing alpha, so the element needs visible content behind it. The skill's pitfalls section warns that the effect will not show on an element with overflow: hidden but no visible content.
Why is the Safari version missing or broken?
Make sure both mask-image and -webkit-mask-image are present with the same gradient. The skill always includes the prefixed version for Safari, and omitting it is listed as a common pitfall.
Can I use this instead of a gradient image file?
Yes, that is the purpose of the skill. It creates the fade with a CSS linear-gradient mask, so you do not need an extra image asset for the edge effect.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are a front-end developer or designer who needs quick, standard CSS edge fades on images, lists, text or containers, and you are happy to review and test the output yourself. Pick a different approach if you must support very old browsers without mask-image support, or if your element has no visible content for the mask to reveal or hide.
Download the skill