kumo-astro / kumo-blocks
AGENTS.md4 starsChanged 9 months agoMITView on GitHub
This file provides essential context for AI agents working in this project. kumo-blocks (@cloudflare/kumo-blocks) is an Astro-based site that showcases a library of UI template blocks — similar in concept to shadcn/ui blocks. Each block is a higher-order UI pattern (e.g. Auth, Dashboard, Hero) built using @cloudflare/kumo-astro components. This package lives inside the kumo-workspace monorepo at packages/kumo-blocks/. Component library: @cloudflare/kumo-astro — Astro components (no React required), built on top of @cloudflare/kumo (React) and Base UI. This is a pnpm workspace…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ci/AGENTS.mdAGENTS.md
- packages/kumo/AGENTS.mdAGENTS.md
- packages/kumo-astro/AGENTS.mdAGENTS.md
- packages/kumo-docs-astro/AGENTS.mdAGENTS.md
- packages/kumo-figma/AGENTS.mdAGENTS.md
- packages/kumo-figma/src/generators/AGENTS.mdAGENTS.md
- packages/kumo-screenshot-worker/AGENTS.mdAGENTS.md
- packages/kumo/src/components/AGENTS.mdAGENTS.md
- packages/kumo-studio/AGENTS.mdAGENTS.md
- index-knowledgeSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 78
All setup is in src/styles/global.css:
- Distinctive: line 104
Always use kumo semantic tokens for color, background, and border — never raw Tailwind color utilities.
- Very specific: line 118
Use cn() from @cloudflare/kumo-astro/utils.
- Very specific: line 171
Create a page at src/pages/blocks/<category>.astro
- Very specific: line 172
Use <Layout> as the wrapper
- Very specific: line 174
Add the route to src/data/nav.ts under the "Blocks" section
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides essential context for AI agents working in this project.
Project Overview
kumo-blocks (@cloudflare/kumo-blocks) is an Astro-based site that showcases a library of UI template blocks — similar in concept to shadcn/ui blocks. Each block is a higher-order UI pattern (e.g. Auth, Dashboard, Hero) built using @cloudflare/kumo-astro components.
This package lives inside the kumo-workspace monorepo at packages/kumo-blocks/.
Component library: @cloudflare/kumo-astro — Astro components (no React required), built on top of @cloudflare/kumo (React) and Base UI.
Monorepo Context
This is a pnpm workspace (kumo-workspace). Always run commands from the workspace root (/path/to/kumo-astro/) or use --filter to target this package:
# From workspace root
pnpm --filter @cloudflare/kumo-blocks dev
pnpm --filter @cloudflare/kumo-blocks build
# Or from this package directory directly
pnpm dev
pnpm build
pnpm previewThe workspace uses Node ^24.12.0 and pnpm >=10.21.0. Do not use npm or yarn.
Workspace packages used by this project:
@cloudflare/kumo-astro—workspace:*— the Astro component library@cloudflare/kumo—workspace:*(transitive) — provides design tokens and CSS
Tech Stack
| Technology | Version | Notes |
| Astro | 6.x | Static site framework |
| Tailwind CSS | ^4 | CSS-first config via catalog |
@cloudflare/kumo-astro | workspace:* | Astro component library |
@cloudflare/kumo | workspace:* | CSS/tokens (no React used here) |
@phosphor-icons/web | ^2.1.2 | Icon font library |
| TypeScript | strict | Extends astro/tsconfigs/strict |
Project Structure
packages/kumo-blocks/
├── src/
│ ├── components/ # Shared Astro components (BlockCard, Icon, Sidebar)
│ ├── data/ # Typed static data (nav.ts)
│ ├── layouts/ # Root layout shell (Layout.astro)
│ ├── pages/ # Astro pages — index.astro + /blocks/* pages
│ └── styles/
│ └── global.css # Tailwind entry + kumo styles + base layer
├── public/ # Static assets
├── astro.config.mjs
├── package.json
└── tsconfig.jsonBlock category pages live at /blocks/<category> (e.g. /blocks/auth, /blocks/hero). Nav data is in src/data/nav.ts.
Tailwind
Tailwind v4 is configured entirely in CSS — there is no tailwind.config.js.
All setup is in src/styles/global.css:
@import "tailwindcss"— loads Tailwind@plugin "@tailwindcss/typography"— typography plugin@import "@cloudflare/kumo/styles"— kumo design tokens + component styles@theme { ... }— custom font stack (Inter)@custom-variant dark (...)— dark mode viadata-mode="dark"attribute
Kumo-Astro Component Usage
A detailed skill guide is available at
../../.opencode/skills/kumo-usage/SKILL.md. Load it before writing any kumo component code.
Blocks are built using @cloudflare/kumo-astro components — these are .astro files, no React required.
Imports
---
import Button from "@cloudflare/kumo-astro/components/button";
import { cn } from "@cloudflare/kumo-astro/utils";
---Design Tokens
Always use kumo semantic tokens for color, background, and border — never raw Tailwind color utilities.
bg-kumo-base text-kumo-default border-kumo-line
bg-kumo-overlay text-kumo-subtle border-kumo-subtle
bg-kumo-brand text-kumo-inverseDark Mode
Dark mode is automatic through kumo's light-dark() CSS tokens. There are no dark: prefixes — set data-mode="dark" on an ancestor element to activate dark mode.
Class Merging
Use cn() from @cloudflare/kumo-astro/utils. Never use clsx directly or template literals:
---
import { cn } from "@cloudflare/kumo-astro/utils";
const { class: className } = Astro.props;
---
<div class={cn("base-class", className)} />Static Classes Only
Tailwind classes must be static strings — no dynamic class construction:
<!-- Correct -->
const sizeMap = { sm: "text-sm", lg: "text-lg" };
<div class={sizeMap[size]} />
<!-- Wrong -->
<div class={`text-${size}`} />Icons
Icons come from @phosphor-icons/web (not /react — this is Astro, not React). Always use the Icon wrapper component — never import the CSS or use <ph-*> tags directly:
---
import Icon from "../components/Icon.astro";
---
<Icon name="house" />
<Icon name="arrow-right" weight="bold" />
<Icon name="star" weight="fill" size={24} />
<Icon name="warning" weight="duotone" size="1.5rem" class="text-kumo-brand" />Icon props:
| Prop | Type | Default | Description |
name | string | required | Phosphor icon name (e.g. "house", "arrow-right") |
weight | "regular" | "thin" | "light" | "bold" | "fill" | "duotone" | "regular" | Icon weight variant |
size | string | number | — | Font size (number → px, string → verbatim) |
class | string | — | Additional CSS classes |
The component lives at src/components/Icon.astro. It renders an <i> with the correct .ph / .ph-{weight} and .ph-{name} classes, and handles all weight CSS imports internally.
Adding a Block
- Create a page at
src/pages/blocks/<category>.astro - Use
<Layout>as the wrapper - Build using
@cloudflare/kumo-astrocomponents and kumo design tokens - Add the route to
src/data/nav.tsunder the"Blocks"section
Key Constraints
- No raw Tailwind color utilities — use kumo tokens (
bg-kumo-base,text-kumo-subtle, etc.) - No
dark:class prefixes — dark mode is automatic via tokens - No dynamic Tailwind class strings — keep all classes as static literals
- No React — use
@cloudflare/kumo-astrocomponents, not@cloudflare/kumoReact components - pnpm only — do not use npm or yarn
- TypeScript strict mode — all new code should be typed
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

