基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/notque/vexjoy-agent --skill go-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Run the full evidence-to-live implementation workflow for large, multi-system, multi-wave, or CPU-delegated 5 Star Booker GM programs.
Classify user requests and route to the correct agent + skill. Primary entry point for all delegated work.
Structured multi-phase workflows: review, debug, refactor (tidy, clean up, untangle messy code without behaviour change), deploy, create, research.
| name | go-patterns |
| version | 1.0.0 |
| description | Go development patterns: testing, concurrency, errors, review, and conventions. |
| user-invocable | false |
| allowed-tools | ["Read","Write","Bash","Grep","Glob","Edit","Task","Skill"] |
| agent | golang-general-engineer |
| routing | {"category":"language","force_route":true,"not_for":"'go' as a verb (go ahead, here we go, go-live, let's go), Go (the board game), pidgin/cargo english 'go do X'; only fires for the Go programming language patterns/idioms/testing or edits to .go files; SAP Commerce Cloud PHP work (use php-general-engineer agent)","triggers":[".go","go test","*_test.go","table-driven","t.Run","t.Helper","goroutine","channel","sync.Mutex","sync.WaitGroup","worker pool","fan-in","context.Context","goroutine fan-out","fmt.Errorf","errors.Is","errors.As","%w","sentinel error","Go failure mode","Go code smell","Go code review","Go PR","Go quality","sapcc","sap-cloud-infrastructure","go-bits","keppel","go-api-declarations","go-makefile-maker","make check","Go lint"],"pairs_with":["golang-general-engineer","golang-general-engineer-compact","systematic-code-review"]} |
Umbrella skill for Go development: Google style, testing, concurrency, error handling, failure modes, code review, SAP CC conventions, and quality gates. Every Go task starts with the complete Google Go style baseline, then loads task-specific references.
Before reading, writing, changing, generating, debugging, or reviewing Go code:
${CLAUDE_SKILL_DIR}/references/google-style-guide/LOAD_ORDER.md.Do not skip this baseline for small changes, tight context budgets, reviews, tests, or generated code. The ordered files reconstruct all four complete pinned upstream documents—overview, guide, decisions, and best practices—without excerpts. Apply their guidance to all Go code produced by the agent.
Use this precedence when guidance differs:
Prefer local consistency only where the Google guide allows judgment. Do not create unrelated churn merely to restyle existing code. For new and nearby changed code, follow the current pinned guidance. Record a conscious exception when repository rules, generated-code constraints, or compatibility requirements require one.
| Signal | Load These Files | Why |
|---|---|---|
| Every Go task | google-style-guide/LOAD_ORDER.md, then every file it lists | Complete Google style baseline; always load every part of all four upstream documents |
| Testing | testing.md | Writing, fixing, or reviewing Go tests |
| Concurrency | concurrency.md | Goroutines, channels, sync primitives, race conditions |
| Error handling | error-handling.md | Error wrapping, sentinels, custom types, errors.Is/As |
| Review patterns | preferred-patterns.md | Detecting code smells, over-engineering, bad Go patterns |
| Code review | code-review.md |
| Reviewing Go code or PRs for quality |
| SAP CC conventions | sapcc-conventions.md | Working in sapcc/* repos with go-bits |
| Quality gate | quality-gate.md | Running make check, linting, pre-commit validation |
Read the load-order manifest and every file it names. This gate is complete only after every part of all four upstream documents has been read in the current task.
Classify the task into one or more domains, then load the corresponding reference files. Only load what is needed -- do not load all references for every task.
| Domain | Load Reference | When |
|---|---|---|
| Testing | references/testing.md | Writing, fixing, or reviewing Go tests |
| Concurrency | references/concurrency.md | Goroutines, channels, sync primitives, race conditions |
| Error handling | references/error-handling.md | Error wrapping, sentinels, custom types, errors.Is/As |
| Review patterns | references/preferred-patterns.md | Detecting code smells, over-engineering, bad Go patterns |
| Code review | references/code-review.md | Reviewing Go code or PRs for quality |
| SAP CC conventions | references/sapcc-conventions.md | Working in sapcc/* repos with go-bits |
| Quality gate | references/quality-gate.md | Running make check, linting, pre-commit validation |
Multiple domains may apply. For example, reviewing a PR that includes concurrency code
should load both code-review.md and concurrency.md.
Read the selected reference file(s) using ${CLAUDE_SKILL_DIR}/references/<name>.md.
Each reference contains the full methodology, phases, code examples, and error handling
for that domain. Follow the instructions in the reference as if they were this skill's
instructions.
Some references point to their own sub-reference files for extended patterns:
Testing sub-references:
${CLAUDE_SKILL_DIR}/references/testing/go-test-patterns.md -- Full table-driven test, helper, mock examples${CLAUDE_SKILL_DIR}/references/testing/go-benchmark-and-concurrency.md -- b.Loop() benchmarks, synctestConcurrency sub-references:
${CLAUDE_SKILL_DIR}/references/concurrency/concurrency-patterns.md -- Worker pool, fan-out/fan-in, pipeline, rate limiter, graceful shutdownError handling sub-references:
${CLAUDE_SKILL_DIR}/references/error-handling/patterns.md -- gopls tracing, HTTP handler patterns, error wrapping in middlewareReview-pattern sub-references:
${CLAUDE_SKILL_DIR}/references/preferred-patterns/code-examples.md -- Extended before/after for all 7 failure modesCode review sub-references:
${CLAUDE_SKILL_DIR}/references/code-review/common-review-comments.md -- Go code patterns with good/bad examplesSAP CC conventions sub-references:
${CLAUDE_SKILL_DIR}/references/sapcc-conventions/sapcc-code-patterns.md -- Primary reference: code patterns, testing patterns, failure modes (merged from testing-patterns-detailed.md and preferred-patterns.md)${CLAUDE_SKILL_DIR}/references/sapcc-conventions/library-reference.md -- Complete approved/restricted library table${CLAUDE_SKILL_DIR}/references/sapcc-conventions/architecture-patterns.md -- Full 102-rule architecture spec${CLAUDE_SKILL_DIR}/references/sapcc-conventions/review-standards.md -- Lead + secondary review standards (merged)${CLAUDE_SKILL_DIR}/references/sapcc-conventions/extended-patterns.md -- Security, K8s, PR hygiene patternsapi-design-detailed.md, build-ci-detailed.md, error-handling-detailed.md,
go-bits-philosophy-detailed.md, pr-mining-insights.mdQuality gate sub-references:
${CLAUDE_SKILL_DIR}/references/quality-gate/common-lint-errors.json -- Linter descriptions and fix suggestions${CLAUDE_SKILL_DIR}/references/quality-gate/makefile-targets.json -- Available make targets${CLAUDE_SKILL_DIR}/references/quality-gate/expert-review-patterns.md -- Manual review patterns${CLAUDE_SKILL_DIR}/references/quality-gate/examples.md -- Detailed usage examplesFollow the loaded reference methodology. Each reference has its own phases, gates, and completion criteria. Apply them as written.
Scripts are organized by domain in sub-directories:
scripts/gen-table-test.sh, scripts/bench-compare.shscripts/check-errors.shscripts/check-interface-compliance.shscripts/check-sapcc-identify-endpoint.sh, scripts/check-sapcc-auth-ordering.sh,
scripts/check-sapcc-json-strict.sh, scripts/check-sapcc-time-now.sh, scripts/check-sapcc-httptest.sh,
scripts/check-sapcc-todo-format.shscripts/quality_checker.py, scripts/validate.pyscripts/sync-google-style-guide.py (pinned upstream refresh; requires review before revision changes)Errors are domain-specific. Load the relevant reference file and check its Error Handling section for troubleshooting guidance.