Skip to content
cccskills
FreePublished on GitHub

go-quality

Go バックエンドの品質チェック(golangci-lint + Swagger 生成)。「lint」「golangci-lint」「静的解析」「swagger」「OpenAPI」「ドキュメント生成」などのキーワードで自動適用。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Go 品質チェック(lint + Swagger)

Go バックエンドの静的解析と API ドキュメント生成。

プロジェクト検出

以下の優先順位で Go プロジェクトを検出:

  1. 環境変数 GO_BACKEND_DIR(go.mod の存在を確認)
  2. カレントディレクトリの go.mod
  3. サブディレクトリ(backend/, server/, api/, go/)
  4. 再帰検索(深さ2まで)

静的解析(golangci-lint)

実行

cd <backend_dir>

# golangci-lint の存在確認
command -v golangci-lint || {
  echo "golangci-lint がインストールされていません"
  echo "インストール: brew install golangci-lint"
  echo "または: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
}

# Lint 実行
golangci-lint run ./...

Lint 設定

プロジェクトルートに .golangci.yml を配置してカスタマイズ可能:

linters:
  enable:
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - unused

linters-settings:
  errcheck:
    check-type-assertions: true

Swagger / OpenAPI 生成

実行

cd <backend_dir>

# swag の存在確認(未インストール時は自動インストール)
command -v swag || [[ -f "$HOME/go/bin/swag" ]] || {
  echo "swag をインストール中..."
  go install github.com/swaggo/swag/cmd/swag@latest
}

# swag コマンドパス
SWAG_CMD=$(command -v swag 2>/dev/null || echo "$HOME/go/bin/swag")

# main.go の検出(GO_MAIN_PATH > cmd/server/main.go > cmd/api/main.go > main.go)
MAIN_PATH="${GO_MAIN_PATH:-}"
if [[ -z "$MAIN_PATH" ]]; then
  for p in cmd/server/main.go cmd/api/main.go cmd/main.go main.go; do
    [[ -f "$p" ]] && MAIN_PATH="$p" && break
  done
fi

# Swagger 生成
$SWAG_CMD init -g "$MAIN_PATH" -o docs --parseDependency --parseInternal

出力

生成されるファイル:

  • docs/docs.go — Go コード
  • docs/swagger.json — JSON 仕様
  • docs/swagger.yaml — YAML 仕様

よくあるエラー

golangci-lint が見つからない

golangci-lint: command not found

対処:

brew install golangci-lint
# または
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

swag が見つからない

swag: command not found

対処:

go install github.com/swaggo/swag/cmd/swag@latest

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

CHANGELOG エントリ追加・バージョン計算。「CHANGELOG」「変更履歴」「changelog add」「version bump」「バージョン」「バージョンアップ」などのキーワードで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

プロジェクトの .claude/ ディレクトリ(skills, agents, contexts)を Codex CLI 互換 .agents/ に変換。「codex export」「Codex 変換」「プロジェクトをエクスポート」などで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

デザインシステム準拠のSwiftUIコンポーネントを生成する。新しいUIパーツの作成、コンポーネント生成時に使用。「コンポーネント作成」「新しいUI」「パーツ作成」「component generate」「UIパーツ」「新規コンポーネント」などのキーワードで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

Claude Code プラグインを Codex CLI 互換形式に変換。SKILL.md → .agents/skills/、agents → .agents/skills/、AGENTS.md 生成。「deploy」「codex」「Codex 変換」「エクスポート」などで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

SwiftUI ViewのDesign System準拠性を監査する。既存UIのレビュー、デザインチェック時に使用。「デザインレビュー」「UIチェック」「design audit」「デザイン監査」「UI監査」「デザインチェック」「トークン確認」などのキーワードで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

UIの視覚的差分を検出・比較する。デザイン変更前後の比較、リファレンスとの差分確認時に使用。「デザイン比較」「UI差分」「design diff」「design compare」「ビフォーアフター」「見た目の違い」などのキーワードで自動適用。

The English summary is being prepared. Showing the original description.

no-problem-dev/claude-code-plugins5Updated Mar 15, 2026

See all skills by no-problem-dev

Report a problem with this skill