Agent skill

Frontend Module Standards

by siteboon in siteboon/claudecodeui

Enforces one repository's React and TypeScript module layout for code under src/: source-root imports, feature barrels, deliberate exports and no deep imports.

AGPL-3.0Auto-check passedFrontend & Design

Install Frontend Module Standards

skills CLI
$ npx skills add siteboon/claudecodeui --skill frontend-module-standards -a claude-code

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

GitHub CLI
$ gh skill install siteboon/claudecodeui frontend-module-standards --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/siteboon/claudecodeui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/frontend-module-standards .claude/skills/frontend-module-standards && 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-module-standards
GitHub stars
14k
Token cost
~2.6k tokens
SKILL.md length
1,328 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Enforces one repository's React and TypeScript module layout for code under src/: source-root imports, feature barrels, deliberate exports and no deep imports.

  • Works in 4 steps: Identify the owning feature module and… → Search for existing shared types,… → Search for every consumer before moving… → …
  • Adding a new feature module or component under src/ in this repository
  • SKILL.md covers Inspect before editing, Use source-root imports, Organize feature modules and Design exports deliberately, plus 13 more sections
  • Calls npm

What it does

The agent applies the repository's frontend architecture rules only to code under src/, and only to the code it touches or generates, never as a repository-wide migration. Before editing it identifies the owning feature module, searches for existing shared types, utilities, hooks and components, and finds every consumer before moving a definition or changing a module's exports.

Application-source imports use the @ alias for src, even inside one feature module, with no relative paths, while external packages stay as bare specifiers and type-only imports use import type. Each feature gets its own folder under src/modules, holds .ts and .tsx files only, and exposes its public API through an index.ts barrel. Other modules may import it only through that barrel.

Exports are kept to what is needed, and each exported component gets a short comment naming the modules that consume it and why. Backend code under server/ and non-frontend scaffolding are outside the rules.

When your agent uses it

  • Adding a new feature module or component under src/ in this repository
  • Refactoring frontend code that uses relative imports or reaches into another module's internals
  • Reviewing a frontend pull request against the repository's module rules
  • Moving a hook or utility and updating all of its consumers

Example prompts

  • “Add a notifications feature module under src/modules with a proper index.ts barrel.”
  • “Review this PR's frontend changes for deep imports and relative import paths.”
  • “Move the useSessionList hook into the sessions module and update every consumer.”
  • “Convert the imports in the settings panel to the @ alias.”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Identify the owning feature module and its existing barrel, components, hooks, contexts, utilities, state, API usage, and tests.
  2. Search for existing shared types, utilities, constants, UI components, hooks, and contexts before adding a new definition.
  3. Search for every consumer before moving a definition or changing a module's public exports.
  4. Distinguish application-source imports from package imports before applying the @ alias rules.

What it can do on your machine

Read from SKILL.md and the folder at commit dc7cb6c. 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

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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 Module Standards loads about 2.6k tokens when it runs. Until then it costs about 101 tokens; SKILL.md has 1,328 words of instructions outside code blocks.

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

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 siteboon/claudecodeui at commit dc7cb6c, republished under its AGPL-3.0 licence (© siteboon). 1,328 words, ~2,551 tokens.

Download SKILL.mdSave it as .claude/skills/frontend-module-standards/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
frontend-module-standards
description
Enforce this repository's React and TypeScript frontend module architecture standards. Use whenever creating, modifying, refactoring, or reviewing frontend code under `src/`, including feature modules, components, hooks, contexts, shared UI, API access, state, utilities, and frontend tests. Do not apply these rules to backend code under `server/` or non-frontend scaffolding.

Frontend Module Standards

Apply these rules only to frontend code under src/. Preserve the requested task scope: make touched and newly generated frontend code compliant without performing an unrelated repository-wide migration.

Inspect before editing

  1. Identify the owning feature module and its existing barrel, components, hooks, contexts, utilities, state, API usage, and tests.
  2. Search for existing shared types, utilities, constants, UI components, hooks, and contexts before adding a new definition.
  3. Search for every consumer before moving a definition or changing a module's public exports.
  4. Distinguish application-source imports from package imports before applying the @ alias rules.

Use source-root imports

  • Treat @ as the alias for src.
  • Use @/... imports whenever the import target is frontend application code inside src, including imports within the same feature module.
  • Do not use relative paths such as ../, ../../, or ./ for application-source imports.
  • Continue using bare package specifiers for external dependencies, such as react or react-router-dom.
  • Use import type for every type-only import.

Organize feature modules

  • Place every frontend feature in src/modules/<feature>/.
  • Use .ts for non-JSX files and .tsx for files containing JSX. Do not add JavaScript feature-module files.
  • Give every feature module an index.ts barrel that exposes only its required public API.
  • Import another feature module only through that module's index.ts. Never deep-import another module's components, hooks, contexts, modals, utilities, or other implementation details.
  • Keep module-private implementation details out of the barrel.
  • Do not create view/ directories inside feature modules.
  • Keep module-owned UI components within the owning module, either at its root or in clearly named component-specific directories.

A feature module may contain only the directories it needs:

text
src/modules/<feature>/
|-- index.ts
|-- FeatureComponent.tsx
|-- hooks/
|-- context/
|-- modals/
|-- utils/
`-- tests/

Design exports deliberately

  • Export components and other public symbols at their declarations. This does not apply to re-exports from index.ts barrels.
  • Do not export speculative helpers, unused symbols, or module-private implementation details.
  • For every exported component, add a brief comment at its definition naming the consuming module or modules and explaining why they use it.
  • Update an exported component's consumer comment whenever its consumers change.
  • Use clear, specific names for functions, variables, components, and hooks.
  • Add a concise comment wherever intent, ordering, invariants, or edge cases would otherwise be unclear.

Example:

tsx
/** Used by the chat and plugins modules to display the active provider. */
export function ProviderBadge() {
  // ...
}

Use types, not interfaces

  • Do not introduce TypeScript interface declarations in frontend code. Use type aliases instead, including for component props, context values, state shapes, and API data.
  • When the requested work directly touches an existing interface, convert it to a type when doing so remains within scope.
  • Use export type when exporting a type.
  • Use import type when importing a type.
  • Use type-only barrel exports such as export type { Session }.

Place types by usage

  • Define a type directly in its sole owning component or implementation file when only that file uses it.
  • When two or more files use the same type, place it in src/shared/types.ts.
  • Do not create module-local types.ts files.
  • Do not duplicate a shared type to avoid importing it.
  • Add a brief comment to every type in src/shared/types.ts explaining what it represents and how it should be used.

Place utilities by usage

  • Define a utility directly in its sole owning component or implementation file when only that file uses it.
  • When two or more files use the same utility, place it in src/shared/utils.ts.
  • Do not create a module-level utils.ts file or duplicate a shared utility to avoid importing it.
  • Add a brief comment to every utility in src/shared/utils.ts explaining what it does and how it should be used.
  • A large module-private utility may be placed in src/modules/<feature>/utils/ when keeping it in its sole consumer would make that file impractical to maintain.
  • Give large module-private utility files descriptive names, such as mobileTerminalSelection.ts; do not name them utils.ts.
  • Keep a large utility module-private unless it acquires consumers in other modules. If it becomes shared across multiple modules, move it to src/shared/utils.ts.

Place constants by usage

  • Define a constant directly in its sole owning component or implementation file when only that file uses it.
  • When two or more files use the same constant, place it in src/shared/constants.ts.
  • Do not create module-local constants.ts files or duplicate shared constants.
  • Name true constants using UPPER_SNAKE_CASE.
  • Treat a value as a constant only when it is fixed independently of runtime evaluation.
  • A runtime-derived value such as platform detection is a variable or utility, even if it was previously given an uppercase name. Place it according to the utility rules.
  • Add a brief comment to every constant in src/shared/constants.ts explaining what it represents and how it should be used.

Organize shared definitions

Within src/shared/types.ts, src/shared/utils.ts, and src/shared/constants.ts:

  • Keep related definitions adjacent.
  • Introduce each related group with //----------------- DESCRIPTION OF GROUP ------------.
  • Separate unrelated groups with // ---------------------------.
  • Document each definition individually, even when it belongs to a documented group.
  • Avoid unrelated catch-all groups.
Show full SKILL.md (550 more words)Show less

Place hooks by ownership

  • Put a hook used only by one feature module in src/modules/<feature>/hooks/.
  • Put a hook used by multiple feature modules in src/shared/hooks/.
  • Do not move a module-private hook into shared code merely because multiple components within the same module use it.
  • Search for an existing equivalent hook before adding a new one.

Place contexts by ownership

  • Put a context primarily owned by one feature in src/modules/<feature>/context/. For example, the auth module owns AuthContext.
  • Put a context without a clear feature owner in src/shared/context/. For example, ThemeContext affects the application broadly.
  • Ownership, not the number of consumers alone, determines context placement.

Place shared UI by usage

  • Keep a UI component inside its owning feature module when it is used only by that module.
  • Move a UI component to src/shared/ui/ only when two or more different feature modules use it.
  • Multiple consumers within the same feature module do not make a component globally shared.
  • Do not place shared UI under src/shared/view/ui/ or create view/ directories as an organizational layer.
  • Export only shared UI components that have real consumers.

Centralize frontend API access

  • Place frontend API endpoint definitions and shared request helpers in src/shared/api.ts.
  • Do not scatter endpoint paths or duplicate API request logic across feature components.
  • Feature modules may call the public API helpers but should not redefine their endpoint details.
  • Keep API transport concerns out of presentational UI components when practical.

Document state deliberately

Treat React state, reducer state, context state, and external-store state as frontend state for these rules.

  • Add a brief comment immediately above every newly introduced state declaration explaining why the state is essential and how it is used.
  • Describe its purpose rather than merely restating its variable name.
  • Do not introduce state that can be derived reliably from existing props or state.
  • If the task requires temporarily retaining state that appears redundant or questionable, mark it with // ! Possibly unnecessary - <brief reason>.
  • Do not add known-redundant state merely to annotate it.

Organize modals

  • When a feature module contains multiple modals, place them in src/modules/<feature>/modals/.
  • When a feature module contains only one modal, keep it directly in the module.
  • Keep a modal in src/shared/ui/ only when it is a genuinely reusable UI primitive used by multiple different modules.

Test within the owner

  • Put feature-module tests in src/modules/<feature>/tests/.
  • Put tests for shared frontend code in src/shared/tests/.
  • Add or update focused tests for changed hooks, utilities, API behavior, state transitions, and component behavior when applicable.
  • Do not place feature-specific tests in the shared test directory.

Verify the result

Before finishing:

  1. Confirm every application-source import uses @/... and external packages still use bare package specifiers.
  2. Confirm all cross-module imports go through the owning module's index.ts.
  3. Confirm module barrels contain only necessary, documented public exports.
  4. Confirm frontend code introduces no interfaces and uses export type and import type correctly.
  5. Confirm types, utilities, constants, hooks, contexts, UI components, modals, and tests follow their ownership and usage rules.
  6. Confirm shared types, utilities, and constants use the required comments and grouping separators.
  7. Confirm every newly introduced state declaration explains why it exists or is marked as possibly unnecessary.
  8. Run the narrow relevant frontend tests, followed by npm run test:client, npm run build:client, npm run typecheck, and npm run lint when the task scope and environment permit.

© siteboon, AGPL-3.0. 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-module-standards of siteboon/claudecodeui.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit dc7cb6c

Compare with similar skills

Frontend Module Standards 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 Module Standards compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frontend Module Standards this skillsiteboon/claudecodeui14k—~2.6kAutomated safety check: PassAGPL-3.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
Qovery Console StandardsQovery/console227—~924Automated safety check: PassMIT
Typescript Best Practicesjwynia/agent-skills165—~2.5kAutomated safety check: PassMIT
Clean Code TS Reactpproenca/dot-skills214—~3.1kAutomated safety check: PassMIT
Frontendstreamband/hydra-srt146—~582Automated safety check: PassApache-2.0

Similar skills

  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Qovery Console coding standards, architecture guidelines, naming conventions, testing practices, and development workflows.

    227 GitHub stars~924 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Typescript Best Practices

    jwynia/agent-skills

    Guide AI agents through TypeScript coding best practices including type safety, error handling, code organization, and architecture patterns.

    165 GitHub stars~2.5k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Clean Code TS React

    pproenca/dot-skills

    A skill your agent uses when writing, reviewing, or refactoring TypeScript or React code for craftsmanship — naming, function and component shape, error handling, data modeling, tests, and…

    214 GitHub stars~3.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Frontend

    streamband/hydra-srt

    A skill your agent uses for frontend work in webapp (React/TypeScript, UI implementation, tests, and refactors).

    146 GitHub stars~582 tokensUpdated 21 days ago
    Frontend & DesignAuto-check passed
  • React Idioms

    irahardianto/awesome-agv

    React 19+ patterns: custom hooks, Suspense boundaries, state management, component composition, and web performance.

    157 GitHub stars~3.8k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed

More from siteboon/claudecodeui

  • Enforces this repository's TypeScript backend module architecture under server/: feature folders, barrel exports, and where shared types and utilities belong.

    14k GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Frontend Module Standards

What does Frontend Module Standards do?

Enforces one repository's React and TypeScript module layout for code under src/: source-root imports, feature barrels, deliberate exports and no deep imports. The agent applies the repository's frontend architecture rules only to code under src/, and only to the code it touches or generates, never as a repository-wide migration. Before editing it identifies the owning feature module, searches for existing shared types, utilities, hooks and components, and finds every consumer before moving a definition or changing a module's exports.

When should I use Frontend Module Standards?

Frontend Module Standards fits situations like: adding a new feature module or component under src/ in this repository; refactoring frontend code that uses relative imports or reaches into another module's internals; reviewing a frontend pull request against the repository's module rules; moving a hook or utility and updating all of its consumers.

How do I install Frontend Module Standards in Claude Code?

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

How do I install Frontend Module Standards in Codex?

Run `npx skills add siteboon/claudecodeui --skill frontend-module-standards -a codex`. Or copy the skill folder (.agents/skills/frontend-module-standards in siteboon/claudecodeui) into .agents/skills/frontend-module-standards in your project. Codex loads it when a task matches its description.

Can I use Frontend Module Standards 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 siteboon/claudecodeui --skill frontend-module-standards -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-module-standards, .gemini/skills/frontend-module-standards, .github/skills/frontend-module-standards and .opencode/skills/frontend-module-standards in your project.

What does Frontend Module Standards need to run?

Going by SKILL.md and its folder, Frontend Module Standards needs the command-line tools its instructions call (npm).

Does Frontend Module Standards access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Frontend Module Standards 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 Module Standards use?

Frontend Module Standards is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frontend Module Standards use?

About 2.6k tokens (SKILL.md is roughly 10k 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 Module Standards?

Skills that share tags, products or a category with Frontend Module Standards: Dify Component Writing Guide (langgenius/dify, 158k stars), Qovery Console Standards (Qovery/console, 227 stars), Typescript Best Practices (jwynia/agent-skills, 165 stars) and Clean Code TS React (pproenca/dot-skills, 214 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frontend Module Standards?

siteboon (a GitHub organization) maintains it in siteboon/claudecodeui, which has 13,962 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 5, 2026.

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