.claude/skills/bp-go/SKILL.md
--- name: bp-go description: Go ベストプラクティス。Go コードの品質を保つための規約とパターン集。 TRIGGER when: .go ファイルを編集・作成する時、Go コードを書く時、Go サービス(alt-backend, auth-hub, pre-processor, search-indexer, mq-hub, altctl)を実装する時。 DO NOT TRIGGER when: テストの実行のみ、go.mod の確認のみ、ファイルの読み取りのみ、他言語の作業時。 --- # Go Best Practices このスキルが発動したら、`docs/best_practices/go.md` を Read ツールで読み込み、 記載されたベストプラクティス(DECREE)に従ってコードを書くこと。 ## 重要原則 1. **エラーラップ必須**: `fmt.Errorf("action: %w", err)` でコンテキスト付きラップ。裸の `return nil, err` 禁止 2. **main.go は薄く**: co
npx skillsauth add kaikei-e/alt .claude/skills/bp-goInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
このスキルが発動したら、docs/best_practices/go.md を Read ツールで読み込み、
記載されたベストプラクティス(DECREE)に従ってコードを書くこと。
fmt.Errorf("action: %w", err) でコンテキスト付きラップ。裸の return nil, err 禁止ctx context.Context を第一引数に。構造体フィールドに保持しないlog パッケージ不可。slog.With("key", value) でキー付きログ[]struct{ name string; ... } + t.Run(tt.name, ...) パターン。testify/assert 使用Close(), Unlock(), cancel() は取得直後に deferinternal/ に配置完全なベストプラクティスは docs/best_practices/go.md を参照。
セクション: Project Structure, Error Handling, Concurrency, Context, Logging, Testing, Database, HTTP/API, Configuration
development
Writes an Architecture Decision Record for the Alt project in Japanese after a completed implementation, then runs the Pact-gated manual deploy (./scripts/deploy.sh production). Trigger when the user says "ADR書いて" / "ADRにまとめて" / "ADRに記録して" / "実装が終わったのでドキュメントに" / "コンテナ再ビルドしてADR書いて" / "docs/ADR" 関連のまとめ依頼, or after finishing code changes that clearly warrant a decision record. Skip the deploy step only when the user explicitly says "ADRだけ書いて"; skip the build step only for documentation-only changes.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.