This is what you reach for when Ninja build output is cryptic or you need to understand what CMake is doing under the hood. It covers the practical stuff: getting verbose output with `-v`, controlling parallel jobs, generating compile_commands.json for tooling, and reading those auto-generated build.ninja files when something breaks. The cheatsheet format for flags and common errors is handy. Most developers only interact with Ninja through CMake, so the skill wisely focuses on that workflow first, then digs into the lower-level tools and debugging commands for when builds fail in non-obvious ways.
- skills.sh installs
- 681
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill ninja --agent claude-codeInstalls into .claude/skills of the current project.
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.ninjafile?"
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
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- DevOps & CI/CD, Code Review & Quality, Automation & Workflows
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54- Heaptrack676
- Rust Profiling673
- Ebpf672
- Msvc Cl671
- Fuzzing670
- Binutils665
- Linkers Lto663
- Conan Vcpkg659
- Dynamic Linking650
- Rust Security624
- Rust Ffi613
- Rust Unsafe611
- Pgo610
- Interpreters609
- Cargo Workflows608
- Rust Sanitizers Miri604
- Meson603
- Cpp Modules597
- Rust Debugging597
- Hardware Counters590
- Debug Optimized Builds579
- Cpp Templates574
- Rustc Basics567
- Rust Cross565
