OpenParable
Skip to content
← Back to skills

Fix Error

Testing & Quality
fix-error

Fix Error is an Agent Skill for testing & quality published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Go のエラーを診断し修正する。「エラーを直して」「ビルドエラー修正」「コンパイルエラー」「Go のエラー修正」「ビルドが通らない」「テストが失敗」「lint エラー修正」などで起動。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/fix-error/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/fix-error, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Fix Error

Go のエラーを診断し修正するスキル。

トリガー

  • 「エラーを直して」「ビルドエラー修正」「コンパイルエラー」
  • 「Go のエラー修正」「ビルドが通らない」「テストが失敗」「lint エラー修正」

実行内容

  1. エラーメッセージの解析
  2. 原因の特定
  3. 修正の実施
  4. 修正確認

Claude への指示

実行手順

  1. エラー情報の収集

    ユーザーがエラーメッセージを提供していない場合:

    # ビルドエラー確認
    go build ./... 2>&1
    
    # テストエラー確認
    go test ./... 2>&1
    
    # lint エラー確認
    golangci-lint run ./... 2>&1
    
  2. エラー解析

    エラーメッセージから以下を特定:

    • ファイル名と行番号
    • エラータイプ(コンパイル/ランタイム/lint)
    • 具体的なエラー内容
  3. 原因特定

    # 該当ファイルを読み込み
    Read ツールで該当箇所を確認
    
    # 関連コードを検索
    Grep ツールで定義や使用箇所を検索
    
  4. 修正実施

    error-analyzer エージェントの知識を活用:

    • コンパイルエラー: 型エラー、未定義、インポート
    • ランタイムエラー: nil ポインタ、範囲外アクセス
    • lint エラー: errcheck、staticcheck、gosimple
  5. 修正確認

    go build ./...
    go test ./...
    golangci-lint run ./...
    

出力形式

## エラー修正完了

### 検出されたエラー
- 種類: {コンパイル/ランタイム/lint}
- 箇所: {ファイル名}:{行番号}
- 内容: {エラーメッセージ}

### 原因
{原因の説明}

### 修正内容
{修正した内容の説明}

### 確認結果
- ビルド: ✅ 成功
- テスト: ✅ 成功