/yoe:diagnosefrom yoe
Iteratively analyzes build logs for yoe-based projects, identifies root causes of build failures, applies fixes, and rebuilds until the unit succeeds.
Ships in yoe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze and fix unit build failures by reading the artifacts the failed build already left on disk, identifying the root cause, applying a fix to the unit or source, and only then rebuilding to verify.
A failed yoe build leaves everything you need under
build/<distro>/<unit>.<arch>/: the full build.log, the per-unit
executor.log, the extracted src/ tree, the destdir/ staging dir, and the
sysroot/ that holds the deps that were staged for this unit. Read those
artifacts first. Do not re-run the build to "see the error" — the error is
already captured, and a yoe build can take minutes per unit and re-sync modules.
Rebuilding is the last step (verification of a fix), never the first step of
diagnosis. If the artifacts are missing or you genuinely can't tell which build
produced them, ask the user rather than kicking off a rebuild to regenerate
them.
yoe build <unit> exits with error)/diagnose <unit> or /diagnose (most recent failure)Always start by locating the build log in the build directory — it is the single most useful artifact and almost always pinpoints the failure. The build tree is segmented by distro, and each unit directory carries its arch suffix:
build/<distro>/<unit>.<arch>/build.log full build output (configure/make/...)
build/<distro>/<unit>.<arch>/executor.log per-unit task summary: which task failed
where <distro> is alpine, debian, etc. and <unit>.<arch> is e.g.
openssl.x86_64 or file.arm64. executor.log names the failing task and unit
and tails the build log; build.log has the complete output. Read build.log's
end for the actual error, and skim executor.log to confirm which task and
unit failed (useful when a dep failed rather than the unit you named).
If you don't know which distro the failure is in, ask the user before guessing — the same unit can build under multiple distros, and reading the wrong log wastes a cycle. Once you know the distro, find the most recent failure:
ls -lt build/<distro>/*/build.log | head -5
If the user specified a unit name, go straight to its log under the chosen distro. Read the end of the log first — the error is almost always in the last 100 lines:
Read build/<distro>/<unit>.<arch>/build.log (last 100 lines)
Shortcut: yoe log [unit] prints the build log for the most recent failure (or
a named unit) without hunting for the path, and yoe log -e [unit] opens it in
your editor. The underlying file is still
build/<distro>/<unit>.<arch>/build.log — reach for it directly when you need a
specific distro's log or want to read a slice with the Read tool.
If the error references earlier output (e.g., a missing header first used hundreds of lines up), read more context as needed.
When the error is a missing dependency — a header not found, or a linker probe
that fails (checking for gzopen in -lz... no, cannot find -lfoo,
configure: error: <feature> support requested but not found) — confirm it
straight from disk instead of rebuilding. The deps that were staged for this
unit live in its own sysroot:
ls build/<distro>/<unit>.<arch>/sysroot/
find build/<distro>/<unit>.<arch>/sysroot -iname 'lib<name>*' -o -iname '<name>.h'
An empty sysroot, or one missing the expected lib<name>.so / <name>.h,
means the dependency was never staged — the build edge to it was dropped or the
dep never materialized, not that the dep's own build failed. Cross-check against
a sibling unit that built successfully
(ls build/<distro>/<other-unit>.<arch>/sysroot/) to see what a populated
sysroot looks like. On Debian/apt distros, remember the split: configure-time
link probes need the -dev package (headers + the unversioned lib*.so
symlink), while distro_runtime_deps only pull the runtime libN package — a
sysroot that has libfoo1 but not libfoo-dev will fail every -lfoo link
test. Whether the missing dep has a build directory at all
(ls -d build/<distro>/<depname>.<arch> exists?) tells you if it was ever
scheduled.
Load the unit's .star file to understand what's being built, its dependencies,
build class, configure args, and any custom build steps:
Find and read modules/**/units/**/<unit>.star
Common failure categories in order of likelihood:
deps list. Check if the dep
is built and installed to build/sysroot/. If the dep has no unit yet,
create one — do not install it in the Dockerfile via apk add. Every
library the system needs must be built from source as a unit.makeinfo,
help2man, bison) is not in the container. The fix is never to install
it in the Dockerfile. Instead, either disable the feature that needs it
(e.g., --disable-docs) if it's non-essential, or write a new unit that
builds the tool from source and add it as a deps entry so it lands in the
sysroot before this unit builds. The Dockerfile provides only the minimal
bootstrap toolchain../configure or cmake can't find a feature or
path. Check configure_args in the unit and verify paths reference
/build/sysroot.build/<distro>/<unit>/src/ for .rej files or git errors in the log.make -j. Look for "No
rule to make target" or missing generated files. Retry with make -j1 as a
diagnostic step.Based on the root cause, apply the appropriate fix:
deps list in the .star file. If no unit
exists for the dependency, create one first. Never install the missing library
in the Dockerfile.configure_args in the unitAlways explain what was found and what the fix is before applying it.
This is the only step that runs a build, and only after a fix is applied — it verifies the fix, it is not how you reproduce or investigate the failure. Target the same distro whose log you diagnosed so the rebuild lands in the right tree:
yoe build --force --distro <distro> <unit>
Use --force (not --clean) to skip the cache but preserve the source tree.
Use --clean only if the source tree itself is corrupted or needs a fresh
extract.
Read the build output. If the build succeeds, report the fix. If it fails again, go back to Step 1 with the new log — the next error may be different (e.g., fixing a missing header reveals a missing library).
| Path | Contents |
|---|---|
build/<distro>/<unit>.<arch>/build.log | Full build output |
build/<distro>/<unit>.<arch>/executor.log | Per-unit task summary: which task/unit failed |
build/<distro>/<unit>.<arch>/build.json | Status, hash, timing, error for this unit |
build/<distro>/<unit>.<arch>/src/ | Extracted source tree |
build/<distro>/<unit>.<arch>/destdir/ | Install staging directory |
build/<distro>/<unit>.<arch>/sysroot/ | This unit's staged deps (headers/libs) |
modules/**/units/**/<unit>.star | Unit definition |
<distro> is alpine, debian, etc.; the unit directory carries its arch
suffix (e.g. openssl.x86_64, file.arm64). The sysroot/ is per-unit — it
holds exactly the deps staged for that one unit, so an empty or incomplete
sysroot is itself a diagnosis (see Step 2).
build/<distro>/<unit>/sysroot/ directly — it's
populated automatically from built artifacts.build/<distro>/<unit>/src/ as a permanent fix
— changes there are lost on rebuild. Instead, create a patch in the unit.build.log, executor.log, src/, destdir/, and sysroot/ — diagnose
from those. The only rebuild is Step 6, to verify a fix you already
identified.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub yoebuild/yoe --plugin yoe6 skills in this plugin
/audit-unitThis skill should be used when the user asks to "audit a unit", "review a unit", "check a unit", "/audit-unit", or wants to verify that a unit follows best practices and has no common issues. Reviews a unit for correctness, completeness, and quality.
/new-unitThis skill should be used when the user asks to "create a unit", "add a unit", "new unit", "package something", "/new-unit", or provides a URL or project name to be packaged for Yoe. Generates a complete Starlark .star unit file from a source URL or description.
/pulling-alpine-packagesUse when a build needs a tool or library that Alpine Linux already packages (cross compilers, niche build tools, language runtimes without a source unit) and the instinct is to write a from-source unit. Triggers: missing-tool build errors, foreign-arch cross toolchain needs (e.g. armv7-R, riscv), questions about whether `module-alpine` already has package X, or "/pull-alpine".
/serial-consoleThis skill should be used when a board is attached to the host and the user asks what it printed, whether it booted, why it stopped at U-Boot or a kernel panic, to "check the serial console", "watch the board boot", "send a command to the board", "/serial-console", or when a build or deploy needs to be verified on real hardware. Reads and drives the board's serial console through `yoe serial`.
/update-unitThis skill should be used when the user asks to "update a unit", "bump a unit", "upgrade a unit", "update to latest version", "/update-unit", or mentions that a unit needs a version bump. Bumps a unit to the latest upstream version with a test build.
Other plugins' skills for the same job