nx: Command for Claude Code

.claude/commands/commit.md

commit is a command for Claude Code from nrwl/nx. It costs 0 tokens per session (311 once invoked), scanned A, original, MIT.

A command for creating a git commit after formatting, testing, and validating changed code according to Nx repository standards. A git commit is a saved set of project changes.

In plain words
What is it for?
Use it to format modified files, run the pre-push checks and affected tests, stage relevant changes, and create a conventional commit.
Why use it?
It reduces the chance of committing unformatted or failing code and encourages consistent commit messages.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is nrwl/nx's own configuration. It tells Claude Code how to work on nx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nx configures →

View source ↗ nrwl/nx nx.dev
About the project

Nx is a tool for managing monorepos, which are repositories containing multiple related projects, across TypeScript and other languages. It helps development teams and AI agents run only affected tasks, cache build results, generate code, and coordinate continuous integration. The catalogue add-ons provide agent skills, commands, agents, instructions, and settings for working with Nx.

nrwl/nx · 29,421 stars · on GitHub · nx.dev

Reuse

Borrowing it

Nothing to install: this file belongs to nrwl/nx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nrwl/nx/master/.claude/commands/commit.md
Clone the repo
git clone --depth 1 https://github.com/nrwl/nx

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for commit

README.md
[![agentmods](https://agentmods.dev/badge/commands/nrwl/nx/commit/github.svg)](https://agentmods.dev/commands/nrwl/nx/commit)
Your own site
<a href="https://agentmods.dev/commands/nrwl/nx/commit"><img src="https://agentmods.dev/badge/commands/nrwl/nx/commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for commit

Your own site · 80×15
<a href="https://agentmods.dev/commands/nrwl/nx/commit"><img src="https://agentmods.dev/badge/commands/nrwl/nx/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 311 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00311
Opus 5.5 $0.00000 $0.00124
Sonnet 5.5 $0.00000 $0.00062
Haiku 4.5 $0.00000 $0.00031

Measured 1mo ago against content hash 4103d0ca37f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

commit 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 1mo 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.

.claude/commands/commit.md · 48 lines

What it actually says

Commit Command

Description

Create a git commit following Nx repository standards and validation requirements.

Usage

/commit [message]

What this command does:

  1. Pre-commit validation: Runs the full validation suite (pnpm nx prepush) to ensure code quality
  2. Formatting: Automatically formats changed files with oxfmt
  3. Testing: Runs tests on affected projects to validate changes
  4. Commit creation: Creates a well-formed commit with proper message formatting (without co-author attribution)
  5. Status reporting: Provides clear feedback on the commit process

Workflow:

  1. Format any modified files with oxfmt
  2. Run the prepush validation suite
  3. If validation passes, stage relevant changes
  4. Create commit with descriptive message
  5. Provide summary of what was committed

Commit Message Format:

  • Use conventional commit format when appropriate
  • Include scope (e.g., feat(core):, fix(angular):, docs(nx):)
  • Keep first line under 72 characters
  • Include detailed description if needed

Examples:

  • /commit "feat(core): add new project graph visualization"
  • /commit "fix(react): resolve build issues with webpack config"
  • /commit "docs(nx): update getting started guide"

Validation Requirements:

  • All tests must pass
  • Code must be properly formatted
  • No linting errors
  • E2E tests for affected areas should pass
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. 1mo ago First seen · 48 lines · 0 tokens per session scan A 4103d0ca37f6

Subscribe to this mod's changes

commit is a command published in the GitHub repository nrwl/nx (29,421 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 311 tokens. 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-30.