Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/innei-template/smart-webapp-template/component-organizationgit clone --depth 1 https://github.com/innei-template/smart-webapp-templateWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00005 | $0.00574 |
| Opus 5 | $0.00003 | $0.00287 |
| Sonnet 5 | $0.00001 | $0.00115 |
| Haiku 4.5 | $0.00001 | $0.00057 |
Grade A, and why
component-organization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Component Organization
Follow this component architecture for consistent project structure:
Directory Structure
Base UI Components: src/components/ui/
- Reusable primitives (buttons, inputs, modals, etc.)
- Generic components that can be used across any application
- Based on Radix UI primitives with custom styling
- Examples:
Button,Input,Select,Tooltip,Accordion
Common Components: src/components/common/
- App-specific shared components
- Components used across multiple features but specific to this app
- Examples:
ErrorElement,Footer,LoadRemixAsyncComponent,NotFound
Module Components: src/modules/
- Feature-specific components organized by domain
- Business logic components that belong to specific features
- Examples:
src/modules/feed/,src/modules/auth/,src/modules/user/
Component Placement Rules
Universal Components → src/components/ui/
- If the component could be used in any React app
- Pure UI components without business logic
- Reusable across different domains
Feature Components → src/modules/{domain}/
- If the component is specific to a business domain/feature
- Contains domain-specific logic or data handling
- Examples:
FeedTimeline,UserProfile,AuthForm
App-Specific Shared → src/components/common/
- If the component is used across features but specific to this app
- Contains app-specific logic but used in multiple places
Path Aliases
Use ~/ for src/ imports (configured in tsconfig):
// Good
import { Button } from '~/components/ui/button'
import { UserProfile } from '~/modules/user/UserProfile'
// Avoid
import { Button } from '../../../components/ui/button'
Component Examples
// Universal UI component - goes in src/components/ui/
// File: src/components/ui/button/Button.tsx
export function Button({ children, ...props }) {
return <button className="..." {...props}>{children}</button>
}
// Feature component - goes in src/modules/
// File: src/modules/feed/FeedTimeline.tsx
export function FeedTimeline() {
// Feed-specific logic and UI
}
// App-specific shared - goes in src/components/common/
// File: src/components/common/AppHeader.tsx
export function AppHeader() {
// App-specific header with navigation
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 82 lines · 5 tokens per session scan A 3e55da6f17f8
component-organization is a cursor rule published in the GitHub repository innei-template/smart-webapp-template (142 stars, last pushed 7d ago), licensed MIT. It adds 5 tokens to every session and 574 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
general
Wonder Blocks design system conventions, component patterns, and coding standards.
new-component
Workflow for creating new React components.
trove-react
React 19 coding conventions and performance patterns. Auto-activates when working with React/TypeScript files. Covers hooks, state management, TanStack Query, Zustand, immutable updates, and component conventions.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.
component-patterns
React Component Patterns.
hydration-safety
React hydration mismatch prevention.