nx: Command for Claude Code

.claude/commands/gh-issue-plan.md

gh-issue-plan is a command for Claude Code from nrwl/nx. It costs 0 tokens per session (857 once invoked), scanned A, original, MIT.

A command guide for planning and resolving GitHub issues, which are tracked requests, bugs, or tasks in a code repository. It describes an automated workflow that creates plans, implements changes, runs tests, and prepares a feature branch for review.

In plain words
What is it for?
Use it to analyze an issue, document its cause and impact, list affected files, plan tests, implement the fix, and prepare the changes for a pull request.
Why use it?
It gives issue work a repeatable path from understanding the problem to validating a possible solution.

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/gh-issue-plan.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 gh-issue-plan

README.md
[![agentmods](https://agentmods.dev/badge/commands/nrwl/nx/gh-issue-plan/github.svg)](https://agentmods.dev/commands/nrwl/nx/gh-issue-plan)
Your own site
<a href="https://agentmods.dev/commands/nrwl/nx/gh-issue-plan"><img src="https://agentmods.dev/badge/commands/nrwl/nx/gh-issue-plan/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 gh-issue-plan

Your own site · 80×15
<a href="https://agentmods.dev/commands/nrwl/nx/gh-issue-plan"><img src="https://agentmods.dev/badge/commands/nrwl/nx/gh-issue-plan.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 857 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.00857
Opus 5.5 $0.00000 $0.00343
Sonnet 5.5 $0.00000 $0.00171
Haiku 4.5 $0.00000 $0.00086

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

Security

Grade A, and why

gh-issue-plan 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/gh-issue-plan.md · 156 lines

How it starts

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

GitHub Issue Planning and Resolution

This command provides guidance for both automated and manual GitHub issue workflows.

Automated Workflow (GitHub Actions)

The automated workflow consists of two phases:

Phase 1: Planning (@claude plan or claude:plan label)

  • Claude analyzes the issue and creates a detailed implementation plan
  • Plan is posted as a comment on the issue
  • Issue is labeled with claude:planned

Phase 2: Implementation (@claude implement or claude:implement label)

  • Claude implements the solution based on the plan
  • Runs validation tests and creates a feature branch
  • Suggests opening a PR with proper formatting

Planning Phase Template

When creating a plan (either automated or manual), include these sections:

Problem Analysis

  • Root cause identification
  • Impact assessment
  • Related components or systems affected

Proposed Solution

  • High-level approach
  • Alternative solutions considered
  • Trade-offs and rationale

Implementation Details

  • Files that need to be modified
  • Key changes required
  • Dependencies or prerequisites

Testing Strategy

  • Unit tests to add/modify
  • Integration tests needed
  • E2E test considerations

Validation Steps

# Test specific affected projects
nx run-many -t test,build,lint -p PROJECT_NAME

# Test all affected projects
nx affected -t build,test,lint

# Run affected e2e tests
nx affected -t e2e-local

# Format code
npx oxfmt FILES

# Final validation
pnpm nx prepush

Risks and Considerations

  • Breaking changes
  • Performance implications
  • Migration requirements

Manual Workflow

When working on a GitHub issue manually, follow this systematic approach:

1. Get Issue Details

# Get issue details using GitHub CLI (replace ISSUE_NUMBER with actual number)
gh issue view ISSUE_NUMBER

When cloning reproduction repos, please clone within ./tmp/claude/repro-ISSUE_NUMBER

2. Analyze the Plan

  • Look for a plan or implementation details in the issue description
  • Check comments for additional context or clarification
  • Identify affected projects and components

Read the full file on GitHub · 156 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. 1mo ago First seen · 156 lines · 0 tokens per session scan A 3dcbe3d04fb5

Subscribe to this mod's changes

gh-issue-plan 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 857 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.