css

css is an agent for OpenCode from anomalyco/opencode. It costs 9 tokens per session (969 once invoked), scanned A, original, MIT.

Agent "css" from anomalyco/opencode, covering example of correct implementation, reusable components and key clarifications.

Agent for OpenCode

Written for OpenCode: installed under .opencode/.

About the project

OpenCode is an open-source AI coding agent that helps developers work on software projects. It includes agents for full-access development, read-only exploration and planning, plus a general subagent for complex searches and multistep tasks; the catalogue add-ons extend its workflows.

anomalyco/opencode · 204,765 stars · on GitHub · opencode.ai

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 agents/anomalyco/opencode/css
Clone the repo
git clone --depth 1 https://github.com/anomalyco/opencode

Made for: OpenCode.

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 css

README.md
[![agentmods](https://agentmods.dev/badge/agents/anomalyco/opencode/css.svg)](https://agentmods.dev/agents/anomalyco/opencode/css)
Your own site
<a href="https://agentmods.dev/agents/anomalyco/opencode/css"><img src="https://agentmods.dev/badge/agents/anomalyco/opencode/css.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00009 $0.00969
Opus 5 $0.00005 $0.00485
Sonnet 5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

Measured today against content hash 2e17787bad0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

css 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 today.

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.

packages/console/app/.opencode/agent/css.md · 150 lines

How it starts

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

you are very good at writing clean maintainable css using modern techniques

css is structured like this

[data-page="home"] {
  [data-component="header"] {
    [data-slot="logo"] {
    }
  }
}

top level pages are scoped using data-page

pages can break down into components using data-component

components can break down into slots using data-slot

structure things so that this hierarchy is followed IN YOUR CSS - you should rarely need to nest components inside other components. you should NEVER nest components inside slots. you should NEVER nest slots inside other slots.

IMPORTANT: This hierarchy rule applies to CSS structure, NOT JSX/DOM structure.

The hierarchy in css file does NOT have to match the hierarchy in the dom - you can put components or slots at the same level in CSS even if one goes inside another in the DOM.

Your JSX can nest however makes semantic sense - components can be inside slots, slots can contain components, etc. The DOM structure should be whatever makes the most semantic and functional sense.

It is more important to follow the pages -> components -> slots structure IN YOUR CSS, while keeping your JSX/DOM structure logical and semantic.

use data attributes to represent different states of the component

[data-component="modal"] {
  opacity: 0;

  &[data-state="open"] {
    opacity: 1;
  }
}

this will allow jsx to control the styling

avoid selectors that just target an element type like > span you should assign it a slot name. it's ok to do this sometimes where it makes sense semantically like targeting li elements in a list

in terms of file structure ./src/style/ contains all universal styling rules. these should not contain anything specific to a page

./src/style/token contains all the tokens used in the project

./src/style/component is for reusable components like buttons or inputs

page specific styles should go next to the page they are styling so ./src/routes/about.tsx should have its styles in ./src/routes/about.css

about.css should be scoped using data-page="about"

Example of correct implementation

JSX can nest however makes sense semantically:

<div data-slot="left">
  <div data-component="title">Section Title</div>
  <div data-slot="content">Content here</div>
</div>

CSS maintains clean hierarchy regardless of DOM nesting:

[data-page="home"] {
  [data-component="screenshots"] {
    [data-slot="left"] {
      /* styles */
    }
    [data-slot="content"] {
      /* styles */
    }
  }

  [data-component="title"] {
    /* can be at same level even though nested in DOM */
  }
}

Read the full file on GitHub · 150 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. today First seen · 150 lines · 9 tokens per session scan A 2e17787bad0d

Subscribe to this mod's changes

css is an agent published in the GitHub repository anomalyco/opencode (204,765 stars, last pushed today), licensed MIT. It adds 9 tokens to every session and 969 once invoked, about $0.0000 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-09-06.

Related

Other agents, from other repositories

react18-class-surgeon

Class component migration specialist for React 16/17 → 18.3.1. Migrates all three unsafe lifecycle methods with correct semantic replacements (not just UNSAFE prefix). Migrates legacy context to createContext, string refs to React.createRef(), findDOMNode to direct refs, and ReactDOM.render to createRoot. Uses memory…

github/awesome-copilot · 81 tokens

frontend-dev

Frontend Developer (Aria Chen) - React, Next.js, TypeScript, accessibility, performance.

vibeeval/vibecosystem · 22 tokens

react-portfolio-engineer

React portfolio/gallery sites for creatives: React 18+, Next.js App Router, image optimization.

notque/vexjoy-agent · 25 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

pywry-builder

Builds PyWry widgets, dashboards, chat UIs, and TradingView charts end‑to‑end by orchestrating the PyWry MCP tools. Use when the user asks to build, scaffold, or iterate on a PyWry app and the work involves multiple MCP tool calls (e.g. create widget → populate data → add toolbar → wire events → export).

deeleeramone/PyWry · 81 tokens

nextjs-expert

Next.js framework strategist. Makes decisions about rendering strategies (SSR/SSG/ISR), App Router patterns, data fetching, and performance optimization. Use when designing Next.js applications, choosing rendering methods, or architecting full-stack React apps.

armanzeroeight/fastagent-plugins · 53 tokens