general-rule

general-rule is a cursor rule for Cursor from vinhnx/vtchat. It costs 2,939 tokens per session, scanned A, original, MIT.

A project-specific coding rule for vtchat, a Turborepo monorepo with a Next.js and React application plus shared packages. It defines the stack, package commands, naming and formatting conventions, configuration practices, and interface guidelines.

In plain words
What is it for?
Use it when changing vtchat's frontend, shared TypeScript code, scripts, configuration, or user interface.
Why use it?
It helps agents make changes that match the existing repository instead of adding hard-coded values or inconsistent code patterns.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it when changing vtchat's frontend, shared TypeScript code, scripts, configuration, or user interface.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/vinhnx/vtchat/general-rule
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.

Clone the repo
git clone --depth 1 https://github.com/vinhnx/vtchat

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for general-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/vinhnx/vtchat/general-rule/github.svg)](https://agentmods.dev/rules/vinhnx/vtchat/general-rule)
Your own site
<a href="https://agentmods.dev/rules/vinhnx/vtchat/general-rule"><img src="https://agentmods.dev/badge/rules/vinhnx/vtchat/general-rule/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for general-rule

Your own site · 80×15
<a href="https://agentmods.dev/rules/vinhnx/vtchat/general-rule"><img src="https://agentmods.dev/badge/rules/vinhnx/vtchat/general-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,939 This file is loaded in full into every session.
When invoked 2,939 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02939 $0.02939
Opus 5.5 $0.01176 $0.01176
Sonnet 5.5 $0.00588 $0.00588
Haiku 4.5 $0.00294 $0.00294

Measured today against content hash e7225c7e478c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

general-rule 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 today.

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/general-rule.mdc · 300 lines

How it starts

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

Development Guidelines

Tech Stack & Project Overview

  • Monorepo: Turborepo-managed, with apps/ (main: Next.js web app) and packages/ (shared code: common, shared, ai, ui, etc.).
  • Core Technologies: Next.js 15 (App Router), React 19.0.0, TypeScript, Tailwind CSS, shadcn/ui, Zustand, Drizzle ORM (Neon PostgreSQL), Better-Auth, Framer Motion, Lucide icons.
  • AI/Agents: Agentic Graph System in packages/ai/ (supports OpenAI, Anthropic, Google, Groq, etc.).
  • Best Practices: Use environment variables, enums for string keys, named exports, shadcn/ui for UI, Bun for all scripts, and document changes in memory-bank/.

Package Management

  • Use bun instead of npm for all operations

Code Style

  • Make sure no string in #codebase, use enum pattern.
  • Don't hard code values in the codebase.
  • Use environment variables for configuration (e.g., API keys, product IDs, ADMIN_USER_IDS for Better-Auth admin access - supports comma-separated user IDs)
  • Use centralize enum for custom reusable keys.
  • 4-space indentation, single quotes, 100 char line length
  • PascalCase components, camelCase hooks/utils, kebab-case files
  • Named exports preferred over default exports
  • Use oxlint for fast comprehensive linting (run bun run lint)
  • Use Prettier for markdown files only (run bun run format)

UI/UX Design Principles

  • Minimal Design: Follow shadcn/ui principles with clean, minimal aesthetics
  • No Colors: Use only black/white/muted colors (avoid gradients, bright colors)
  • Minimal Icons: Reduce icon usage to essentials only
  • Clean Typography: Rely on typography hierarchy over visual decorations
  • Neutral Palette: Use text-muted-foreground, bg-muted, standard shadcn colors
  • Simple Interactions: Avoid flashy animations or complex visual effects

Development Workflow

  • Make sure you DO NOT CREATE ANY debug and test FILES IN ./ ROOT DIRECTORY. Only use files in /temps or apps/web/app/tests/ or /scripts.
  • Make sure you run bun dev and check the app console to see if there are any errors before starting to work on anothers task. fix it first.
  • Plan first, then implement. For substantial changes, request maintainer feedback on the plan before coding.
  • REQUIRED: Run bun run biome:format to auto-fix formatting issues
  • NEVER commit changes yourself - DO NOT execute git commit unless you have my approval
  • Run bun run lint (oxlint) for comprehensive error checking
  • Run bun run build to verify compilation before major changes
  • Test core functionality after significant changes

Read the full file on GitHub · 300 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. today First seen · 300 lines · 2,939 tokens per session scan A e7225c7e478c

Subscribe to this mod's changes

general-rule is a cursor rule published in the GitHub repository vinhnx/vtchat (59 stars, last pushed 1mo ago), licensed MIT. It adds 2,939 tokens to every session, about $0.0118 per session on Opus 5.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-10-15.