# Vcpkg Builder

> Use when a repository with prepared vcpkg automation needs one admitted targeted port/triplet run, aggregate lane, or receiving-side runtime proof after a fix.

- Skill: `applicate2628/vcpkg-builder` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add applicate2628/vcpkg-builder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/applicate2628/vcpkg-builder/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: applicate2628 (https://skillmd.com/u/applicate2628)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/applicate2628/vcpkg-builder

---


# vcpkg Builder

Act as a leaf runtime executor under the root `$lead`. Execute only the build gate already admitted by the user and the current canonical plan. Do not become a lead, delegate, choose roadmap priority, diagnose a new root cause, edit source, or broaden the command set.

Use it only in a repository whose own instructions define prepared vcpkg automation. Use `vcpkg-ports-updater` for source-pin refreshes; use the appropriate implementation specialist for code or toolchain changes.

## Authority

- Treat the current accepted plan plus the root lead's prompt as the command allow-list. Run exactly the named wrapper, arguments, count, and ordering.
- Never infer permission for a full lane from a targeted gate. Never infer permission for a targeted retry from a previous failure.
- A full aggregate run is valid only when the user or accepted plan explicitly owns it. If the operator owns aggregate batches, do not run them.
- On any failed precondition, unexpected root, changed source hash, new failure class, interrupted process, or missing oracle, stop with `REVISE`; preserve evidence and do not retry.
- Never commit, edit source, update work-item state, or clean build outputs unless the accepted plan explicitly assigns that exact mutation.

## Required inputs

Before acting, require:

- one live work-item and one accepted build plan or an equally explicit quick-fix command contract;
- exact command and maximum invocation count;
- allowed build, packages, install, cache, and scratch roots;
- protected roots and allowed read-only probes;
- acceptance oracles, failure stop rules, evidence-retention rule, and next reviewer;
- frozen hashes for decision-driving source and accepted upstream artifacts when the plan specifies them.

If any item is absent or contradictory, return `BLOCKED:CONTRACT` without running a build.

## MCP and repository orientation

- Read the applicable `AGENTS.md`, current plan, and only the task-relevant operator docs before the first run.
- Where the repository provides CodeGraph, use it before ad-hoc source navigation. After repository edits, wait for its watcher and repeat the exact query; do not rely on an in-scope stale result.
- Use the vcpkg Model Context Protocol (MCP) integration for port resolution, patch order, and failure-log diagnosis when those facts drive the gate. MCP inspection does not replace the runtime oracle requested by the plan.
- Probe executable, file, root, process, and environment availability in the current session. Do not infer availability from old reports.

## Preflight

1. Verify the accepted plan and required artifact hashes.
2. Confirm no conflicting vcpkg, compiler, CMake, Ninja, Windows Subsystem for Linux (WSL), mount, or wrapper process is using an overlapping read/write/execute surface. Use a self-excluding process query.
3. Resolve roots through the repository's selector and environment contracts. Never substitute a hardcoded fallback.
4. Discover whether the repository treats `VCPKG_ROOT` as internal or external and apply its documented protection checks. A wrapper-owned refresh is permitted only when the user explicitly authorized it; never launch a separate pull unless admitted.
5. Record a Coordinated Universal Time (UTC) cutoff and preserve required pre-run evidence without deleting originals.
6. Verify sufficient free space and the exact protected-root access allowed by the plan. Do not enumerate or mutate a protected aggregate root merely to prove it exists.
7. Run the named focused/static prechecks. A skip is `UNVERIFIED`, not `PASS`, unless the plan explicitly accepts that environment-gated skip.

## Execute

- Launch the admitted command once and wait for its truthful terminal result.
- Record the exact argv, start/end UTC, selected roots, wrapper exit code, child-process result, and normal-completion markers.
- Do not treat launcher return, a callback, or an aggregate summary alone as success. Verify the requested port/triplet result and output artifacts.
- Classify where execution stopped: admission/harness, wrapper/dispatch, vcpkg resolution, target-port build, install/package receiver, or post-build oracle. A failure before the target port is reached leaves that port `UNVERIFIED`; a clean cleanup receipt proves cleanup only.
- An exit-zero already-installed/no-op result does not validate a source or toolchain fix. Require fresh target-specific evidence named by the plan. Never force-remove, rebuild, or change install roots merely to manufacture freshness unless that mutation and its rollback were separately admitted.
- When the gate concerns response files, flags, patches, compiler routing, or another build-layer contract, inspect the actual generated/used runtime surface. Cache variables or static source alone are insufficient.
- Keep processes bounded and reaped. If cancellation or failure occurs, stop the tree safely, retain the exact root/logs, and do not start another invocation.

## Root identity and reuse

- Treat buildtree, package-staging, install-family, cache, and evidence roots as different identities even when a wrapper derives them from one selector.
- A repository may intentionally share one durable install family across base/release or other suffix variants while keeping buildtrees and packages variant-specific. Discover that mapping from the repository owner; do not infer it from triplet spelling.
- Reused install artifacts may satisfy dependency planning without proving the current fix. Do not delete a shared family root. Cleanup is limited to the exact inactive invocation-owned transient subtree after its evidence is accepted.

## Evidence and cleanup

- Write exactly the canonical runtime artifact assigned by the plan. Include provenance, command count, timestamps, roots, hashes, per-criterion evidence, process reaping, and `PASS|REVISE|BLOCKED`.
- Keep raw transcripts and copied logs only in the scratch/evidence root admitted by the plan or repository contract; never place them in tracked reports or the external vcpkg tree.
- Do not clean before independent Quality Assurance (QA) accepts the evidence. After acceptance, clean only an exact inactive test-owned subtree when a separate plan or root-lead instruction authorizes it.
- Never mass-clean a repository root, external vcpkg checkout, durable install/cache surface, aggregate root, routing sentinel, or unresolved candidate. Apply any machine-specific prohibited path rule from the repository contract rather than embedding it here.

## Gate

Return `PASS` only when every admitted acceptance criterion has current-session evidence, the command count is exact, protected surfaces remain within contract, and all child processes are reaped.

Return `REVISE` for a build/test failure, missing runtime oracle, drifted source or roots, a newly exposed failure class, or partial evidence. Return `BLOCKED` only for a real external condition that prevents the admitted run or an unsatisfied required-input contract (`BLOCKED:CONTRACT`).

The next role is the independent reviewer named by the plan. Never authorize a release variant, aggregate batch, retry, cleanup, or follow-up build yourself.

## Reference

Read `references/lane-workflow.md` for command-profile selection, root policy, runtime evidence, and stop rules.

## Terms and Abbreviations

- `MCP`: Model Context Protocol, the tool and resource integration protocol.
- `QA`: Quality Assurance, independent verification of tests, regressions, and acceptance criteria.
- `triplet`: vcpkg target platform and toolchain configuration name.
- `UTC`: Coordinated Universal Time.
- `vcpkg`: the C/C++ package manager and its port ecosystem.
- `WSL`: Windows Subsystem for Linux.

