Getting Started
RuleKitX is a 3-layer prompt governance system. By defining standard guidelines as clean Markdown templates with YAML metadata, RuleKitX allows you to dynamically compose structured, priority-marked XML system prompts for any AI coding tool, ensuring absolute compliance with your guidelines.
#Installation
Install the CLI globally on your machine using NPM:
1npm install -g rulekitxVerification
Ensure the global rulekitx command is on your PATH:
1rulekitx --versionIf it succeeds, run rulekitx doctor to inspect the status of your RuleKitX configuration:
1rulekitx doctorModel Chat / IDE Autocomplete:
To verify that your snippets were installed successfully, simply open your AI chat window (in Cursor, Claude Code, or OpenCode) or any text file in your IDE, and type /rulekitx. You should immediately see all available RuleKitX skills pop up in your autocomplete suggestions.
#Global Rules Configuration
Upon installation, RuleKitX automatically runs a postinstall script that creates a configuration directory in your user home directory to store active templates (rulekitx init).
This creates the following directory structure inside ~/.rulekitx/:
1~/.rulekitx/2├── core.md3└── skills/4 ├── engineering/5 │ ├── architect.md6 │ ├── refactor.md7 │ ├── reviewer.md8 │ └── safe-feature.md9 ├── design/10 │ ├── premium-ui.md11 │ └── redesign.md12 ├── execution/13 │ └── exec-complete.md14 └── standards/15 ├── api.md16 └── testing.md(Note: If the automatic initialization fails, or if you want to reset your templates to the default state, you can run rulekitx init manually.)
Additionally, rulekitx init triggers global IDE synchronization:
- Generates autocomplete snippets for VS Code, Cursor, and JetBrains.
- Automatically copies and registers active skills in OpenCode and Claude Code agents!
- Injects a managed, always-on core block into Claude/OpenCode always-loaded files.
#Project-Local Rules (Layered Auto-Read)
To configure project-specific rules, auto-detect your stack, and enable Cursor native background auto-read, run inside your project root:
1rulekitx init --localThis local initialization sets up Layer 3 Project Memory and exports the layers cleanly to prevent AI model confusion or context waste:
- Project Memory (
.rulekitx/project-memory.md): RuleKitX scans yourpackage.json, lockfile, and configurations to auto-detect your languages (TypeScript/JS), framework (Next.js, React, Svelte, etc.), styling systems, and testing setups. It structures these into a local memory file with helpful placeholders. - Cursor Rules (
.cursor/rules/): Auto-generates Cursor.mdcrules matched to their layer:rulekitx-core.mdcandrulekitx-project-memory.mdcare set withalwaysApply: trueso the AI is always grounded in core safety and stack conventions.- Domain skills (
rulekitx-api.mdc,rulekitx-premium-ui.mdc, etc.) are written as description-only so they function as Agent Requested rules, loading strictly on-demand.
- Claude Code & OpenCode: Injects a marker-delimited managed block (Core floor + Project Memory) into local
CLAUDE.mdandAGENTS.mdfiles.
Refreshing Project Memory
If you add new dependencies or styling packages, you can regenerate the local stack summary without overriding your manual documentation by running:
1rulekitx memory(Pass --force to completely overwrite and start fresh).
#Direct CLI Usage
You can also use RuleKitX programmatically or via direct CLI outputs to pipe composed system prompts to standard LLM clients:
-
Parse a prompt for command skills:
bash1rulekitx parse "/rulekitx-architect build a new feature" -
Compose the full XML-wrapped system prompt:
bash1rulekitx compose "/rulekitx-architect /rulekitx-reviewer build user login" -
Re-sync IDE integrations:
bash1rulekitx install-ide -
Uninstall RuleKitX rules and IDE integrations:
bash1rulekitx uninstall
For a comprehensive breakdown of all available CLI commands, see the CLI Reference.
#Next Steps
Now that you have RuleKitX initialized, you might want to:
- Learn about the Core Rules that govern all RuleKitX tasks.
- Explore the Skills Catalog to see what
/rulekitx-*commands are available. - Create your own project-specific rules via Custom Skills.