Generate Rules banner
PramudithaN PramudithaN

Generate Rules

AI community

Description

An intelligent, zero-dependency Node.js CLI tool that automatically inspects any codebase and generates tailored, high-standard guidelines (AGENTS.md and GEMINI.md) for AI coding agents such as Antigravity, Gemini Code Assist, Cursor, GitHub Copilot, Claude Code, and OpenAI Codex.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Universal Intelligent AI Agent Rules Generator (`generate-rules`)

An intelligent, zero-dependency Node.js CLI tool that automatically inspects any codebase and generates tailored, high-standard guidelines (`AGENTS.md` and `GEMINI.md`) for AI coding agents such as Antigravity, Gemini Code Assist, Cursor, GitHub Copilot, Claude Code, and OpenAI Codex.


Key Features

  • Deep Codebase Inspection: Automatically detects languages, runtimes, frameworks, state management libraries, ORMs, UI design systems, bundlers, and testing suites.
  • Annotated Directory Mapping: Generates clean visual tree representations of the project structure with architectural annotations.
  • Tailored Coding Standards: Emits framework-specific best practices, including Electron process separation and IPC security, Next.js Server/Client component boundaries, Three.js/R3F memory lifecycles, and strict TypeScript, Python, or Rust conventions.
  • Zero-Vulnerability Security Guidelines: Injects context isolation, sandboxing rules, IPC validation, environment variable safety, and Row-Level Security (RLS) enforcement based on active dependencies.
  • Conventional Commits Specification: Embeds standard commit conventions and scopes directly into the generated agent prompt.
  • Dynamic Verification Runbook: Builds repository-specific QA checklists (npm run lint, npx tsc --noEmit, npm run build, npm test) tailored to available package.json scripts and tools.
  • Custom Template Support: Allows overriding the default output structure using local templates/AGENTS.template.md and templates/GEMINI.template.md files.
  • Automated .gitignore Protection: Automatically adds generated agent rule files and templates to .gitignore.
  • Zero External Dependencies: Implemented in pure native Node.js (ES Modules, node:fs, node:path, node:url).

Supported Ecosystem and Technologies

[`generate-rules.mjs`](file:///d:/Pramuditha/Dev%20projects/generate-rules/