I built a CLI that writes AI rules once for Claude Code, Cursor, and Codex — Cursor Blog | Neura Market
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityExtensionsTrendingGenerate
    CursorBlogI built a CLI that writes AI rules once for Claude Code, Cursor, and Codex
    Back to Blog
    I built a CLI that writes AI rules once for Claude Code, Cursor, and Codex
    claudecode

    I built a CLI that writes AI rules once for Claude Code, Cursor, and Codex

    JSK9999 February 25, 2026
    0 views

    Every AI coding tool has its own rule format. Claude Code uses .claude/rules/*.md. Cursor uses...

    Every AI coding tool has its own rule format. Claude Code uses `.claude/rules/*.md`. Cursor uses `.cursor/rules/*.mdc`. Codex uses `.codex/AGENTS.md`. If you use more than one tool, you end up copy-pasting rules between formats, and they inevitably drift apart. On top of that, every prompt loads ALL your rules — even when most of them are irrelevant — wasting tokens and degrading response quality. I built **ai-nexus** to fix both problems. ## What is ai-nexus? ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yuq4uek4nwzpug7h0a17.gif) ai-nexus is a CLI tool that lets you write AI coding rules once in plain Markdown and deploy them across Claude Code, Cursor, and Codex automatically. - **Claude Code** → `.claude/rules/` with semantic routing (only relevant rules loaded per prompt) - **Cursor** → `.cursor/rules/*.mdc` with auto-converted frontmatter - **Codex** → `.codex/AGENTS.md` aggregated from all your rules One source of truth. Every tool stays in sync. ## Quick start The interactive wizard asks which tools you use, which rule categories you want, and sets everything up — hooks, settings, symlinks, format conversion. Done in 30 seconds. `npx ai-nexus install` Or quick install with defaults: `npx ai-nexus install -q` Or use your team's rules: `npx ai-nexus install --rules github.com/your-org/team-rules` ## Key features ### Semantic Router — load only what you need Most setups load every rule file on every prompt. If you have 30+ rules, that's a lot of wasted context. ai-nexus includes a Semantic Router that runs as a Claude Code hook on each prompt. It analyzes your prompt and picks only the 2-3 rules you actually need. - **With AI routing** (recommended): GPT-4o-mini or Claude Haiku selects rules. Cost: ~$0.50/month. - **Without AI** (free fallback): Keyword matching activates rules based on words in your prompt. Result: better AI responses + lower token costs. Example output: `$ npx ai-nexus test "write a react component with hooks"` Selected rules (3): - rules/essential.md - rules/react.md - skills/react.md ### Write once, deploy everywhere Write a single `.md` rule file with a description in the frontmatter. ai-nexus automatically converts it to: - `.mdc` format for Cursor (with description and alwaysApply frontmatter) - Aggregated `AGENTS.md` for Codex - Semantic-routed `.md` for Claude Code No more copy-pasting between formats. ### Team rules via Git Share rules across your entire team with a Git repository: `npx ai-nexus install --rules github.com/acme/team-rules` When rules are updated: `npx ai-nexus update` Updates are non-destructive — your local customizations are never overwritten. Only new files from the source are added. ### Community marketplace ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tugim71fmmselyqc14t8.png) Browse, search, install, and remove community-contributed rules — from your browser or CLI: `npx ai-nexus browse` Search and download from the CLI: `npx ai-nexus search react` `npx ai-nexus get react.md` Anyone can contribute rules via PR. They become available immediately after merge — no npm publish needed. ## How each tool integration works **Claude Code — Semantic Router** A hook runs on every prompt. It moves relevant rules into `.claude/rules/` (active) and parks the rest in `rules-inactive/`. Only active rules are loaded into context. **Cursor — Rule Converter** ai-nexus converts your `.md` rules to Cursor's `.mdc` format, automatically adding frontmatter. After that, Cursor's own built-in semantic search handles the filtering. **Codex — Aggregated Rules** All individual rule files are merged into a single `AGENTS.md` file, loaded at session start. ## All commands - **install** — Interactive setup wizard - **install -q** — Quick install with defaults - **init** — Install in current project - **update** — Sync latest rules (respects local changes) - **list** — Show installed rules - **test** — Preview which rules would load - **search** — Search community registry - **get** — Download a community rule - **add** — Add rules from a Git repo - **remove** — Remove a rule source - **browse** — Open marketplace in browser - **doctor** — Diagnose installation issues - **uninstall** — Remove ai-nexus ## Links - [GitHub](https://github.com/JSK9999/ai-nexus) - [npm](https://www.npmjs.com/package/ai-nexus) - [Homepage](https://jsk9999.github.io/ai-nexus/) - [Documentation](https://jsk9999.github.io/ai-nexus/docs.html) If you use multiple AI coding tools and are tired of managing rules separately, give it a try: `npx ai-nexus install` Feedback, issues, and rule contributions are all welcome! **What about you?** How do you manage your AI coding rules across different tools? Do you copy-paste between formats, or have you found a better workflow? I'd love to hear what's working (or not working) for you.

    Tags

    claudecodecursoraiopensource

    Comments

    More Blog

    View all
    Cursor vs Claude Code in 2026: Which AI Coding Tool Actually Makes You Faster?claudecode

    Cursor vs Claude Code in 2026: Which AI Coding Tool Actually Makes You Faster?

    I've spent the last three months shipping production code with both Cursor and Claude Code. Not toy...

    A
    Atlas Whoff
    The 5 MCPs that actually changed how I use Cursor and Claude Codeai

    The 5 MCPs that actually changed how I use Cursor and Claude Code

    I've been testing MCPs heavily in Cursor and Claude Code. Here are the 5 that actually changed how I...

    V
    vdalhambra
    AI-Powered Development 2026: Beyond Basic Code Generationaicoding

    AI-Powered Development 2026: Beyond Basic Code Generation

    AI-Powered Development 2026: Beyond Basic Code Generation How AI assistants have evolved...

    L
    lufumeiying
    Cursor AI vs GitHub Copilot: Developer Comparison 2025microsoft

    Cursor AI vs GitHub Copilot: Developer Comparison 2025

    Cursor AI vs GitHub Copilot: Developer Comparison 2025 The AI-Powered Code Completion...

    I
    Icarax
    How to Build 3D & AR Apps with AI — Cursor, Windsurf, Claude Codeai

    How to Build 3D & AR Apps with AI — Cursor, Windsurf, Claude Code

    AI coding assistants are great at generating UI code. But ask them to build a 3D scene or an AR...

    T
    Thomas Gorisse
    AI Coding Market Share 2026: Who's Winning?aitools

    AI Coding Market Share 2026: Who's Winning?

    Claude Code holds 54% of the AI coding market. Cursor hit $2B ARR. Copilot leads enterprise. Here's what the 2026 numbers actually mean.

    J
    Jangwook Kim

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.