agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when structuring a frontend codebase. Covers module and folder organization, state boundaries, data-fetching layers, build configuration, and keeping a large application navigable.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill frontend-architecture --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/frontend-architectureContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when structuring a frontend codebase. Covers module and folder organization, state boundaries, data-fetching layers, build configuration, and keeping a large application navigable.
name: frontend-architecture description: Use when structuring a frontend codebase. Covers module and folder organization, state boundaries, data-fetching layers, build configuration, and keeping a large application navigable. metadata: category: frontend version: 1.0.0 tags: [architecture, structure, state, bundling, monorepo]
Structure a frontend so that a new engineer can find the code for a feature in under a minute, and so that changing one feature does not require touching five others.
1. **Organize by feature, not by kind** — `features/checkout/` containing its components, hooks, api, and types beats `components/`, `hooks/`, `api/` each containing a slice of every feature. 2. **Draw the import rules** — Features may import from `shared/`. Features may not import from each other; if two need the same thing, it moves to `shared/`. Enforce this with a lint rule, not a convention document. 3. **Layer the state deliberately** — Server data in a query cache. Genuinely global client state (theme, session) in one store. Everything else stays local. Most "global state" is server state in disguise. 4. **Centralize the API client** — One place that knows about base URLs, auth headers, error mapping, and retries. Feature code calls typed functions, not `fetch`. 5. **Budget the bundle** — Set a size limit per route and fail the build when it is exceeded. Bundle size regresses one dependency at a time.
**Feature-based structure with enforced boundaries:**
src/
app/ # routing, providers, global layout
features/
checkout/
components/ # only used by checkout
api/ # checkout endpoints, typed
model/ # checkout state and domain types
index.ts # the feature's public surface
orders/
account/
shared/
ui/ # design-system primitives
api/ # http client, auth, error mapping
lib/ # genuinely cross-cutting helpers// eslint.config.js — the boundary is enforced, not merely documented.
{
rules: {
"import/no-restricted-paths": ["error", {
zones: [{
target: "./src/features/*",
from: "./src/features/*",
message: "Features must not import each other. Move shared code to src/shared.",
}],
}],
},
}**A bundle budget that fails the build:**
{
"bundlesize": [
{ "path": "dist/assets/index-*.js", "maxSize": "180 kB", "compression": "brotli" },
{ "path": "dist/assets/checkout-*.js", "maxSize": "90 kB", "compression": "brotli" }
]
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…