extend-theme

extend-theme is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 50 tokens per session (1,283 once invoked), scanned A, original, MIT.

A guide for adding or changing colors and text styles in a Flutter design system. It requires updating the shared theme definitions across light, dark, and high-contrast variants.

In plain words
What is it for?
Use it to add color tokens, change typography, update theme extensions, and expose styles through the project's context-based design tokens.
Why use it?
It prevents a design change from being added to only one theme or from bypassing the project's shared styling system. This keeps components consistent across display modes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add color tokens, change typography, update theme extensions, and expose styles through the project's context-based design tokens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anoopsg/agent_rules/extend-theme
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add anoopsg/agent_rules --skill extend-theme
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for extend-theme

README.md
[![agentmods](https://agentmods.dev/badge/skills/anoopsg/agent_rules/extend-theme/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/extend-theme)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/extend-theme"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/extend-theme/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for extend-theme

Your own site · 80×15
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/extend-theme"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/extend-theme.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,283 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01283
Opus 5.5 $0.00020 $0.00513
Sonnet 5.5 $0.00010 $0.00257
Haiku 4.5 $0.00005 $0.00128

Measured 22d ago against content hash 71506dff2c98, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

extend-theme scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/exclusive/skills/extend-theme/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Theme Extension Skill

This skill defines the process for adding or modifying a design token in packages/app_ui's theme system, which is built on two ThemeExtensions — AppColors and AppTextTheme — each implemented in four variants.

1. Structure

packages/app_ui/lib/src/
├── colors/
│   ├── app_colors.dart                    # Base ThemeExtension: fields, copyWith, lerp
│   ├── app_colors_light.dart
│   ├── app_colors_dark.dart
│   ├── app_colors_high_contrast_light.dart
│   └── app_colors_high_contrast_dark.dart
├── typography/
│   ├── app_text_theme.dart                # Base ThemeExtension: fixed M3 type scale
│   └── text_theme_native.dart
└── themes/
    ├── app_theme.dart                     # Composes colors + textTheme into ThemeData
    ├── app_theme_light.dart
    ├── app_theme_dark.dart
    ├── app_theme_high_contrast_light.dart
    └── app_theme_high_contrast_dark.dart

The tree shows the shape, not a live inventory: list the color variants with ls packages/app_ui/lib/src/colors/ and the typography presets with grep -rl "extends AppTextTheme" packages/app_ui/lib/src/typography.

Access at the call site is always through the context.$ shorthand (packages/app_ui/lib/src/tokens/app_tokens.dart), never Theme.of(context).extension<...>() directly:

context.$.colors.primary
context.$.style.bodyLarge

2. Adding a New Color Token

There is no per-variant token map — AppColors is a fixed constructor with one field per token, so a new token must be added to every layer:

  1. app_colors.dart (base class): add the field, the constructor parameter, the copyWith parameter + fallback, and the lerp entry (Color.lerp(fieldName, other.fieldName, t)!). Every list must be updated together or the extension breaks.
  2. Each of the 4 variant files (app_colors_light.dart, app_colors_dark.dart, app_colors_high_contrast_light.dart, app_colors_high_contrast_dark.dart): supply a concrete Color value for the new field in the super(...) call.
  3. Pick values by role, not by copying an existing color — check whether an existing token already fits before adding a new one (a new token is for a genuinely new semantic role, e.g. warning/onWarning, not a one-off shade).
  4. Add tokens in pairs: a surface color comes with its content color (<x> + on<x>, e.g. warning + onWarning), added together.
  5. Confirm with the user before adding a new token, especially one suggested by a design (see the design-to-code skill) — name, role and values for all four variants.

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago Changed · +9 lines · +4 tokens per session 71506dff2c98
  2. 3mo ago First seen · 107 lines · 46 tokens per session scan A 6e6980315d2f

Subscribe to this mod's changes

extend-theme is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 50 tokens to every session and 1,283 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

extend-theme compared with skills from other repositories

extend-theme next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
extend-themeanoopsg/agent_rulesSkill223d agoMITA50Claude Code, Codex
web-design-guidelinesAsyrafHussin/agent-skillsSkill111todayMITA71Claude Code
ui-craftafaraha8403/balakitSkill19d agoMITA137Claude Code
marketing-psychologyafaraha8403/balakitSkill19d agoMITA106Claude Code
webgl-holographic-foilnexu-io/open-designSkill110ktodayApache-2.0A41Claude Code, Codex
html-ppt-hermes-cyber-terminalnexu-io/open-designSkill110ktodayApache-2.0A53Claude Code, Codex
html-ppt-taste-brutalistnexu-io/open-designSkill110ktodayApache-2.0A78Claude Code, Codex