frontend-philosophy
React/Preact frontend conventions: TanStack Query for server state, 8-section components, no TypeScript, no barrel files.
Skill by 1337hero
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/1337hero-frontend-philosophy
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/frontend-philosophy
What's inside
- Skill name
frontend-philosophy- Description
- React/Preact frontend conventions: TanStack Query for server state, 8-section components, no TypeScript, no barrel files.
- License
- WTFPL
- Instructions
- 190 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- component-patterns.md · references/
SKILL.md (first lines)
# Frontend Philosophy
Authoritative conventions for all React/Preact work. These are not suggestions — they are the standard. When in doubt, choose the simpler path.
> "Every line of code is a liability. The best code is no code. The second best is simple, boring code that obviously works."
## Core Principles
1. **Simplicity over cleverness** — Write code a junior dev understands
2. **Convention over configuration** — Follow existing patterns, don't invent
3. **Optimize for understanding** — Code is read 10x more than written
4. **Embrace the monolith** — Colocate related concerns, don't split prematurely
5. **Performance through simplicity** — Fastest code is code that doesn't run
## Stack Defaults
| Purpose | Default | Notes |
|---------|---------|-------|
| Runtime/pkg | Bun | Fallback: npm. Never pnpm/yarn |
| Bundler | Vite | With `@/` path alias |
| Framework | React or Preact | + TanStack Query/Router |
| Styling | Tailwind CSS | Utility-first, `cn()` for merging |
| UI primitives | shadcn/ui pattern | CVA for variants, Radix primitives |
| Server state | TanStack Query | ONLY source of truth for API data |
| Client state | Zustand or Preact Signals | UI state only (modals, theme, filters) |
| Icons | @remixicon/react | `Ri*Line` for outline, `Ri*Fill` for solid |
| Types | **No TypeScript** | `.jsx` components, `.js` utilities |
### Why No TypeScript
Speed over ceremony. Type gymnastics add grief, not joy. Runtime validation at system boundaries, shared constants, JSDoc for complex functions.
## File Conventions
```
src/
├── components/
│ ├── ui/ # Base UI (shadcn pattern)
│ ├── billing/ # Feature-based grouping
│ ├── support/ # NOT type-based (lists/, forms/, displays/)
│ └── common/ # Shared across features
├── hooks/ # Custom hooks (use* prefix)
├── stores/ # Zustand stores
├── constants/ # Shared constants
├── lib/ # Utilities (cn, formatters)
├── pages/ # Route-level components
└── api/ # API client
```
**Naming rules:**
- `.jsx` components, `.js` utilities — always
- PascalCase component files, camelCase everything else
- `handle*` event handlers, `use*` hooks, `render*` render methods
- Feature-based folders, never type-based
- **No barrel files** (index.ts/js re-exports) — ever
- **No comments** unless logic is truly non-obvious
## Component Structure (8 Sections)
Every component follows this order. See [references/component-patterns.md](references/component-patterns.md) for full examples.
```jsx
const Component = ({ prop1, prop2 }) => {
// 1. Server state (TanStack Query)
const { data, isLoading, error } = useQuery({ ... });
// 2. Global client state (Zustand/signals)
const { theme } = useThemeStore();
// 3. Local state (useState)
const [isOpen, setIsOpen] = useState(false);
// 4. Refs
const formRef = useRef(null);
// 5. Custom hooks
const { isOnline } = useNetworkStatus();
// 6. Derived values (compute in render, no useState)
const isValid = email.includes("@");
const fullName = `${data?.first} ${data?.last}`;
// 7. Effects (DOM sync, subscriptions, analytics ONLY)
useEffect(() => { ... }, [deps]);
// 8. Event handlers
const handleSubmit = () => { ... };
// Return — early returns for loading/error first
if (isLoading) return <Skeleton />;
if (error) return <ErrorMessage error={error} />;
return ( ... );
};
```
## State Management Rules
### Server State = TanStack Query ONLY
```jsx
// CORRECT — single source of truth
const { data: users } = useQuery({
queryKey: ["users", filters],
queryFn: () => api.get("/users", { params: filters }),
staleTime: 5 * 60 * 1000,
gcTime: 60 * 60 * 1000, // NOT cacheTime (v5)
});
// WRONG — duplicating server data in local state
const [users, setUsers] = useState([]);
useEffect(() => { fetchUsers().then(setUsers); }, []);
```
### Client State = Zustand or Signals
Only for UI concerns: modals, theme, sidebar, filters, form inputs.
### Derive, Don't DuplicateFrom 1337hero/claude-toolkit, WTFPL.
More from 1337hero/claude-toolkit
- 0.502score
llama-tune
1337hero
Empirically tune GGUF model's llama-swap/llama.cpp config for multi-GPU rig — card placement, KV-cache quant, context length, batch sizes, prompt-cache…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail-audit
1337hero
Whole-repo audit for over-engineering.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail-review
1337hero
Code review hunting over-engineering only.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail
1337hero
Forces laziest solution that works — simplest, shortest, most minimal.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
codebase-documenter
1337hero
Write codebase docs: README, architecture, API, comments.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
ignite
1337hero
Novel ignition ritual for story-bible: 3-line 'previously on' + one pulling question.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
playwright-skill
1337hero
Browser automation with Playwright.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
improve-codebase-architecture
1337hero
Find architecture improvements: consolidate modules, improve testability and AI navigation.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
announce
1337hero
Run the announcement round for a finished project: attribution check, directory submissions, launch-post drafts in Mike's voice.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
browser-tools
1337hero
Drive VISIBLE Chrome with real profile/logins (CDP :9222).
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
caveman
1337hero
Ultra-compressed communication mode.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
frontend-design
1337hero
Create distinctive frontend interfaces: components, pages, dashboards, React, HTML/CSS.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 15, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- WTFPL
- Repository
- github.com/1337hero/claude-toolkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 1337hero
- 0.502score
llama-tune
1337hero
Empirically tune GGUF model's llama-swap/llama.cpp config for multi-GPU rig — card placement, KV-cache quant, context length, batch sizes, prompt-cache…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail-review
1337hero
Code review hunting over-engineering only.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail
1337hero
Forces laziest solution that works — simplest, shortest, most minimal.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ponytail-audit
1337hero
Whole-repo audit for over-engineering.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
codebase-documenter
1337hero
Write codebase docs: README, architecture, API, comments.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
caveman
1337hero
Ultra-compressed communication mode.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
frontend-philosophy skill. Agent Mart. https://agentmart.dev/skills/1337hero-frontend-philosophy (last updated 2026-10-24)