Agent skill

Frontend Patterns

by KbWen in KbWen/agentic-os

Apply frontend conventions when components, pages, forms, or client state change.

MITAuto-check passedFrontend & Design

Install Frontend Patterns

skills CLI
$ npx skills add KbWen/agentic-os --skill frontend-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KbWen/agentic-os frontend-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/KbWen/agentic-os.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/frontend-patterns .claude/skills/frontend-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
frontend-patterns
GitHub stars
206
Token cost
~1.2k tokens
SKILL.md length
500 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Apply frontend conventions when components, pages, forms, or client state change.

  • Frontend & Design work in your project
  • SKILL.md covers When to Apply, Conventions, Checklist and Heading-Scoped Read Note, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Frontend Patterns is an agent skill from KbWen/agentic-os. Apply frontend conventions when components, pages, forms, or client state change.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Frontend & Design. The repository describes itself as: Governance framework for AI coding agents. It runs them through a five-step workflow (plan, build, review, test, ship) where no step counts as done without evidence. Drop-in… The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/frontend-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit 81a4034. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Frontend Patterns loads about 1.2k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 500 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from KbWen/agentic-os at commit 81a4034, republished under its MIT licence (© KbWen). 500 words, ~1,213 tokens.

Download SKILL.mdSave it as .claude/skills/frontend-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
frontend-patterns
description
Apply frontend conventions when components, pages, forms, or client state change.
<!-- This is a SCAFFOLD skill -->

Frontend Patterns

When to Apply

  • Classification: feature, architecture-change (if touching UI)
  • Phase: /implement (component design & build), /review (pattern compliance), /test (UI state coverage)
  • Trigger: Task involves creating or modifying UI components, pages, routes, or client-side state

Conventions

Customize after /app-init: Replace these generic conventions with your project's ADR and framework-specific patterns.

Component Structure
  • One component per file
  • Component file name matches export name (PascalCase)
  • Co-locate component-specific styles, tests, and types
  • Separate page-level components from reusable UI components
Suggested Directory Pattern
src/
├── components/        # Reusable UI components (Button, Modal, Card)
│   └── <Name>/
│       ├── <Name>.tsx
│       ├── <Name>.test.tsx
│       └── index.ts
├── pages/             # Page-level components (route targets)
│   └── <PageName>/
│       ├── <PageName>.tsx
│       ├── components/ # Page-specific components (not reusable)
│       └── hooks/      # Page-specific hooks
├── hooks/             # Shared custom hooks
├── services/          # API client functions
├── stores/            # State management (if applicable)
├── types/             # Shared TypeScript types
└── utils/             # Pure utility functions
State Management Principles
  • Local state first: useState/useReducer for component-specific state
  • Lift state up only when sibling components need it
  • Global state (store) only for truly app-wide state: auth, theme, user preferences
  • Server state (API data) managed by data-fetching library (React Query, SWR, etc.) — NOT in global store
  • Never duplicate server state in client store
Data Fetching
  • Centralize API calls in services/ directory
  • Use data-fetching hooks (React Query, SWR, or equivalent) instead of raw fetch/axios in components
  • Handle loading, error, and empty states for every data-dependent component
  • Implement optimistic updates for better UX where appropriate
Form Handling
  • Use a form library for complex forms (React Hook Form, Formik, or equivalent)
  • Validate on client AND server (client validation is UX, server validation is security)
  • Show inline errors next to fields, not just at form top
  • Disable submit button during submission (prevent double-submit)
Error Handling
  • Global error boundary for unexpected crashes
  • Per-component error handling for expected failures (API errors)
  • User-friendly error messages (never show raw error objects)
  • Retry mechanism for transient failures (network errors)
Show full SKILL.md (249 more words)Show less

Checklist

During /implement:

  • Every data-dependent component handles: loading, error, empty, and success states
  • No business logic in components (extract to hooks or services)
  • No hardcoded strings (use constants or i18n keys)
  • Accessible: semantic HTML, aria labels on interactive elements, keyboard navigation
  • Responsive: works on mobile viewport (unless spec explicitly excludes mobile)
  • No direct API calls in components (use service layer)

During /review:

  • No prop drilling deeper than 2 levels (use context or composition)
  • No unnecessary re-renders (check memo/callback usage)
  • No sensitive data stored in localStorage/client state
  • Route guards for authenticated pages
  • Loading indicators for async operations

Heading-Scoped Read Note

For phase-entry loading, read only:

  • When to Apply
  • Checklist

Load Conventions, Anti-Patterns, and References on full read or cache miss only.

Anti-Patterns

  • God component: Component with 300+ lines doing everything. Split into smaller components.
  • Prop drilling: Passing props through 3+ levels of components. Use context or composition.
  • useEffect for everything: Using useEffect for derived state (use useMemo) or event handling (use event handlers).
  • Index as key: Using array index as React key in dynamic lists.
  • Fetch in render: Calling fetch/axios directly in component body or useEffect without a data-fetching library.
  • CSS-in-JS soup: Inline styles everywhere instead of consistent styling approach.
  • Ignoring empty state: Showing a blank page when data array is empty instead of a helpful message.
  • Alert/Console for errors: Using alert() or only console.error() instead of proper UI error handling.

References

  • Project ADR: docs/adr/ADR-002-project-architecture.md § Directory Structure, Naming
  • Spec template: .agentcortex/templates/spec-app-feature.md § Frontend
  • Security guardrails: .agent/rules/security_guardrails.md (A03: XSS prevention, A07: Auth)

© KbWen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/frontend-patterns of KbWen/agentic-os.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 81a4034

Compare with similar skills

Frontend Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Frontend Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frontend Patterns this skillKbWen/agentic-os206—~1.2kAutomated safety check: PassMIT
AI Elements Chat Componentsmweinbach/agent-coworker1565 repos~1.8kAutomated safety check: PassCustom licence
MintlifyArize-ai/phoenix12k8 repos~3.4kAutomated safety check: PassMIT
Building AI Chatancoleman/ai-design-components5261 repos~3.4kAutomated safety check: PassMIT
Eval Chatankit/stylebot1.6k—~1.1kAutomated safety check: PassMIT
Search Paramspromptfoo/promptfoo26k—~1.1kAutomated safety check: PassMIT

Similar skills

  • AI Elements Chat Components

    mweinbach/agent-coworker

    Adds AI Elements components such as conversations, messages, tool displays and prompt inputs to a Next.js project that uses shadcn/ui.

    156 GitHub starsUsed in 5 repos~1.8k tokens
    Frontend & DesignAuto-check passed
  • Mintlify

    Arize-ai/phoenix

    Build and maintain documentation sites with Mintlify. An agent skill from Arize-ai/phoenix.

    12k GitHub starsUsed in 8 repos~3.4k tokens
    Frontend & DesignAuto-check passed
  • Building AI Chat

    ancoleman/ai-design-components

    Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support.

    526 GitHub starsUsed in 1 repo~3.4k tokens
    Frontend & DesignAuto-check passed
  • Eval Chat

    ankit/stylebot

    Measure whether a change makes Chat's styling replies better, with yarn eval:chat — it runs styling requests on recorded real pages for two versions of Stylebot and measures on the page whether each…

    1.6k GitHub stars~1.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Search Params

    promptfoo/promptfoo

    URL search param and hash state management. An agent skill from promptfoo/promptfoo.

    26k GitHub stars~1.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Benchmark and profile the Dynamo frontend (dynamo.frontend HTTP + tokenizer + KV router) against mock workers (dynamo.mocker).

    8.2k GitHub stars~3.5k tokensUpdated today
    Frontend & DesignAuto-check: notes

More from KbWen/agentic-os

All 12 skills in this repo
  • API Design

    KbWen/agentic-os

    Design or review REST/GraphQL APIs when endpoints or contracts change.

    206 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Karpathy Principles

    KbWen/agentic-os

    Behavioral guidelines to reduce common LLM coding mistakes — Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution.

    206 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Production Readiness

    KbWen/agentic-os

    Use at review and ship, automatically for feature or architecture changes and on request for error handling, logging, crash reporting, or observability; verify errors reach production monitoring.

    206 GitHub stars~938 tokensUpdated yesterday
    Auto-check passed
  • Doc Lookup

    KbWen/agentic-os

    Check official docs when framework APIs or configuration may be version-sensitive.

    206 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: warnings
  • Systematic Debugging

    KbWen/agentic-os

    A skill your agent uses when investigating a bug, test failure, flaky test, unexpected behavior, or a hotfix, or an unexplained or failed fix; find the root cause first.

    206 GitHub stars~496 tokensUpdated yesterday
    Auto-check passed
  • Database Design

    KbWen/agentic-os

    Design schemas and migrations when persistent data structures change.

    206 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Questions about Frontend Patterns

What does Frontend Patterns do?

Apply frontend conventions when components, pages, forms, or client state change. Frontend Patterns is an agent skill from KbWen/agentic-os. Apply frontend conventions when components, pages, forms, or client state change.

When should I use Frontend Patterns?

Frontend Patterns fits situations like: frontend & Design work in your project.

How do I install Frontend Patterns in Claude Code?

Run `npx skills add KbWen/agentic-os --skill frontend-patterns -a claude-code`. Or copy the skill folder (.agents/skills/frontend-patterns in KbWen/agentic-os) into .claude/skills/frontend-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Frontend Patterns in Codex?

Run `npx skills add KbWen/agentic-os --skill frontend-patterns -a codex`. Or copy the skill folder (.agents/skills/frontend-patterns in KbWen/agentic-os) into .agents/skills/frontend-patterns in your project. Codex loads it when a task matches its description.

Can I use Frontend Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KbWen/agentic-os --skill frontend-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frontend-patterns, .gemini/skills/frontend-patterns, .github/skills/frontend-patterns and .opencode/skills/frontend-patterns in your project.

What does Frontend Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Frontend Patterns is instructions for the agent only.

Does Frontend Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Frontend Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Frontend Patterns use?

Frontend Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frontend Patterns use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Frontend Patterns?

Skills that share tags, products or a category with Frontend Patterns: AI Elements Chat Components (mweinbach/agent-coworker, 156 stars), Mintlify (Arize-ai/phoenix, 12k stars), Building AI Chat (ancoleman/ai-design-components, 526 stars) and Eval Chat (ankit/stylebot, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frontend Patterns?

KbWen (a GitHub user) maintains it in KbWen/agentic-os, which has 206 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

Source: KbWen/agentic-os on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.