Agent skill

Build Px4 macOS

by PX4 in PX4/PX4-Autopilot

Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

BSD-3-ClauseAuto-check passedDevelopment

Install Build Px4 macOS

skills CLI
$ npx skills add PX4/PX4-Autopilot --skill build-px4-macos -a claude-code

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

GitHub CLI
$ gh skill install PX4/PX4-Autopilot build-px4-macos --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/PX4/PX4-Autopilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/build-px4-macos .claude/skills/build-px4-macos && 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
build-px4-macos
GitHub stars
13k
Token cost
~1.1k tokens
SKILL.md length
496 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

  • Works in 6 steps: Read the build and code-review guidance… → Inspect git status --short and git… → Confirm Docker is available and running.… → …
  • Tasks that involve Git worktrees
  • SKILL.md covers Inputs, Prepare, Build and Stage and report
  • Calls git, docker and make

What it does

Build Px4 macOS is an agent skill from PX4/PX4-Autopilot. Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees and Containers. It works with macOS, Docker and Git. The repository describes itself as: PX4 Autopilot Software. The licence is BSD-3-Clause.

When your agent uses it

  • Tasks that involve Git worktrees
  • Tasks that involve Containers

Example prompts

  • “/build-px4-macos”

Requirements

  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Read the build and code-review guidance referenced by AGENTS.md.
  2. Inspect git status --short and git worktree list. Validate the target
  3. Confirm Docker is available and running. Inspect the image with
  4. Prefer an existing worktree for a requested ref. Otherwise resolve the ref
  5. Check submodule status. Initialize required missing submodules, but do not
  6. Inspect previous build artifacts if moving between native and container

What it can do on your machine

Read from SKILL.md and the folder at commit a427a2e. 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:

    • git
    • docker
    • make

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

  • Network

    No URLs in SKILL.md. Its commands use git and docker, which can reach the network depending on how they are called.

    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

Build Px4 macOS loads about 1.1k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 496 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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 PX4/PX4-Autopilot at commit a427a2e, republished under its BSD-3-Clause licence (© PX4). 496 words, ~1,066 tokens.

Download SKILL.mdSave it as .claude/skills/build-px4-macos/SKILL.md (or your agent's skills folder).
name
build-px4-macos
description
Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

Build PX4 Firmware on macOS

Builds run in the multi-arch px4io/px4-dev container, so the host needs no NuttX toolchain. If Tools/setup/macos.sh has been run (arm-none-eabi-gcc on PATH), make <target> also works natively. The container has no Gazebo or ROS 2; for simulation use the host setup in docs/en/dev_setup/dev_env_mac.md.

Inputs

  • A board target, for example px4_fmu-v6xrt_default or cubepilot_cubeorange_default. Ask for the target if it is missing.
  • Optional git refs or existing worktree paths. Without them, build the current working tree as-is. Do not silently substitute a clean checkout.

For a POSIX SITL target, use an appropriate SITL workflow instead; do not promise a flashable .px4 artifact.

Prepare

  1. Read the build and code-review guidance referenced by AGENTS.md.
  2. Inspect git status --short and git worktree list. Validate the target against boards/ and the repository's build configuration.
  3. Confirm Docker is available and running. Inspect the image with docker image inspect px4io/px4-dev:v1.17.0; pull it if missing.
  4. Prefer an existing worktree for a requested ref. Otherwise resolve the ref (fetch its remote if necessary) and create a new detached worktree named build-<short-sha> in the worktree location from .agents/README.md, using git worktree add --detach. Reuse a path only after confirming its HEAD and working-tree state match the request. Never switch the user's active branch.
  5. Check submodule status. Initialize required missing submodules, but do not overwrite locally modified submodules.
  6. Inspect previous build artifacts if moving between native and container builds. Remove only identified generated host binaries with an incompatible format or a confirmed stale build/<target>/ directory. Do not blindly clean source or user files.
Show full SKILL.md (234 more words)Show less

Build

Read Tools/docker_run.sh in the checkout being built. Use it if it handles the git common-directory mount, a writable HOME for the non-root user, and container git ownership. Otherwise run the equivalent container explicitly. The checked-in wrapper may not yet provide these worktree requirements.

From the selected worktree root, after assigning TARGET to the validated board target, the explicit form is:

bash
SRC_DIR="$(pwd -P)"
CCACHE_DIR="${HOME}/.ccache"
GIT_COMMON_DIR="$(git rev-parse --path-format=absolute --git-common-dir)"
mkdir -p "$CCACHE_DIR"

docker run --rm \
  --workdir="$SRC_DIR" \
  --user="$(id -u):$(id -g)" \
  --env=HOME=/tmp \
  --env=CCACHE_DIR="$CCACHE_DIR" \
  --env=GIT_CONFIG_COUNT=1 \
  --env=GIT_CONFIG_KEY_0=safe.directory \
  --env=GIT_CONFIG_VALUE_0='*' \
  --volume="$SRC_DIR:$SRC_DIR:rw" \
  --volume="$GIT_COMMON_DIR:$GIT_COMMON_DIR:rw" \
  --volume="$CCACHE_DIR:$CCACHE_DIR:rw" \
  px4io/px4-dev:v1.17.0 \
  make "$TARGET"

Run this with Bash and stop if path resolution or preparation fails. Mounting the worktree and git common directory at their original absolute paths preserves git's worktree references. The ownership exception is scoped to this container; do not change the user's global git configuration.

Preserve the build's exit status. If capturing output through tee or tail, enable set -o pipefail in that shell. Report failures; do not treat an old artifact as evidence of success.

Stage and report

After a successful build, require build/<target>/<target>.px4 to exist. Copy it to /tmp/px4-firmware/ with a distinct name such as <target>_<ref-label>_<short-sha>_<timestamp>.px4. Do not overwrite an existing artifact. Label dirty-tree builds explicitly: their source is not represented by the commit alone.

Report the source ref, commit, dirty state, target, absolute artifact path, and size. Staging is not flashing; never invoke an uploader without a separate user request. Artifacts under /tmp are temporary and may disappear on reboot. Remove only clean temporary worktrees created for this invocation, using git worktree remove, or report retained worktrees if cleanup is unsafe.

© PX4, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/build-px4-macos of PX4/PX4-Autopilot.

Open the folder on GitHubat commit a427a2e

Compare with similar skills

Build Px4 macOS 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.

Build Px4 macOS compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Build Px4 macOS this skillPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
Polyphonyalinaqi/maggy707—~980Automated safety check: PassMIT
Devcontainer Devstacklok/toolhive-studio170—~3.8kAutomated safety check: NotesApache-2.0
Checkopenwpm/OpenWPM1.4k—~1.5kAutomated safety check: PassCustom licence
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone
Triage Image Cvesactivepieces/activepieces25k—~3.6kAutomated safety check: PassCustom licence

Similar skills

  • Polyphony

    alinaqi/maggy

    Multi-agent orchestration with container-isolated workspaces — each agent session runs in its own Docker container with independent git branches

    707 GitHub stars~980 tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    170 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Check

    openwpm/OpenWPM

    A skill your agent uses to check on background feature agents launched via /kickoff — running in tmux sessions or docker/podman containers.

    1.4k GitHub stars~1.5k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Triage Image Cves

    activepieces/activepieces

    Scan an Activepieces Docker image with grype for OS/base-image (deb) and application (npm) CVEs of High/Critical severity.

    25k GitHub stars~3.6k tokensUpdated today
    SecurityAuto-check passed
  • Use Mori CLI to enable agent-to-agent communication and coordination across Mori-managed panes.

    303 GitHub stars~1.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from PX4/PX4-Autopilot

  • Rebase Onto Main

    PX4/PX4-Autopilot

    Rebase a branch onto main, handling squash-merged parent branches cleanly

    13k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes
  • Build Px4 Linux

    PX4/PX4-Autopilot

    Build PX4 firmware or SITL natively on a Linux host, in the current checkout, without flashing hardware.

    13k GitHub stars~385 tokensUpdated yesterday
    Auto-check passed
  • Review PR

    PX4/PX4-Autopilot

    Substance-focused review of a PX4 pull request — merit, first-principles correctness, architecture fit.

    13k GitHub stars~1k tokensUpdated yesterday
    Auto-check: notes
  • Commit

    PX4/PX4-Autopilot

    Create a conventional commit for PX4 changes. An agent skill from PX4/PX4-Autopilot.

    13k GitHub stars~527 tokensUpdated yesterday
    Auto-check: notes
  • PR

    PX4/PX4-Autopilot

    Create a pull request with conventional commit title and description

    13k GitHub stars~581 tokensUpdated yesterday
    Auto-check: notes

Works with

Questions about Build Px4 macOS

What does Build Px4 macOS do?

Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware. Build Px4 macOS is an agent skill from PX4/PX4-Autopilot. Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

When should I use Build Px4 macOS?

Build Px4 macOS fits situations like: tasks that involve Git worktrees; tasks that involve Containers.

How do I install Build Px4 macOS in Claude Code?

Run `npx skills add PX4/PX4-Autopilot --skill build-px4-macos -a claude-code`. Or copy the skill folder (.agents/skills/build-px4-macos in PX4/PX4-Autopilot) into .claude/skills/build-px4-macos in your project. Claude Code loads it when a task matches its description.

How do I install Build Px4 macOS in Codex?

Run `npx skills add PX4/PX4-Autopilot --skill build-px4-macos -a codex`. Or copy the skill folder (.agents/skills/build-px4-macos in PX4/PX4-Autopilot) into .agents/skills/build-px4-macos in your project. Codex loads it when a task matches its description.

Can I use Build Px4 macOS 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 PX4/PX4-Autopilot --skill build-px4-macos -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/build-px4-macos, .gemini/skills/build-px4-macos, .github/skills/build-px4-macos and .opencode/skills/build-px4-macos in your project.

What does Build Px4 macOS need to run?

Going by SKILL.md and its folder, Build Px4 macOS needs the command-line tools its instructions call (git, docker and make). Our summary lists: Docker.

Does Build Px4 macOS access the network?

SKILL.md contains no URLs. Its commands use git and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Build Px4 macOS 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 Build Px4 macOS use?

Build Px4 macOS is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Build Px4 macOS use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Build Px4 macOS?

Skills that share tags, products or a category with Build Px4 macOS: Polyphony (alinaqi/maggy, 707 stars), Devcontainer Dev (stacklok/toolhive-studio, 170 stars), Check (openwpm/OpenWPM, 1.4k stars) and Git Worktree Setup (k8zdev/k8z, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Build Px4 macOS?

PX4 (a GitHub organization) maintains it in PX4/PX4-Autopilot, which has 12,763 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: PX4/PX4-Autopilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.