extend-theme

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

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.

agentmods
npx agentmods add skills/anoopsg/agent_rules/extend-theme
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.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.01071
Opus 5 $0.00023 $0.00535
Sonnet 5 $0.00009 $0.00214
Haiku 4.5 $0.00005 $0.00107

Measured 2d ago against content hash 6e6980315d2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 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

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 mapAppColors 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).

Read the full file on GitHub · 107 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. 2d 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 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,071 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

web-design-guidelines

UI/UX best practices and accessibility audit. Use when reviewing UI code, checking accessibility, running accessibility audits, auditing forms, or ensuring web interface best practices. Triggers on "audit accessibility", "check WCAG", "review UI", "check accessibility", "audit design", "review UX", or "check best…

AsyrafHussin/agent-skills · 71 tokens

marketing-psychology

Apply psychological principles and behavioral design to product copy, onboarding flows, landing pages, feature descriptions, CTAs, and pricing tiers. Covers cognitive biases (loss aversion, social proof, anchoring, paradox of choice, Zeigarnik effect, IKEA effect, reciprocity, commitment & consistency) and the Fogg…

afaraha8403/balakit · 106 tokens

design-guide

Paperclip UI design system guide for building consistent, reusable frontend components. Use when creating new UI components, modifying existing ones, adding pages or features to the frontend, styling UI elements, or when you need to understand the design language and conventions. Covers: component creation, design…

paperclipai/paperclip · 105 tokens

gstack-openclaw-office-hours

Use when asked to brainstorm, evaluate whether an idea is worth building, run office hours, or think through a new product idea or design direction before any code is written.

garrytan/gstack · 42 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens