Skip to content

Ninja build executor skill covering CMake generation, parallelism tuning, diagnostics, and build.ninja internals.

CCM score
56 of 100
skills.sh installs
778
GitHub stars
303
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Ninja as a low-level build executor: CMake generation with -G Ninja, direct invocation, and Ninja Multi-Config builds
  • Includes diagnostic flags such as -v, -n, -d explain, and -t targets, plus a common-issues table for missing rules and stale files
  • Explains -j, -l, and -k for parallelism and failure handling, with compile_commands.json export for IDE and clang-tidy use
  • Designed for agents diagnosing Ninja failures or reading build.ninja files, and links to CMake and Make skills for related workflows

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill ninja -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Ninja

Purpose

Guide agents through Ninja as a build executor: diagnosing failures, controlling parallelism, generating from CMake, and understanding the .ninja file format when needed.

Triggers

  • "Ninja is failing — how do I get more output?"
  • "How do I use Ninja with CMake?"
  • "How many parallel jobs does Ninja use?"
  • "How do I add a custom build step in Ninja?"
  • "What is a build.ninja file?"

Workflow

1. Ninja as a CMake generator

The most common use of Ninja is as the build executor for CMake:

# Configure with Ninja
cmake -S . -B build -G Ninja
cmake --build build                    # uses ninja internally

# Or invoke ninja directly
cd build && ninja

# Specify parallelism
ninja -j4
ninja -j$(nproc)

# Build specific target
ninja myapp
ninja install

CMake also supports Ninja Multi-Config:

cmake -S . -B build -G "Ninja Multi-Config"
cmake --build build --config Release
cmake --build build --config Debug

2. Verbose output and diagnostics

# Show full commands (not just [CC] foo.c)
ninja -v

# Dry run (show what would be built)
ninja -n

# Show why a target needs rebuilding
ninja -d explain myapp

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Categories
CLI & Terminal, DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the ninja skill help with?

The ninja skill guides agents through diagnosing Ninja build failures, tuning parallelism, interpreting Ninja output, and working with build.ninja files. It explains Ninja's role as the low-level build executor that CMake and other meta-build systems generate.

How do I install the ninja skill?

Run npx -y skills add mohitmishra786/low-level-dev-skills --skill ninja -y in your project. Once installed, the agent can use the skill when you ask about Ninja errors, parallelism, or build.ninja format.

Where does the ninja skill sit in the CLI and Terminal category?

The ninja skill is listed in the CLI and Terminal category on Claude Marketplaces, alongside herdr, gws-shared, opentui, cf-cli and pnpm. It stands out for its focus on Ninja as a CMake generator and on reading build.ninja files.

Does the ninja skill cover using Ninja with CMake?

Yes, the skill covers configuring CMake with the Ninja generator, including the Ninja Multi-Config option, and building specific targets. It also shows how to generate compile_commands.json for IDE and clang-tidy use.

Can the ninja skill help with verbose output and dependency graphs?

Yes, the skill explains flags such as -v for full command lines, -n for dry runs, and -d explain to see why a target rebuilds. It also covers graphing dependencies with ninja -t graph and clean commands.

More from mohitmishra786/low-level-dev-skills

All 54

Similar to Ninja

More CLI & Terminal