staticphp-build-troubleshooting
Systematically triages StaticPHP v3 build and compilation failures by analyzing shell and config logs.
Install
mkdir -p .claude/skills/staticphp-build-troubleshooting && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18439" && unzip -o skill.zip -d .claude/skills/staticphp-build-troubleshooting && rm skill.zipInstalls to .claude/skills/staticphp-build-troubleshooting
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Diagnose StaticPHP v3 failures. Use when investigating build, compile, linker, download, doctor, environment, CI, smoke-test, terminal output, spc.output.log, spc.shell.log, config.log, CMake logs, or user-provided error snippets from StaticPHP commands.Key capabilities
- →Triage StaticPHP failures from command and environment
- →Inspect log files in a specific order for diagnosis
- →Identify failing package, stage, command, and root cause
- →Reproduce failures using focused commands
- →Diagnose package YAML issues
- →Diagnose build command or patch issues
How it works
The skill diagnoses StaticPHP v3 build failures by analyzing command details, environment, and log files in a specific order. It identifies the failing component and suggests a fix direction without prematurely altering core code.
Inputs & outputs
When to use staticphp-build-troubleshooting
- →Debug failed StaticPHP builds
- →Analyze CMake linker errors
- →Interpret spc.output.log and spc.shell.log
- →Troubleshoot PHP extension compilation
About this skill
StaticPHP Build Troubleshooting
Overview
Use this skill to triage StaticPHP failures from the outside in: command and environment first, SPC module/stage metadata next, shell/config logs last. The goal is to isolate the failing package, stage, command, and root cause before editing code.
First Pass
- Capture the exact command, OS, architecture, PHP version, extensions/libs/targets, and whether the run used
-v,-vv, or-vvv. - Read the final terminal error first. StaticPHP prints module error info, failed package, failed stage, failed command, log paths, and extra log files when available.
- If log files exist, inspect them in this order:
log/spc.output.log: user-facing SPC messages and exception summary.log/spc.shell.log: executed commands, working directories, env, stdout/stderr.- Extra logs named in the exception output:
php-src.config.log,lib.<pkg>.console.log,lib.<pkg>.cmake-error.log,lib.<pkg>.cmake-configure.log,lib.<pkg>.cmake-output.log.
- Read
references/log-triage.mdfor pattern matching, likely causes, and next checks.
Diagnosis Rules
- Do not start by changing shared core code. Most failures are package metadata, environment, upstream source, dependency order, or platform flags.
- Prefer evidence from the last failing command over earlier warnings.
- When logs are long, search backward for
Command exited,error:,undefined reference,not found,No package,CMake Error,configure: error,fatal error,Failed module, andFailed stage. - Use
config.logand CMake logs for configure detection failures; usespc.shell.logfor the actual command and env. - Be careful with rebuild suggestions.
spc reset --with-download --yesis destructive to caches; ask before clearing caches unless the user explicitly asked.
Repro Commands
Use focused commands when reproducing:
php bin/spc doctor -vvv
php bin/spc download --for-extensions="curl,openssl" --with-php=8.5 --parallel=4 --retry=3 -vvv
php bin/spc build:libs "openssl" -vvv
php bin/spc build:php "bcmath,openssl,curl" --build-cli -vvv
php bin/spc dev:lint-config
Choose the smallest command that still reaches the failing package.
Fix Direction
After finding the failing package/stage:
- Package YAML issue: use
$staticphp-package-maintenance, then editconfig/pkg/*orconfig/artifact/*. - Build command or patch issue: inspect the package class under
src/Package/*. - Environment issue: check
doctor, toolchain classes, andconfig/pkg/tool/*. - Upstream download issue: check artifact type, regex, GitHub rate limiting, mirror behavior, and
GITHUB_TOKEN. - Core exception/logging issue: inspect
src/StaticPHP/Exception,src/StaticPHP/Runtime/Shell, or executor classes only after package-level causes are ruled out.
Resources
references/log-triage.md: log files, failure categories, search patterns, and likely fixes.
When not to use it
- →When the failure is not related to StaticPHP v3 builds.
- →When the user wants to start by changing shared core code.
Limitations
- →The skill is for diagnosing StaticPHP v3 failures.
- →The skill does not start by changing shared core code.
- →The skill prefers evidence from the last failing command over earlier warnings.
How it compares
This skill provides a structured, outside-in approach to StaticPHP build troubleshooting, prioritizing log analysis and specific diagnosis rules over immediate code changes, unlike a generic debugging process.
Compared to similar skills
staticphp-build-troubleshooting side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| staticphp-build-troubleshooting (this skill) | 0 | 21d | Review | Intermediate |
| analyze-docker-image-size | 0 | 5mo | Review | Intermediate |
| debug-cluster | 2 | 8mo | Review | Intermediate |
| railway-deployment | 1 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
analyze-docker-image-size
dykyi-roman
Analyzes Docker image size for PHP projects. Identifies bloated layers, unnecessary packages, and provides size reduction strategies.
debug-cluster
openshift
Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or troubleshooting control plane issues.
railway-deployment
davila7
Manage Railway deployments - view logs, redeploy, restart, or remove deployments. Use for deployment lifecycle (remove, stop, redeploy, restart), deployment visibility (list, status, history), and troubleshooting (logs, errors, failures, crashes). NOT for deleting services - use railway-environment skill with isDeleted for that.
doctor
louisphamdev
**SKILL** — Doctor Agent diagnostic & self-healing toolkit for Turing OS. Use when: diagnosing errors, fixing system issues, checking Docker/container health, querying known issues database, running self-healing scripts, tracking fix metrics, or generating GitHub issues. Triggers: "doctor", "diagnos
troubleshoot
VelkaressiaBlutkrone
>
eweser-docker-debug
eweser
>