AgentSkillsCN

build

构建项目、运行代码检查,并验证二进制文件是否正常运行。适用于检查代码是否编译无误时使用。

SKILL.md
--- frontmatter
name: build
description: Build the project, run vet, and verify the binary works. Use when checking if code compiles correctly.
allowed-tools: Bash(go *), Read

Build Project

Steps

  1. Run go vet ./... to check for suspicious code
  2. Run go build -o claude-worktree . to compile
  3. If build fails:
    • Read the failing source files
    • Identify and explain the compilation errors
    • Suggest fixes
  4. If build succeeds:
    • Run ./claude-worktree --help to verify the binary runs
    • Run go mod tidy to clean up dependencies
    • Clean up binary with rm claude-worktree
    • Report success