@virastack/ai
v2.1.0
Published
Agent rules for modern React in one command: Claude Code, Cursor and AGENTS.md
Maintainers
Readme
Agent rules for modern React in one command: Claude Code, Cursor and AGENTS.md
See how it works →
Features
- Claude Code and Cursor, one command: Writes the same rules in each tool's native format. Claude Code gets
.claude/rules, Cursor gets.cursor/rules, every other agent readsAGENTS.md. - Written for the 2026 stack: Next.js 16, React 19, TanStack Start, TanStack Query 5, Zustand 5, Zod 4 and Tailwind CSS 4. API rules are checked against each library's current docs, and every example is built in fresh projects.
- Never overwrites your files: Rules live in their own
virastack/folders.AGENTS.mdandCLAUDE.mdonly get a small managed block or import line; everything else in them stays byte for byte. Unbalanced markers stop the run and leave the file untouched. - Smart Framework Isolation: Detects Next.js or TanStack Start from
package.jsonand installs only that framework's rules. Thei18nrule is installed only whennext-intlor Paraglide is in the project. - Safe updates:
.virastack/ai.jsonrecords what was installed. Re-runninginitupdates untouched rules, asks before touching rules you changed, and cleans up rules a new version no longer ships.
Quick Start
npx @virastack/ai initStarting a new project? ViraStack Start scaffolds Next.js or TanStack Start with these rules pre-installed.
Supported tools
| Tool | Native rules | From the AGENTS.md map |
| :--- | :----------: | :----------------------: |
| Claude Code | ✅ .claude/rules/virastack/ | ✅ |
| Cursor | ✅ .cursor/rules/virastack/ | ✅ |
| Codex | | ✅ |
| GitHub Copilot | | ✅ |
| Gemini CLI | | ✅ (one setting, below) |
| Aider | | ✅ (one setting, below) |
| Other tools that read AGENTS.md (Windsurf, Zed, …) | | ✅ |
"From the map" means the agent reads the managed AGENTS.md block, which lists every rule with its file path and when to read it.
- Gemini CLI: add
{ "context": { "fileName": ["AGENTS.md", "GEMINI.md"] } }to.gemini/settings.json. - Aider: add
read: AGENTS.mdto.aider.conf.yml.
What gets installed
| Path | When | Purpose |
| :--- | :--- | :------ |
| .claude/rules/virastack/*.md | --agent claude | Claude Code rules, loaded by file path |
| CLAUDE.md | --agent claude | Gets an @AGENTS.md import line if missing |
| .cursor/rules/virastack/*.mdc | --agent cursor | Cursor rules, loaded by file path |
| .agents/rules/virastack/*.md | --agent none | Plain Markdown rules for any agent |
| AGENTS.md | always | Managed virastack-ai block: commands, precedence, rule map |
| .virastack/ai.json | always | Manifest of installed files. Commit it. |
Without --agent, both Claude Code and Cursor are installed. The choice is saved in .virastack/ai.json and reused on the next init.
Rules
Two rules are always loaded. The others load when the agent works on matching files.
| Rule | Loaded for |
| :--- | :--------- |
| core | Always: workflow, naming, exports, errors |
| architecture | Always: folder tree, feature boundaries, imports |
| typescript | src/**/*.{ts,tsx} |
| react | src/**/*.tsx, hooks |
| nextjs | src/app/**, src/proxy.ts, next.config.ts, feature actions/ (Next.js only) |
| tanstack-start | src/routes/**, src/router.tsx, src/start.ts, feature api/ (TanStack Start only) |
| ui | src/components/**, feature components, src/styles/ |
| forms | *Form*.tsx, schemas/ |
| api | src/lib/api.ts, feature api/ |
| server-state | feature api/ and hooks/, src/providers/, src/lib/query-client.ts |
| client-state | stores/ |
| i18n | src/messages/, src/i18n/, routes, components (only with next-intl or Paraglide) |
| testing | *.test.{ts,tsx}, src/test/ |
| performance | routes and components |
Commands in the rules (lint, typecheck, test, shadcn add) use the package manager detected from your lockfile. The rules assume your project has lint, typecheck and test scripts.
If Prettier formats the rule folders, ViraStack AI reads them as edited and stops updating them. Add .claude/rules/virastack/ and .cursor/rules/virastack/ to .prettierignore.
Commands
| Command | Description |
| :------ | :---------- |
| init | Install the rules, or update an existing install. |
| remove | Remove every managed file, the AGENTS.md block and the CLAUDE.md import. Files you changed are kept unless you confirm or pass --force. |
Options
| Flag | Description |
| :--- | :---------- |
| --agent <list> | claude, cursor (comma separated) or none. Default: claude,cursor. |
| --framework <name> | nextjs or tanstack. Overrides detection. |
| --force, -f | Also overwrite (or, with remove, delete) managed files you changed. Content outside the AGENTS.md block is never touched. |
| --dry-run | Print the plan without writing anything. |
| --yes, -y | Answer every question with its default (never overwrite). |
| --tr | Turkish output. |
| --help, -h | Show help. |
| --version, -v | Show the version. |
In CI or any non-interactive shell, changed files are skipped with a warning instead of a question.
Ecosystem
Part of the ViraStack ecosystem: Academy · Start · Mask · Password · Address · Guide
