Use Pigweed Toolchain Tools
Skill561 starsChanged 16 days agoApache-2.0View on GitHub
Run toolchain binaries (objdump, nm, size, readelf, strip, etc) to disassemble code, list symbols, analyze binary size, and inspect ELF artifacts. MUST be used instead of system tools.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- pw_ghish/AGENTS.mdAGENTS.md
- pw_ide/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- BluetoothSkill
- Code ReviewSkill
- crankSkill
- docsSkill
- freshenSkill
- ghishSkill
- manual-cli-testSkill
- oncallSkill
- pw_async2Skill
- Pigweed Kernel TestingSkill
- C++ Pigweed RPC ServicesSkill
- respondSkill
- reviewSkill
- run-presubmit-checksSkill
- saleae-analyzerSkill
- Multi-Agent Worktree & Bazel Cache ManagementSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When you need to inspect build artifacts using standard tools like objdump, nm, size, readelf, or strip, DO NOT use your local system …
- Very specific: line 12
Instead, use the runnable targets in //pw_toolchain/cc/current_toolchain.
- Very specific: line 16
Run the tools via bazelisk run with the appropriate --config (e.g., rp2350 or host).
- Distinctive: line 68
Use this skill whenever you need to inspect binary artifacts generated by the build.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Use Pigweed Toolchain Tools
When you need to inspect build artifacts using standard tools like objdump, nm, size, readelf, or strip, DO NOT use your local system binaries or search for toolchain paths in the filesystem.
Local system tools often lack support for the target architecture (e.g., a host nm cannot read an ARM ELF), and Pigweed's hermetic toolchain binaries are stored in internal Bazel directories that are difficult to access manually.
Instead, use the runnable targets in //pw_toolchain/cc/current_toolchain. These targets dynamically resolve the correct tool from the active toolchain's action mapping, ensuring you use the exact same binary and configuration as the build itself.
Usage
Run the tools via bazelisk run with the appropriate --config (e.g., rp2350 or host).
Supported Tools
| Tool | Target (under //pw_toolchain/cc/current_toolchain:) |
| objdump | :objdump |
| nm | :nm |
| size | :size |
| readelf | :readelf |
| strip | :strip |
| ar | :ar |
| ld | :ld |
| cc / c++ | :cc / :c++ |
| cov | :cov |
| gcov | :gcov |
[!IMPORTANT] Interactive use only: These targets must only be used with
bazelisk run. Do NOT use them as dependencies (srcs,deps) in other rules, as Bazel's configuration transitions will likely select the wrong tool for the context.
[!NOTE] Tool availability depends on the suite (LLVM, GCC, or Zephyr variants). These targets work seamlessly across all supported toolchains—for example, when targeting an ARM MCU,
:nmwill correctly resolve toarm-none-eabi-nmor the Zephyr equivalent based on your configuration.
Examples
Disassemble a binary
The target must be built first so the binary exists. When passing file paths to bazelisk run, use absolute paths (e.g., $PWD/...) because the tool runs from the execution root, not the current working directory.
# 1. Build the target
bazelisk build --config=rp2350 //pw_status:status_test
# 2. Run objdump with the absolute path to the binary
bazelisk run --config=rp2350 //pw_toolchain/cc/current_toolchain:objdump -- -d "$PWD/bazel-bin/pw_status/status_test"Check binary size
bazelisk build --config=rp2350 //pw_status:status_test
bazelisk run --config=rp2350 //pw_toolchain/cc/current_toolchain:size -- "$PWD/bazel-bin/pw_status/status_test"List symbols
bazelisk build --config=rp2350 //pw_status:status_test
bazelisk run --config=rp2350 //pw_toolchain/cc/current_toolchain:nm -- "$PWD/bazel-bin/pw_status/status_test"When to use this skill
Use this skill whenever you need to inspect binary artifacts generated by the build. This ensures compatibility across different host OSes and toolchain versions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

