/stylebot:stylebot [site] [what to change]from Stylebot
Restyles websites using the Stylebot browser extension's CLI — applies dark modes, themes, fonts, layout fixes, and manages saved CSS profiles per site.
Ships in Stylebot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Stylebot is a browser extension that saves custom CSS per site and applies it every time the site loads. The stylebot command drives it in the user's running browser: it opens and reads pages, saves CSS that applies live, checks the page after each save, and takes screenshots. stylebot --help lists every command, and stylebot <command> --help describes one.
Read and check pages only through stylebot, never another browser tool (browser automation, a screenshot tool, fetching the url). The page Stylebot styles can be in a different browser or profile from the one those tools see, so what they report won't reflect the CSS you saved.
stylebot command per shell command, exactly as written here: no cd, &&, ;, pipes, $(...), < or heredocs. Those need the user's approval each time, while the user can allow plain stylebot commands once.~/.stylebot/work/: CSS as ~/.stylebot/work/<site>.css, screenshots as ~/.stylebot/work/<site>-1.png, -2.png and so on, where the user can allow reading and writing once. Write files with your file-writing tool, never the shell.The first command sets the CLI up with the user's browsers on its own. When a command can't reach Stylebot, or says the CLI and Stylebot don't match, its message names the one thing to do, such as turning on the setting, opening or restarting the browser, or updating Stylebot or the CLI. Tell the user the message as it is, and try again once they say it's done.
To see everything that's left, run stylebot install: it prints a checklist. Tell the user each step not yet done (marked ○) as written.
When a command says Stylebot is running in several browsers, it lists them, each with a name and the page it shows. Ask the user which one to change, offering each as a choice by its browser and page, with your tool for asking the user a question if you have one. Then pass --browser <name> with the name from the list to every stylebot command after, so all your changes go to that browser. Ask again only if a command says that browser is gone.
If stylebot isn't found, the CLI isn't installed: tell the user to install it with npm install -g @stylebot/cli, as https://stylebot.dev/cli describes.
stylebot open <site or url> shows it in Stylebot's own window, behind the user's, without taking focus. It prints Opened <tab> <url> (or Found when it reuses a tab). Pass that tab id to every command, both those that read the page (stylebot outline <tab>, --tab <tab> for commands that take selectors, stylebot screenshot <tab>) and those that change its style (stylebot css rule <tab>, stylebot profiles <tab>): they act on the style that page shows, and the commands that save CSS check that page. Never rely on the active tab: the user can switch tabs while you work, and commands that change a style refuse to guess.stylebot suggestions <tab>: up to two requests chosen from what's on the page, plus a creative look. Offer their names as choices, with your tool for asking the user a question if you have one, and an option for something else. Carry out the chosen suggestion's full request text.stylebot profiles <tab> to list the profiles of the page's style, with the one in use starred.
stylebot profile use "<profile>" <tab> if it isn't starred, so the page shows your changes. Don't create a new one. If no profile matches the name, ask which they meant.stylebot profile create "<your name>: <look>" <tab> --from <profile in use> --use, with your own short name and the look in a word or two ("Claude: Dark", "Codex: Compact"). Your changes go there, and the user's own style stays one stylebot profile use <profile> <tab> away. If that profile already exists from an earlier session, reuse it with stylebot profile use.--profile "<profile>" to every css get, css rule, css add, css diff and css set, naming the profile you picked, never relying on the profile in use: the user can switch profiles while you work, and without it you'd read or overwrite a different style.stylebot outline <tab> prints its visible elements and how each looks. stylebot css-variables <tab> prints its CSS variables. stylebot css get <tab> --profile "<profile>" prints the CSS already saved; build on it rather than starting over unless the user asks for a fresh start. Once you know what's there, read only the part you need with --grep <text>, such as a selector or a color, which prints just the rules whose selector or declarations contain it, rather than the whole stylesheet again.
stylebot hover <tab> <selector>, then read the outline again. A point works in place of a selector, as x,y in the pixels of a full screenshot of the tab at the default scale. Hovering doesn't apply the page's CSS :hover.stylebot screenshot <tab> --state hover --on '<selector>' --selector '<selector>' -o ~/.stylebot/work/<site>-<n>.png shoots it hovered, and stylebot force <tab> '<selector>' <state> keeps it forced (hover, active, focus, focus-visible, focus-within) so outline and computed-styles show it, until stylebot force <tab> --clear.stylebot inspect <tab> <x,y> prints the selector Stylebot's inspector would pick for the element at that point of a full screenshot, then other selectors for it with how many elements each matches: choose the one whose reach fits what the user asked to change.stylebot css rule <tab> '<selector>' --set color=#e8e6e3 --set 'font-size=16px' --profile "<profile>". It edits the first top-level rule with exactly that selector, or creates it at the end; --media '<query>' picks the rule inside that @media, --unset <property> removes a declaration and --delete the rule. Prefer it for every small fix: the rest of the stylesheet stays exactly as it was.~/.stylebot/work/<site>-add.css and run stylebot css add <tab> --file ~/.stylebot/work/<site>-add.css --profile "<profile>", which adds them at the end. When it says a selector already had a rule, fold the new declarations into that rule with css rule instead.~/.stylebot/work/<site>.css and save it with stylebot css set <tab> --file ~/.stylebot/work/<site>.css --profile "<profile>", which replaces the whole stylesheet: the file must hold what was there and should stay, plus your changes. To see what it would change first, run stylebot css diff <tab> --file ~/.stylebot/work/<site>.css --profile "<profile>", which saves nothing.--verbose lists them all), the rules you removed, text your CSS made hard to read, surfaces a theme change missed, and selectors built on class names the site generates. Fix it with css rule and save again until the report is clean:
tr:first-child td matches the first row of every table): narrow it or take it back rather than recoloring text everywhere.stylebot profile use.stylebot screenshot <tab> --selector '<selector>' -o ~/.stylebot/work/<site>-<n>.png (or a region with --clip x,y,w,h); it's quicker and smaller than the whole page. Take a full stylebot screenshot <tab> -o ~/.stylebot/work/<site>-<n>.png for the final look. Open each image and look at it; never report a change you haven't seen. Run stylebot outline <tab> again too: it shows the colors and sizes as they are now, so it confirms a selector took effect and catches dark text on a dark background. After a theme or color change, check the hover and focus states too, with screenshot --state or force and outline, on a row or link, a button and a field: a site's own :hover and :focus rules often bring back white backgrounds, unreadable text or bright focus rings. Fix what's off and repeat.stylebot done to close Stylebot's window.stylebot profile use <their profile> <site> (or the profile menu in Stylebot) switches back. Don't paste the CSS unless they ask.Empty CSS deletes the site's style. Confirm with the user before deleting a style or a profile they made themselves.
In CLI mode the user works with you from the page: they connect a tab, and a small terminal on it shows each command you run there and each save, with an undo. They mark areas of the page by dragging over them, and write notes to you about them. One tab is connected at a time; while you wait for one, the user's other tabs offer to connect.
stylebot watch with no tab, with a tool that runs it in the background and wakes you on each line it prints (Monitor in Claude Code, for example). It prints waiting for a tab: … until the user connects one, then attached tab <tab> <url>: pass that tab id to every command after. It then prints a line as the user marks (mark ① area 230×140), writes a note (note "…" about ① (screenshot <png>)), navigates, or edits the style outside the CLI, and mode off or tab closed when they disconnect, after which it waits for a tab again. If you can't wake on output, loop on stylebot selection --wait instead, which also waits for a tab to be connected.stylebot mode <tab>: it brings the tab to the front with the terminal open.1 new note on tab <tab> (run stylebot selection). stylebot selection <tab> then prints each note with its marks, each with its box and the elements it holds (with match counts), and the path of a screenshot of the marked area; then the marks not yet sent with a note. Add --crop for a screenshot of each of those. A note watch printed counts as read and won't show in selection again: work from its screenshot, and find the elements with stylebot outline <tab> or stylebot inspect <tab> <x,y>. Open each screenshot and look at it before changing anything.stylebot say <tab> "<what you did>", as well as in chat. Until you answer, the terminal shows you as working on it.stylebot done while CLI mode is on, since it closes Stylebot's window and any connected tab in it. When the user asks to stop, stylebot mode <tab> --off disconnects the tab.[bgcolor] attribute when it has one (that's its own background, so no bg repeats it; select by it, as in td[bgcolor="#ff6600"], when nothing else picks the element out), a snippet of its own text, then in brackets how it looks where that differs from its parent. bg is its own background color, bg-image a background image or gradient, color its text color, font its text size, family the font it sets.pad and margin as CSS shorthand, lh its line-height as a multiple of its font size, h its rendered height; a container of such items shows its flex or grid gap. Size spacing changes from these. Making a list compact means h should shrink: lower lh (toward 1.2), and the pad, margin and gap that are above 0; never add any, and leave what is already 0.(page), is the page's base background, text color, size and font. An element without bg shows whatever is behind it.bg, the dark color that won't read on a new background, the small font that should grow.stylebot page-rules <selector> --tab <tab> prints the site's own rules for the elements a selector matches: match or outdo their selectors where specificity matters, and build on the values already there.stylebot computed-styles <selector> [property...] --tab <tab> prints computed values on the first element a selector matches, for exact sizes, colors and fonts.stylebot match-count <selector...> --tab <tab> prints how many elements each selector matches, to try a selector before saving it.Quote selectors in single quotes: stylebot match-count '.titleline > a' --tab 1234.
:nth-child chains. Keep selectors as short as they can be while still matching the right elements.div, span, section, article, p or *: a background on div paints over every card and panel at once. Name the specific elements instead.!important unless the user has turned that off for the site, so don't add it yourself.font-family to that one family with no fallback stack (font-family: Lora, not font-family: Lora, Georgia, serif), quoted only if the name has spaces.family in the outline doesn't inherit a font set on body. To change the font everywhere, override the page's font variables when it has them, and otherwise set it on body and on each element that shows its own family; leave code and monospace alone unless asked.Always check the page's CSS variables first (stylebot css-variables <tab>). Many sites define their palette as custom properties, and overriding a variable recolors everything that uses it consistently, including states and parts not in the outline. Set the variable itself on the selector it's listed under (:root or body), and only set colors on individual elements when no variable covers what the user asked for, or to fix an element that doesn't follow the variables.
body, and on html when the (page) background comes from it.bg that would clash, with its own selector, and give it a matching color if its text would no longer read.color on the containers that hold text, not on every element. Links, headings and buttons that set their own color need theirs too.fill or stroke. Set color-scheme on :root so scrollbars and native controls follow.Keep text readable: light text on dark backgrounds or the reverse, never dark on dark, and a contrast of at least 4.5.
When asked to surprise the user, pick one coherent direction, a palette and a font pairing, and say in a sentence what you're going for: the colors, the fonts and the feel.
When the user wants a theme in both light and dark, one that follows their system's appearance, or to merge a light and a dark profile into one, write a single style that carries both.
First check whether the site has its own light/dark mode: a theme or appearance toggle in the outline, or rules under a theme class or attribute on html or body (.dark, [data-theme='dark'], [data-color-mode]) or under @media (prefers-color-scheme: dark) in stylebot page-rules html --tab <tab> and stylebot page-rules body --tab <tab>. Rules under a theme class only show while that theme is on, so a toggle in the outline is the surer sign.
When it has one, follow the site's mode. Write the dark variant under the site's own selector or media query, and leave out Stylebot's switch: two switches that disagree would confuse the user. You can only check the variant the page is showing, so tell the user the other wasn't checked, and that the style follows the site's own theme setting. Offer Stylebot's switch instead, for when the site's setting needs an account or they'd rather pick light or dark in Stylebot. Declare at the top of the CSS that the style covers both, so the gallery can say so when it's published:
/* ==Stylebot==
@modes light, dark
==/Stylebot== */
When the user asks to pick light or dark in Stylebot, or the site has no mode of its own, declare Stylebot's switch as below. Stylebot then shows a Mode control (System, Light, Dark) for it in the popup, and sets data-stylebot-scheme on <html> to the choice.
Put the declaration at the top of the CSS, in place of any @modes line. The last word is the default; use system unless the user asked for one variant by default:
/**
* ==Stylebot==
* @option scheme select [system, light, dark] system
* ==/Stylebot==
*/
Define every color once, as a variable on :root holding both variants with light-dark(<light>, <dark>), and use only those variables in the rest of the CSS. Then let the choice pin the variant:
:root {
color-scheme: light dark;
--paper: light-dark(#f7f4ec, #1c1b19);
--ink: light-dark(#2b2b33, #dcdbe2);
}
:root[data-stylebot-scheme='light'] {
color-scheme: light;
}
:root[data-stylebot-scheme='dark'] {
color-scheme: dark;
}
Check both variants, since a save's check and screenshots only see the one showing. Run stylebot options <tab> --profile "<profile>" first to note the value it's set to. Then for each of light and dark: run stylebot option set scheme <value> <tab> --profile "<profile>", write what stylebot css get <tab> --profile "<profile>" prints to ~/.stylebot/work/<site>.css and save it with css set --verbose so its check runs on that variant, and take a screenshot. Fix what either variant reports, in the variable's light or dark half.
Set the scheme back to the value you noted, since it's the user's choice: stylebot option set scheme <value> <tab> --profile "<profile>".
When you tell the user what changed, mention the Mode switch in Stylebot's popup for picking System, Light or Dark.
When a profile you're updating already declares scheme, keep the declaration and both variants, and check both after your changes.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ankit/stylebot --plugin stylebotOther plugins' skills for the same job