otaviof

go-check

0
0
# Install this skill:
npx skills add otaviof/gosmith --skill "go-check"

Install specific skill from multi-skill repository

# Description

Run Go verification pipeline (build + test + vet + lint).

# SKILL.md


name: go-check
description: Run Go verification pipeline (build + test + vet + lint).
argument-hint: [--quick|--full]
allowed-tools: Bash
model: haiku


Instructions

  1. Validate: Check go.mod exists in cwd or parent dirs

  2. Detect automation: Check for Makefile with targets: build, test, vet, lint

  3. Dispatch:

  4. --quick: Build + vet only (skip tests)
  5. --full: Build + test + vet + lint + staticcheck
  6. (default): Build + test + vet

  7. Execute:

  8. Makefile path: make build test vet (or available targets)
  9. Raw path: go build ./... && go test ./... && go vet ./...
  10. Capture duration per step with time command

  11. Aggregate: Collect exit codes, durations, error summaries

  12. Format:
    ```markdown
    ## GO CHECK RESULTS

Step Status Duration
build PASS 2.1s
test PASS 4.3s
vet PASS 0.8s

Overall: PASS
```

  1. Report:
  2. Summary table with overall status
  3. If FAIL: Include first error from failed step

  4. Edge cases:

  5. No go.mod: "Not a Go project"
  6. Partial failure: Continue remaining steps, report all
  7. Missing Makefile targets: Fall back to raw Go commands
  8. --full without lint tools: Warn "staticcheck not found, skipping"

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.