The tasks AI makes worth doing

For fifteen years I've built a custom Chrome theme at every company I've worked at, and always built it badly, because it was never worth doing well. This time AI made it the best version I've shipped, for the same one evening of work. The theme is trivial. The category of task it unlocks isn't.

I’ve built a custom Chrome theme at almost every company I’ve worked at or run. Fifteen years of it. It’s a small ritual with two real jobs: a little internal team branding, and a way to tell my three-plus Chrome profiles apart at a glance so I stop pasting a work link into a personal window. Each profile gets the company’s colors. The window tells me where I am before I read anything on the screen.

And for fifteen years I built it badly. Pick a few hex codes by eye, hardcode them into a theme manifest, sideload it, forget it. Within a quarter the real brand had moved and my theme hadn’t. It was never worth doing properly, so I never did. It was a cheap, slightly embarrassing pleasure, and it was never worth doing properly, so I never did. Worth doing, not worth doing well. That gap is the whole post.

#The same evening, a different result

This time the theme is the best one I’ve ever made, and it took the same one evening. The difference is that none of the colors are typed by hand. They come from the stylesheet the product itself ships, and each build checks the result against a schema, a contract written with the Zod library.

They sync from the app’s live design-system tokens, the same stylesheet the product itself ships, with a newer AI-accent palette layered in from the design team’s Figma. Each build checks the result against a schema, a contract written with the Zod library. The whole path runs at build time:

app design tokens  +  Figma accents
  -> map to Chrome theme keys
  -> validate against a Zod contract   (a renamed token fails the build, loudly)
  -> sign with its own key, self-host
  -> managed browsers poll and auto-update

The Zod contract 1 means a malformed theme can’t ship; the signed, self-hosted extension reaches the team’s managed browsers through the Workspace admin console 2 , so one merge updates every browser within a poll window. Dark and light variants, calendar-versioned releases, a CI pipeline that mirrors the main app’s. About four hundred lines of TypeScript, no bundler, no runtime, no permissions. The artifact is four kilobytes of color; the pipeline around it is the entire point.

Two sources, the app's design tokens and the Figma accents, both feed the step that maps them to Chrome theme keys. A Zod contract validates the result; a renamed token fails the build loudly. Valid themes are signed with the project's own key and self-hosted, and managed browsers poll and auto-update.

Two token sources fan in; a Zod contract gates the build; signed and self-hosted, it reaches every managed browser on the next poll.

I could always build the theme. What changed is the ratio: an evening of work that now maintains itself instead of decaying in a quarter.

#Where each color comes from

A sync script reads the app’s global stylesheet and keeps very little of it: the light and dark blocks, and inside those only the plain hex declarations for the nine tokens the theme maps. It skips rgba() values, var() references and every other token, so most upstream churn can’t break it. The output is a small JSON file with nine colors per mode.

The AI accents are a second file, and I maintain that one by hand. The app doesn’t ship those colors yet, so the file holds six values copied from Figma with the source nodes written next to them. It retires when the accents land in the app’s stylesheet and the sync picks them up.

One mapping file decides which token paints which browser surface. Each variant sets 19 of Chrome’s color keys.

13 of the dark theme's 19 colors come from app tokens; 4 are typed by hand

Unit chart of the 19 Chrome color keys the dark variant sets. 13 take their value from the app's synced tokens: the frame, toolbar, omnibox, new tab page, and text and icons. 2 come from the Figma accent file: new-tab links and the button background. 4 are constants typed by hand: the inactive frame, the two incognito frames and inactive-tab text.

One square for each Chrome color key the dark variant sets.

So “none of the colors are typed by hand” has four exceptions in the dark variant. Chrome has surfaces the app’s design system has no token for: the inactive window frame, the incognito frame in both states, and the text on inactive tabs. Those are constants in the mapping file, tuned during local testing. The light variant adds a fifth. At its brand value the accent came out around 4.4:1 as link text on the light surface, under the 4.5:1 WCAG AA line, so the link uses a slightly darker version at about 5.3:1.

The sync, as pseudocode. It runs once for the light block and once for the dark block:

wanted = the nine custom properties the theme maps:
         background, foreground, card, secondary, primary,
         primary foreground, muted, accent, link

find this mode's block in the stylesheet; if it's missing: stop with an error
for each declaration in the block whose value is a plain hex color:
    if its property is in wanted: keep it, lowercased
    otherwise: skip it
return the colors found for this mode

The source is a local path, a raw URL, or a sibling checkout of the app, in that order.

A renamed token never reaches the Zod contract. The sync prints a warning that names the missing token, then writes the file without it. The next build throws a TypeError in the hex-to-RGB conversion, one step before the manifest is assembled, so it still fails loudly.

#What the build checks and what it only reports

The build converts each hex value to the RGB integer array Chrome expects, assembles the manifest, and parses it against the contract before writing it. It also rasterizes the emblem into 16, 48 and 128 pixel icons and emits the JSON schema from the same contract.

Two checks only warn. A color key outside the set current Chrome honors gets a warning, because Chrome silently ignores unknown keys. And the build prints a WCAG contrast ratio for five text-and-surface pairs per variant. That report never fails the build, so a low ratio is mine to catch by reading it.

The preview image on the showcase page is a mock browser window painted from each variant’s real color values. Headless Chrome doesn’t render browser chrome, so there’s no screenshot to take.

The contract, as pseudocode. What it rejects: a color channel outside 0-255, a tint outside -1 to 1, a manifest version other than 3, a version string that isn’t one to four dot-separated integers.

color      three integers, each 0 to 255
tint       three numbers, each -1 to 1 (-1 means no change)

theme      colors: any key -> color           required
           tints, images, properties          optional

manifest   manifest version: exactly 3
           name: not empty
           version: one to four dot-separated integers
           description, icons, schema link    optional
           theme: as above

The color map is open on purpose. The list of 23 known keys lives beside the schema and only drives the warning. The build ends by generating a JSON schema from the same contract, the file editors use for autocomplete.

Versions are YYYY.WW.NNN: ISO year, ISO week, and a three-digit counter within the week, read from the existing git tags. Chrome wants plain integers, so the build strips the zero padding before the version goes into the manifest and a counter of 001 ships as 1.

#Signing, hosting and the admin policy

Each variant is signed with its own RSA key, because Chrome derives an extension’s ID from its key and the two themes need distinct, stable IDs. The keys live as CI secrets, and the runbook says to keep an offline copy of both. Losing one would change that theme’s ID and break updates for everyone who already has it installed.

The repo is private and Chrome fetches updates unauthenticated, so the signed package and the update manifest are served from a public static site, next to a small showcase page.

The admin console’s form offers two install modes: force install, which applies a theme and locks it, and allow, which leaves each person to opt in. A third mode, installed by default but still switchable, exists only in the raw JSON policy. The policy reaches managed profiles only, so a personal profile on the same laptop never gets the theme.

The extension ID comes from the public key, as pseudocode:

take the public key in its DER encoding
hash it with SHA-256 and keep the first 16 bytes
write those bytes as 32 hex digits
swap each digit for a letter: 0 becomes a, 1 becomes b, up to f becomes p

The update manifest follows Chrome’s documented update format, with one entry per variant:

dark variant     extension ID, package URL, current version
light variant    extension ID, package URL, current version

The package URL carries no version; the version attribute tells Chrome when to fetch again.

The JSON policy for the third install mode is one ExtensionSettings entry per extension ID. The dark theme’s entry sets installation_mode to normal_installed, points update_url at the self-hosted update manifest and sets override_update_url to true. The light theme’s entry sets installation_mode to allowed, with the same update URL. override_update_url tells Chrome to use the self-hosted URL instead of also checking the Web Store. Changing normal_installed to force_installed makes the dark theme mandatory.

#What one merge means

Every push to main updates a single open release pull request with the next calendar version and a changelog entry built from the commit subjects. Merging that pull request is the release. CI restores the keys, builds and signs both variants, tags the commit, regenerates the update manifest and deploys the site. Managed browsers see a higher version at their next poll, a few hours by the runbook’s estimate, and pull the new package. Nobody touches the admin console per release.

Token sync is the step that doesn’t run by itself. The job that re-reads the app’s stylesheet and opens a pull request when the tokens have drifted runs when I trigger it. A weekly schedule sits in the workflow file, commented out.

The whole release is one script chain, and CI runs the same five steps:

build -> preview -> pack -> update manifest -> site

The publish job runs on any push to main whose commit message starts with the release prefix, and exits early if a release with that tag already exists.

#The math that never closed

The capability was never the blocker. The token sync, the validation contract, the signing key, the managed-deploy pipeline: none of it is new technology, and none of it was beyond me on any given Tuesday of the last decade. What stopped me was the ratio. The good version cost a week of fiddly plumbing to save a quarter of drift, and that math never closed. So I shipped the bad version, every time, for fifteen years.

AI closed the math. The fiddly plumbing I’d never spend a week on is the kind of scaffolding a model writes in an afternoon: wire the token extraction, sketch the validation schema, stand up the signing and the release CI, fix the parts that break. The evening of taste, picking the colors, deciding which token paints which surface, stayed mine. The week of plumbing that always killed it collapsed to a couple of hours of review. The honest cost is that the pipeline is now a small thing that can break, one I have to keep alive. I’ll take that trade every time: a maintenance surface I understand over a manual chore I’ll always skip.

The git log shows which parts broke. The first commit, the whole pipeline at once, landed at 9:24 PM, and the last commit of the night at 10:38.

Four fixes and two releases in the 74 minutes after the first commit

Timeline of one evening's 11 commits. The first commit lands at 9:24 PM. Four fixes follow at 9:41, 9:45, 9:48 and 9:55 PM. Automated release commits land at 9:43 and 10:22 PM. Four documentation and showcase-site changes land at 10:07, 10:21, 10:25 and 10:38 PM.

The theme repo's git log for its first evening, 11 commits. Squares are the automated release commits.

All four fixes were in the release path and none were in the theme:

  • The first release pull request wouldn’t cut until the version baseline was reset.
  • The publish job had to trigger on a push to main, because the hosting environment’s branch policy requires deploys to come from the default branch.
  • The two preview images needed distinct file names as release assets.
  • The signed packages first went out as release assets on a private repo, where Chrome can’t download them. They moved to the public site.

One of the doc changes records a trap. Double-clicking the signed package gives a CRX_REQUIRED_PROOF_MISSING error on Mac and Windows, which looks like a packaging bug. The package is fine: Chrome blocks hand-installed packages that lack a Web Store signature, and the policy path accepts a developer-signed one. For a local preview I load the unpacked folder.

It’s bigger than one theme. Everyone has a list of small tools like it, personal or team, that were always worth building and never worth the effort. AI lowers the bar far enough that a pile of them clears it at once.

It’s bigger than one theme. Everyone has the same list, personal or team:

  • the script that renames every junk screenshot into something you can search
  • the one page that pulls your scattered data into a view instead of six tabs
  • the commit-message linter for the repo only you touch
  • the migration that pays back in two quarters and never gets prioritized

The value is real. They don’t get built because the effort never clears the bar. AI lowers the bar far enough that a pile of them clears it at once.

Not everything on my list got the pipeline. My personal theme, the one that matches this site, is still a single hand-written manifest loaded unpacked on one machine. Its README tells me to re-derive the colors by hand if the site’s palette changes.

So the question I find more useful than “what can AI build for me” is the quieter one underneath it: what was always worth doing that I finally get to do? The Chrome theme is a silly answer. The list behind it isn’t.

Notes

  1. The validation contract is a Zod schema that doubles as the single source of truth: it both gates the build and generates the manifest JSON-schema for editor autocomplete. The output is a standard Chrome theme manifest, color keys and tints, no code. ↩
  2. Self-hosting a signed extension and pushing it to managed browsers is a documented Google Workspace flow: an enterprise policy points at a self-hosted updates.xml, and managed Chrome instances poll it and auto-update. See Google's Chrome Enterprise extension management docs. No Web Store listing, no review queue, own keys, own domain. ↩