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/modelengine-group/nexent/component_layer_rulesgit clone --depth 1 https://github.com/ModelEngine-Group/nexentWhat 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.00000 | $0.00966 |
| Opus 5 | $0.00000 | $0.00483 |
| Sonnet 5 | $0.00000 | $0.00193 |
| Haiku 4.5 | $0.00000 | $0.00097 |
Grade A, and why
component_layer_rules 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 yesterday.
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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose and Scope
- Component layer contains reusable UI components for
frontend/components/**/*.tsxand feature-specific components underfrontend/app/**/components/**/*.tsx - Responsibilities: Create reusable components, implement business logic, handle interactions, provide consistent UI
- MANDATORY: All components must use TypeScript and functional components
UI Library and Icons
- Ant Design first: Use Ant Design for forms, data display, modals, buttons, layouts. See ui_standards_rules.mdc.
- Icons: Lucide icons primary (
lucide-react),@ant-design/iconsas fallback when Lucide lacks the icon.
// Prefer Lucide
import { Search, RefreshCw, Edit } from "lucide-react";
// Fallback when Lucide has no equivalent (e.g. ExclamationCircleFilled for modal)
import { ExclamationCircleFilled, InfoCircleFilled } from "@ant-design/icons";
Component Organization
components/auth/- Authentication-related componentscomponents/providers/- Context providers and global state management
Component Structure
- Use functional components with TypeScript
- Define proper interfaces for all props
- Use React hooks for state management
- Implement proper error boundaries where needed
- Follow single responsibility principle
- Single component file should not exceed ~1000 lines: Split into subcomponents or extract logic to hooks/utils when a file grows. keep files digestible.
Props and State Management
- All props must be typed with interfaces
- Use optional props with default values when appropriate
- Prefer controlled components over uncontrolled
- Use local state for component-specific data
- Use context for shared state across components
- Avoid Prop Drilling: When a component receives more than ~7–10 props, or props are passed through multiple layers only to reach a deep child, prefer:
- Context for cross-cutting state (auth, theme, feature flags)
- Composition (children, render props) instead of passing many callbacks
- Custom hooks to encapsulate shared logic; let children use the hook instead of receiving props from parent
- CRITICAL: All logging must use logger.ts - never use console.log
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.
- yesterday First seen · 118 lines · 0 tokens per session scan A 7bd876b7f0ac
component_layer_rules is a cursor rule published in the GitHub repository ModelEngine-Group/nexent (5,841 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 966 tokens. 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
latest-ai-models
Use only the latest AI models from all providers (updated Feb 2026).
callback-system
Lifecycle callback system design for agentic loops.
react-loop
ReAct loop implementation design and pattern details.
laravel-ai-sdk-integration
How Laragentic integrates with and extends the Laravel AI SDK.
developer-experience
Developer experience principles and usage patterns for Laragentic.
package-structure
Directory structure and file organization conventions for the Laragentic package.