用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/RunnerQuan/SAFE-Agent --skill go-backend命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Find doctors with Healthgrades - search providers, read reviews, and check credentials
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks.
基于RFM模型和回归算法的客户生命周期价值(LTV)预测分析工具,支持电商和零售业务的客户价值预测。使用时需要客户交易数据、订单历史或消费记录,自动进行RFM特征工程、回归建模和价值预测。
基于 SOC 职业分类
正在显示 SKILL.md
| name | go-backend |
| description | Goバックエンド開発 - Goイディオム、並行処理、エラーハンドリング、テスト |
| requires-guidelines | ["golang","common"] |
| hooks | [{"event":"PreSkillUse","command":"~/.claude/hooks/pre-skill-use.sh"}] |
// ❌ 危険: エラー無視
result, _ := userRepo.Find(id)
// ❌ 危険: panic乱用
if err != nil {
panic(err) // サーバークラッシュの原因
}
// ✅ 正しい: エラー適切処理
result, err := userRepo.Find(id)
if err != nil {
return fmt.Errorf("failed to find user: %w", err)
}
// ❌ 危険: 終了しないgoroutine
func process() {
ch := make(chan int)
go func() {
for v := range ch { // chがクローズされない
fmt.Println(v)
}
}()
}
// ✅ 正しい: context でキャンセル制御
func process(ctx context.Context) {
ch := make(chan int)
go func() {
defer close(ch)
for {
select {
case <-ctx.Done():
return
case v := <-ch:
fmt.Println(v)
}
}
}()
}
// ❌ 危険: 不要なインターフェース
type UserRepositoryInterface interface {
Find(int) (*User, error)
Save(*User) error
}
// ✅ 正しい: 必要な場所でのみ定義(Accept interfaces)
// domain/repository.go
type UserRepository interface {
Find(int) (*User, error)
}
// infrastructure/user_repository.go
type userRepositoryImpl struct { ... }
func (r *userRepositoryImpl) Find(id int) (*User, error) { ... }
// ⚠️ タイムアウト制御がない
func FetchData(url string) ([]byte, error) {
resp, err := http.Get(url)
...
}
// ✅ context でタイムアウト制御
func FetchData(ctx context.Context, url string) ([]byte, error) {
req, _ := http.NewRequestWithContext(ctx, "GET", url, nil)
resp, err := http.DefaultClient.Do(req)
...
}
// ⚠️ Unlock 忘れのリスク
mu.Lock()
if err := process(); err != nil {
return err // Unlock されない
}
mu.Unlock()
// ✅ defer で確実に Unlock
mu.Lock()
defer mu.Unlock()
if err := process(); err != nil {
return err
}
// ⚠️ 同じテストコードの繰り返し
func TestAdd(t *testing.T) {
if Add(1, 2) != 3 { t.Error("failed") }
if Add(0, 0) != 0 { t.Error("failed") }
}
// ✅ テーブル駆動
func TestAdd(t *testing.T) {
tests := []struct {
name string
a, b int
want int
}{
{"positive", 1, 2, 3},
{"zero", 0, 0, 0},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Add(tt.a, tt.b); got != tt.want {
t.Errorf("got %d, want %d", got, tt.want)
}
})
}
}
user not users)Reader, Finder)fmt.Errorf("%w", err) でラップしているかvar Err... で定義しているか🔴 Critical: ファイル:行 - エラー処理違反/goroutineリーク - 修正案
🟡 Warning: ファイル:行 - イディオム違反 - 改善案
📊 Summary: Critical X件 / Warning Y件
開発実施前に以下のガイドラインを参照:
~/.claude/guidelines/languages/golang.md~/.claude/guidelines/common/code-quality-design.md~/.claude/guidelines/common/testing-guidelines.md最新のGoベストプラクティス確認には context7 を活用:
プロジェクト固有のGo実装情報を確認: