nx-rules

A set of instructions for an Nx workspace, a repository that manages multiple related projects, using pnpm to manage packages. It tells the coding agent how to inspect the workspace, consult Nx documentation, understand project dependencies, and generate code.

In plain words
What is it for?
Use it when answering Nx questions, investigating configuration or project-graph errors, viewing task dependencies, or generating code with Nx.
Why use it?
It helps the agent work from the workspace’s actual structure and dependency graph instead of guessing about configuration or project relationships.

Cursor 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.

agentmods
npx agentmods add rules/charlee-x/effect-cursor-rules/nx-rules
Clone the repo
git clone --depth 1 https://github.com/CharLEE-X/effect-cursor-rules
Per session 544 This file is loaded in full into every session.
When invoked 544 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00544 $0.00544
Opus 5 $0.00272 $0.00272
Sonnet 5 $0.00109 $0.00109
Haiku 4.5 $0.00054 $0.00054

Measured 2d ago against content hash 9e6425c8e4a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nx-rules 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 2d ago.

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.

rules/nx-rules.mdc · 42 lines

How it starts

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

// This file is automatically generated by Nx Console

You are in an nx workspace using Nx 21.1.1 and pnpm as the package manager.

You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:

General Guidelines

  • When answering questions, use the nx_workspace tool first to gain an understanding of the workspace architecture
  • For questions around nx configuration, best practices or if you're unsure, use the nx_docs tool to get relevant, up-to-date docs!! Always use this instead of assuming things about nx configuration
  • If the user needs help with an Nx configuration or project graph error, use the 'nx_workspace' tool to get any errors
  • To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool

Generation Guidelines

If the user wants to generate something, use the following flow:

  • learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable
  • get the available generators using the 'nx_generators' tool
  • decide which generator to use. If no generators seem relevant, check the 'nx_available_plugins' tool to see if the user could install a plugin to help them
  • get generator details using the 'nx_generator_schema' tool
  • you may use the 'nx_docs' tool to learn more about a specific generator or technology if you're unsure
  • decide which options to provide in order to best complete the user's request. Don't make any assumptions and keep the options minimalistic
  • open the generator UI using the 'nx_open_generate_ui' tool
  • wait for the user to finish the generator
  • read the generator log file using the 'nx_read_generator_log' tool
  • use the information provided in the log file to answer the user's question or continue with what they were doing

CI Error Guidelines

If the user wants help with fixing an error in their CI pipeline, use the following flow:

  • Retrieve the list of current CI Pipeline Executions (CIPEs) using the 'nx_cloud_cipe_details' tool
  • If there are any errors, use the 'nx_cloud_fix_cipe_failure' tool to retrieve the logs for a specific task
  • Use the task logs to see what's wrong and help the user fix their problem. Use the appropriate tools if necessary
  • Make sure that the problem is fixed by running the task that you passed into the 'nx_cloud_fix_cipe_failure' tool

Read the full file on GitHub · 42 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. 2d ago First seen · 42 lines · 544 tokens per session scan A 9e6425c8e4a4

Subscribe to this mod's changes

nx-rules is a cursor rule published in the GitHub repository CharLEE-X/effect-cursor-rules (6 stars, last pushed 1y ago), licensed MIT. It adds 544 tokens to every session, about $0.0027 per session on Opus 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-08-31.