一键导入
create-port
Create a new vcpkg port with portfile.cmake, vcpkg.json, and patches. Use when asked to create, add, or generate a new port for a project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new vcpkg port with portfile.cmake, vcpkg.json, and patches. Use when asked to create, add, or generate a new port for a project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Detect OS/shell, validate vcpkg setup, and emit a combined environment report. Use when asked to check the environment, verify setup, or troubleshoot vcpkg configuration.
Check for upstream project updates and newer versions. Use when asked to check for updates, compare versions, or see if a port is outdated.
Install a vcpkg port with overlay-ports and analyze build logs. Use when asked to install, test, or build a port.
Review port files against vcpkg guidelines and best practices. Use when asked to review, validate, or check a port for correctness.
Search for existing vcpkg ports by name, GitHub URL, or keywords in the local registry and upstream microsoft/vcpkg repository. Use when asked to find, search, or check if a port exists.
Update an existing port to a newer upstream version with SHA512 calculation and testing. Use when asked to update, upgrade, or bump a port version.
| name | create-port |
| description | Create a new vcpkg port with portfile.cmake, vcpkg.json, and patches. Use when asked to create, add, or generate a new port for a project. |
Generate a new vcpkg port from scratch using project information, existing port templates, and automated checksum calculation.
portfile.cmake with proper vcpkg_from_github or vcpkg_download_distfile callsvcpkg.json with correct metadataSupported Patterns:
https://github.com/owner/repocreate port for cpuinfo from pytorchopenssl version 3.0.15port from C:/projects/mylibCMakeLists.txt, meson.build, configure.ac, MakefileREADME.md, CMakeLists.txt, find_package callsports/**/portfile.cmake for similar ports (same build system, similar size)curl -L -o "temp-${version}.tar.gz" $url(Get-FileHash -Algorithm SHA512 "temp-${Version}.tar.gz").Hash.ToLower()sha512sum "temp-${version}.tar.gz" | awk '{print $1}'ports/{port-name}/ directoryvcpkg.json:
{
"name": "{port-name}",
"version": "{version}",
"description": "{project-description}",
"homepage": "{project-url}",
"license": "{license-spdx-id}",
"dependencies": [
{ "name": "vcpkg-cmake", "host": true },
{ "name": "vcpkg-cmake-config", "host": true }
]
}
portfile.cmake (CMake template):
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO {owner}/{repo}
REF v${VERSION}
SHA512 {calculated-sha512}
HEAD_REF {main-branch}
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARKS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_SAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME {package-name})
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
usage file (for ports with CMake config targets)vcpkg.json, portfile.cmake)./scripts/registry-format.ps1 -VcpkgRoot "$env:VCPKG_ROOT" -RegistryRoot "$(Get-Location)"Forward to install-port skill for testing after creation.
Output a markdown report with these headings (in order). Emit all headings even if empty (use None).
# Port Creation Report## Summary — Port name, version, source, timestamp, outcome (CREATED/FAILED)## Project Metadata — Description, license, latest release/tag## Build System Detection — Detected system, strategy, experimental overrides## Dependencies — Direct dependencies, missing mappings, host tools## Generated Files — Each file with ✅/⚠️/❌ status## Checksums — Source URL, SHA512, method## Validation — Manifest fields, version format, SHA512 format, helpers, cleanup, copyright## Notes & Warnings — Non-blocking items## Next Steps — Test with install-port, add version, create usage file