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/page_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.00450 |
| Opus 5 | $0.00000 | $0.00225 |
| Sonnet 5 | $0.00000 | $0.00090 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
page_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 2d 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.
What it actually says
Purpose and Scope
- Page layer handles routing and layouts for
frontend/app/**/*.tsx - Responsibilities: Define routes, handle data fetching, provide layouts, coordinate state
- MANDATORY: All pages must support internationalization through
[locale]dynamic route
File Structure
page.tsx- Page components that define routeslayout.tsx- Layout components that wrap pagesloading.tsx- Loading UI components- Use kebab-case for new route segments
- Prefer nested layouts over prop drilling
Internationalization
-
Client components:
const { t } = useTranslation('namespace') -
Server components:
getTranslationsfromnext-intl -
Organize translation keys by feature/namespace
Data Fetching
- Use Server Components for initial data fetching
- Use
fetchwith proper caching for server-side data - Client-side fetching: custom hooks in
hooks/directory - Handle loading and error states appropriately
Layout and Metadata
- Define metadata in
layout.tsxusing Next.js metadata API - Use dynamic metadata for page-specific information
- Ensure responsive design with Tailwind CSS
- Maintain consistent layout structure
State Management
- Use React Context for shared page-level state
- Keep page-specific state local to component
- Use custom hooks for complex state logic
- Avoid prop drilling with context providers
- CRITICAL: All logging must use logger.ts - never use console.log
Example
// frontend/app/[locale]/chat/page.tsx
import { useTranslations } from 'next-intl';
export default function ChatPage({ params }: { params: { locale: string } }) {
const t = useTranslations('chat');
return (
<div className="flex h-screen">
<h1 className="text-2xl font-bold p-4">{t('title')}</h1>
</div>
);
}
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.
- 2d ago First seen · 64 lines · 0 tokens per session scan A 9cc7626db83e
page_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 450 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.