project

A set of project rules for building Gentelella v4, an admin dashboard template made from server-rendered HTML, JavaScript, and SCSS. It describes the required file structure, page loading, and coding patterns.

In plain words
What is it for?
Use it when adding dashboard pages, loading page-specific code, working with the shared layout, or checking which front-end technologies and patterns the project allows.
Why use it?
It prevents contributors from introducing conflicting frameworks, scripts, or page-loading methods. It also explains how new pages and shared dashboard elements should fit into the existing project.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/colorlibhq/gentelella/project
Clone the repo
git clone --depth 1 https://github.com/ColorlibHQ/gentelella

Made for: Cursor.

Per session 2,179 This file is loaded in full into every session.
When invoked 2,179 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.02179 $0.02179
Opus 5 $0.01090 $0.01090
Sonnet 5 $0.00436 $0.00436
Haiku 4.5 $0.00218 $0.00218

Measured 2d ago against content hash 5046f777c86a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project 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.

.cursor/rules/project.mdc · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gentelella v4 (4.1.1)

Admin dashboard template by Colorlib. 58 server-rendered HTML pages in production/, built with Vite 8 (Rolldown). Vanilla ES2022, no Bootstrap, no jQuery, no SPA framework. SCSS only. Heavyweight deps (ECharts 6, DataTables.net 3, Leaflet 1.9) are lazy-imported per page.

Full reference: CLAUDE.md. The rules below are the load-bearing ones — apply them by default.

Hard rules

  • Vanilla DOM only. querySelector, classList, addEventListener. Never add jQuery, Bootstrap JS, or an SPA framework.
  • Single entry: src/main-v4.js. Every page loads it. Page-specific modules are lazy-imported inside main-v4.js guarded by DOM presence — match that pattern, don't add new <script> tags per page.
  • Pages are auto-discovered. Drop production/<slug>.html in and discoverEntries() in vite.config.js picks it up. Don't edit rollupOptions.input.
  • Shell opt-in via body attributes: <body data-shell="admin" data-page="<key>" data-breadcrumb="Home > …">. The Vite plugin (shellInjectionPlugin in vite.config.js) inlines sidebar/topbar/footer at build time so the shell paints on the first frame.
  • Breadcrumb segments link themselves. A segment whose text matches a NAV item becomes a link (Formsform.html; a parent resolves to its first child). Override with a pipe — data-breadcrumb="Home > Projects|projects.html > Acme Redesign". The last segment is the current page and never links; a segment with no target stays plain text, so drop grouping-only levels instead of shipping a dead crumb.
  • NAV is one constant: NAV in src/v4/shell-render.js, 7 groups. Match leaf key to data-page. New icons go in the ICONS object in the same file (inline SVG, currentColor stroke).
  • Overlays go through helpers: showModal() (src/v4/modal.js), showToast() (src/v4/toast.js), openMenu() / openPanel() (src/v4/menus.js). Never hand-roll a backdrop, escape handler, or focus-return loop.
  • CSS custom properties for colors, never hex literals in components. Tokens in src/scss/v4/_tokens.scss. Charts read them via getComputedStyle(document.documentElement).getPropertyValue('--…') — that's how dark-mode redraw stays automatic.
  • Lazy ECharts imports. Match the modular import pattern in src/v4/charts.js. Don't import * as echarts.
  • Subpath-safe URLs. import.meta.env.BASE_URL in JS, ${base} in the Vite plugin, relative paths inside production/*.html. Never hard-code a leading /.
  • Idempotent init<Name>() exports. Every module in src/v4/ exposes a single init*() that is safe to call when its root element is absent and safe to call twice.
  • No console.* in shipped code. Terser drops them in production but ESLint flags them earlier.
  • Service worker only in prod. Skip the registration when import.meta.env.DEV — see the guard in src/main-v4.js.

Read the full file on GitHub · 122 lines

Changes

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.

  1. 2d ago First seen · 122 lines · 2,179 tokens per session scan A 5046f777c86a

Subscribe to this mod's changes

project is a cursor rule published in the GitHub repository ColorlibHQ/gentelella (21,504 stars, last pushed 12d ago), licensed MIT. It adds 2,179 tokens to every session, about $0.0109 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.