kernel-ui AGENTS.md

Development instructions for kernel-ui, a monorepo—a single repository containing several related packages—for a component library built with standard HTML elements. It covers project conventions and release requirements.

In plain words
What is it for?
Building components, organizing changes across the React, Elements, Styles, and CLI packages, and preparing pull requests for release.
Why use it?
It helps contributors follow the repository’s rules, including adding a Changeset when published packages change so releases are not missed.

Instructions file for CodexOpenCode

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 instructions/kemiljk/kernel-ui/agents-md
Clone the repo
git clone --depth 1 https://github.com/kemiljk/kernel-ui

Made for: Codex, OpenCode.

Per session 3,368 This file is loaded in full into every session.
When invoked 3,368 The same file — it is already loaded in full.
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.03368 $0.03368
Opus 5 $0.01684 $0.01684
Sonnet 5 $0.00674 $0.00674
Haiku 4.5 $0.00337 $0.00337

Measured 2d ago against content hash 4ceac615bd32, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kernel-ui AGENTS.md 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.

AGENTS.md · 219 lines

How it starts

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

Working in this repo

This is a monorepo for a component library built on real semantic HTML. Read README.md for the project pitch. This file is operational guidance for anyone (human or agent) making changes here.

Release checklist for pull requests

Any PR that changes a publishable package under packages/react, packages/elements, packages/styles, or packages/cli must include a .changeset/<descriptive-name>.md file describing the affected package(s) and the release level (patch, minor, or major). Run bunx changeset to create it. Docs-only changes do not need a Changeset. CI enforces this rule; the only exception is the Changesets-generated Version Packages release PR.

When creating a PR, never leave the Changeset decision implicit: add the file or explicitly confirm that the PR is docs-only/non-publishable. A merged PR without a Changeset will not produce an npm or GitHub release.

For consuming the published packages, don't read this file — read packages/react/llms.txt or packages/elements/llms.txt instead; they're the API reference. This file is about building the library, not using it.

The one rule that matters most: build every component twice

Every component ships in both @kernelui-lib/react (packages/react/src/components/<Name>/) and @kernelui-lib/elements (packages/elements/src/components/<Name>/) — a React version and a framework-free Custom Element version, with matching visual design and equivalent props/attributes. Adding a component to only one package is an incomplete PR, not a smaller one. Before considering any new component done, grep both packages/react/src/index.ts and packages/elements/src/index.ts for its export.

Repo layout

  • packages/react@kernelui-lib/react. Each component: <Name>.tsx + <Name>.module.css, exported from src/index.ts in shipping order (not alphabetical — new exports go at the end, before the polymorphic utils export block).
  • packages/elements@kernelui-lib/elements. Each component: <Name>.ts (extends KernelElement from ../../base, registers via customElements.define) + <Name>.css, exported from src/index.ts. CSS class names use kernelClass("Name", "part"), which produces the exact same class names React's CSS Modules compile to (see packages/react/vite.config.ts's generateScopedName) — this is deliberate, so one set of component styles serves both packages.
  • packages/styles@kernelui-lib/styles. Design tokens (tokens.css) and reset (reset.css). Both packages' components read tokens from here; never hardcode a color/spacing/radius value in a component's own CSS.
  • apps/docs — Astro docs site. Each component needs: an entry in packages/registry (re-exported by apps/docs/src/data/components.ts), a page at src/pages/components/<slug>.astro, and src/components/demos/<Name>Demo.tsx + <Name>Playground.tsx. Copy the structure of an existing page (text-field.astro/scroll-area.astro are good recent examples) rather than inventing a new layout.
  • packages/registry — shared component catalog consumed by docs, CLI, and LLM asset generation. Run bun run build there after changing entries.
  • packages/cli@kernelui-lib/cli. Published integration CLI (kernel init, kernel doctor, kernel docs).

Read the full file on GitHub · 219 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 · 219 lines · 3,368 tokens per session scan A 4ceac615bd32

Subscribe to this mod's changes

kernel-ui AGENTS.md is an instructions file published in the GitHub repository kemiljk/kernel-ui (23 stars, last pushed 4d ago), licensed MIT. It adds 3,368 tokens to every session, about $0.0168 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-30.

Related

Other instructions, from other repositories

animal-island-ui AGENTS.md

AGENTS.md instructions for guokaigdg/animal-island-ui, covering agents.md — working in this repository, read first, by task, verification, content that must be kept in sync and ground rules.

guokaigdg/animal-island-ui · 1,116 tokens

animal-island-ui CLAUDE.md

Claude Code instructions for guokaigdg/animal-island-ui, a project described as: Animal Crossing-style React UI component library, inspired by Nintendo's game visuals Vue version available. Animal 风格的 React 组件库 灵感来源于任天堂《集合啦!动物森友会》 Vue 版同步发布.

guokaigdg/animal-island-ui · 5 tokens

www-sacred AGENTS.md

Instructions for internet-development/www-sacred, covering agents.md, what this repo is, repo map, conventions and the fonts menu previews.

internet-development/www-sacred · 3,243 tokens

starwind-ui AGENTS.md

Instructions for starwind-ui/starwind-ui, covering agents.md, project shape, useful commands and contribution conventions.

starwind-ui/starwind-ui · 701 tokens

monochrome-ui AGENTS.md

Instructions for vaneenige/monochrome-ui, covering agents.md, north stars (non-negotiables), why the core looks weird (and should stay weird), clever tricks and code style.

vaneenige/monochrome-ui · 7,211 tokens

ns-ui AGENTS.md

Instructions for nikolas-sapa/ns-ui, covering agents.md — working inside this repo, structure, autoplay — how a card demonstrates itself, descriptor schema and driver constraints (don't regress these).

nikolas-sapa/ns-ui · 6,237 tokens