Ninja build system skill. An agent skill from mohitmishra786/low-level-dev-skills.

MITAuto-check passedDevelopment

Install Ninja

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill ninja -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills ninja --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/build-systems/ninja .claude/skills/ninja && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ninja
GitHub stars
253
Token cost
~1.2k tokens
SKILL.md length
323 words
Files
2 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

Ninja build system skill. An agent skill from mohitmishra786/low-level-dev-skills.

  • Works in 8 steps: Ninja as a CMake generator → Verbose output and diagnostics → Common Ninja flags → …
  • Diagnosing Ninja build failures
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Calls cmake

What it does

Ninja is an agent skill from mohitmishra786/low-level-dev-skills. Ninja build system skill. Use when diagnosing Ninja build failures, understanding Ninja's role as a low-level build executor generated by CMake or other meta-build systems, tuning parallelism, interpreting Ninja output, or working with build.ninja files. Activates on queries about ninja errors, ninja parallelism, ninja verbose output, build.ninja format, or ninja as a CMake generator.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/cheatsheet.md`).

It sits in Development. It works with C++. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Diagnosing Ninja build failures
  • Understanding Ninjas role as a low-level build executor generated by CMake
  • Other meta-build systems
  • Tuning parallelism

Example prompts

  • “/ninja”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Ninja as a CMake generator
  2. Verbose output and diagnostics
  3. Common Ninja flags
  4. Cleaning
  5. compile_commands.json
  6. build.ninja format (reference)
  7. Ninja sub-tools
  8. Common issues

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cmake

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ninja loads about 1.2k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 323 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 323 words, ~1,153 tokens.

Download SKILL.mdSave it as .claude/skills/ninja/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ninja
description
Ninja build system skill. Use when diagnosing Ninja build failures, understanding Ninja's role as a low-level build executor generated by CMake or other meta-build systems, tuning parallelism, interpreting Ninja output, or working with build.ninja files. Activates on queries about ninja errors, ninja parallelism, ninja verbose output, build.ninja format, or ninja as a CMake generator.
user-invocable
true
triggers
ninja build failure, ninja parallelism tuning, cmake ninja generator, interpret ninja output, build.ninja file format, ninja verbose output, ninja as cmake…

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:

bash
# 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:

bash
cmake -S . -B build -G "Ninja Multi-Config"
cmake --build build --config Release
cmake --build build --config Debug
2. Verbose output and diagnostics
bash
# 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

# Print all targets
ninja -t targets all

# Print targets grouped by rule
ninja -t targets rule cc

# Dependency graph (graphviz)
ninja -t graph myapp | dot -Tsvg -o deps.svg
3. Common Ninja flags
FlagEffect
-j NParallel jobs (default: CPUs + 2)
-l NDon't start new jobs if load average > N
-k NKeep going after N failures (default 1)
-vVerbose: show full command lines
-nDry run
-C dirChange to dir before doing anything
-t toolRun a sub-tool (clean, query, targets, graph, compdb)
4. Cleaning
bash
ninja -t clean          # remove build outputs
ninja -t clean -g       # also remove generated files

Or via CMake:

bash
cmake --build build --target clean
5. compile_commands.json

Ninja (via CMake) can generate a compile_commands.json for IDE integration and clang-tidy:

bash
cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -sf build/compile_commands.json .
6. build.ninja format (reference)

Rarely hand-written, but useful to understand for debugging:

ninja
# Variable
cflags = -Wall -O2

# Rule
rule cc
  command = gcc $cflags -c $in -o $out
  description = CC $in

# Build edge
build foo.o: cc foo.c

# Phony target
build all: phony foo.o

# Default target
default all

Key concepts:

  • rule: defines how to produce outputs from inputs
  • build: instantiates a rule with specific files
  • $in / $out: automatic variables for inputs/outputs
  • phony: a target that is always considered out of date (like .PHONY in make)
7. Ninja sub-tools
bash
# List all build targets
ninja -t targets

# Query dependencies of a target
ninja -t query myapp

# Clean (already mentioned)
ninja -t clean

# Generate compile_commands.json (if supported by generator)
ninja -t compdb cc cxx > compile_commands.json

# List rules
ninja -t rules
8. Common issues
IssueCauseFix
ninja: error: 'foo.o', needed by 'prog', missing and no known rule to make itMissing build ruleRegenerate with CMake; check add_executable source list
Build not picking up changesStale build.ninjaRe-run cmake -S . -B build
Very slow parallel build-j too high for I/O-bound buildUse -l$(nproc) to limit by load
Circular dependencyRule depends on itselfCheck CMake target dependencies

For the full Ninja command reference, build.ninja format details, and CMake integration patterns, see references/cheatsheet.md.

  • Use skills/build-systems/cmake for CMake configuration that generates Ninja files
  • Use skills/build-systems/make for Make-based projects

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/build-systems/ninja of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/cheatsheet.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Ninja next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ninja compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ninja this skillmohitmishra786/low-level-dev-skills253—~1.2kAutomated safety check: PassMIT
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause
YugabyteDB ASH Instrumentationyugabyte/yugabyte-db11k—~4.5kAutomated safety check: PassCustom licence
pybind11 Release Preparationpybind/pybind1118k—~1.7kAutomated safety check: PassCustom licence
Qt Cpp ReviewSerial-Studio/Serial-Studio7.2k—~4.3kAutomated safety check: PassCustom licence
Paddle Eager GraphPaddlePaddle/Paddle24k—~562Automated safety check: PassApache-2.0

Similar skills

  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • YugabyteDB ASH Instrumentation

    yugabyte/yugabyte-db

    Procedure for adding or changing YugabyteDB Active Session History wait states in TServer and DocDB C++ code, including the macro to use for sync and async paths.

    11k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens the pybind11 release-preparation pull request: picking the release base, bumping the version in common.h and integrating the changelog, following docs/release.rst.

    18k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Qt Cpp Review

    Serial-Studio/Serial-Studio

    Qt6/C++ deep code review for Serial Studio. An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~4.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Paddle Eager Graph

    PaddlePaddle/Paddle

    A skill your agent uses when navigating Paddle eager-mode (dynamic graph) source code, tracing forward/backward execution, debugging autograd issues, understanding PyLayer, or investigating…

    24k GitHub stars~562 tokensUpdated today
    DevelopmentAuto-check passed
  • ONNX Runtime Source Build

    microsoft/onnxruntime

    Official

    Builds ONNX Runtime from source with its build scripts, explaining the update, build and test phases, key flags and where the build output lands.

    22k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    253 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    253 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Ninja

What does Ninja do?

Ninja build system skill. An agent skill from mohitmishra786/low-level-dev-skills. Ninja is an agent skill from mohitmishra786/low-level-dev-skills. Ninja build system skill.

When should I use Ninja?

Ninja fits situations like: diagnosing Ninja build failures; understanding Ninjas role as a low-level build executor generated by CMake; other meta-build systems; tuning parallelism.

How do I install Ninja in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill ninja -a claude-code`. Or copy the skill folder (skills/build-systems/ninja in mohitmishra786/low-level-dev-skills) into .claude/skills/ninja in your project. Claude Code loads it when a task matches its description.

How do I install Ninja in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill ninja -a codex`. Or copy the skill folder (skills/build-systems/ninja in mohitmishra786/low-level-dev-skills) into .agents/skills/ninja in your project. Codex loads it when a task matches its description.

Can I use Ninja in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill ninja -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ninja, .gemini/skills/ninja, .github/skills/ninja and .opencode/skills/ninja in your project.

What does Ninja need to run?

Going by SKILL.md and its folder, Ninja needs the command-line tools its instructions call (cmake).

Does Ninja access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ninja safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ninja use?

Ninja is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ninja use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Ninja?

Skills that share tags, products or a category with Ninja: Qt C++ Code Review (x-tools-author/x-tools, 1.1k stars), YugabyteDB ASH Instrumentation (yugabyte/yugabyte-db, 11k stars), pybind11 Release Preparation (pybind/pybind11, 18k stars) and Qt Cpp Review (Serial-Studio/Serial-Studio, 7.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ninja?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 253 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.