Communitygithub.com

Goテストパターン

テーブル駆動テスト、サブテスト、ベンチマーク、ファジング、テストカバレッジを含むGoテストパターン。TDD手法に従い、慣用的なGoプラクティスを使用します。Goテスト作成時(テーブル駆動テスト、サブテスト、ベンチマーク、ファジング、カバレッジ)に活用してください。

Goテストパターン とは?

このスキルは、Go言語における包括的なテストパターンを提供し、TDD(テスト駆動開発)ワークフローの実践を支援します。主な内容として、テーブル駆動テスト、サブテストとパラレルテスト、テストヘルパー、ゴールデンファイル、インターフェースベースのモック、ベンチマーク、ファジング(Go 1.18以降)、HTTPハンドラーテスト、カバレッジ目標の設定などが含まれます。コード例とともに、RED-GREEN-REFACTORサイクルの段階的な説明が提供されており、Go開発者が信頼性が高く保守しやすいテストを記述できるように設計されています。このスキルは、Claude Code、Cursor、CodexなどのAIエージェントプラットフォームで使用でき、開発者がテストを作成または保守する際に適用することで、効率的なテスト実装と品質向上に貢献します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/golang-testing

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Goテストパターン は何をしますか?

TDD手法に従い、信頼性が高く保守しやすいテストを書くための包括的なGoテストパターン。

アクティベートするタイミング

  • 新しいGo関数やメソッドを書くとき
  • 既存のコードにテストカバレッジを追加するとき
  • パフォーマンスが重要なコードのベンチマークを作成するとき
  • 入力バリデーションのファズテストを実装するとき
  • GoプロジェクトでTDDワークフローに従うとき

GoでのTDDワークフロー

RED-GREEN-REFACTORサイクル

RED     → 最初に失敗するテストを書く
GREEN   → テストを通すための最小限のコードを書く
REFACTOR → テストが通ったままコードを改善する
REPEAT  → 次の要件に進む

GoでのステップバイステップTDD

// ステップ1: インターフェース/シグネチャを定義
// calculator.go
package calculator

func Add(a, b int) int {
    panic("not implemented") // プレースホルダー
}

// ステップ2: 失敗するテストを書く (RED)
// calculator_test.go
package calculator

import "testing"

func TestAdd(t *testing.T) {
    got := Add(2, 3)
    want := 5
    if got != want {
        t.Errorf("Add(2, 3) = %d; want %d", got, want)
    }
}

// ステップ3: テストを実行 - FAILを確認
// $ go test
// --- FAIL: TestAdd (0.00s)
// panic: not implemented

// ステップ4: 最小限のコードを実装 (GREEN)
func Add(a, b int) int {
    return a + b
}

// ステップ5: テストを実行 - PASSを確認
// $ go test
// PASS

// ステップ6: 必要に応じてリファクタリングし、テストがまだ通ることを確認

テーブル駆動テスト

Goテストの標準パターン。最小限のコードで包括的なカバレッジを実現します。

func TestAdd(t *testing.T) {
    tests := []struct {
        name     string
        a, b     int
        expected int
    }{
        {"positive numbers", 2, 3, 5},
        {"negative numbers", -1, -2, -3},
        {"zero values", 0, 0, 0},
        {"mixed signs", -1, 1, 0},
        {"large numbers", 1000000, 2000000, 3000000},
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got := Add(tt.a, tt.b)
            if got != tt.expected {
                t.Errorf("Add(%d, %d) = %d; want %d",
                    tt.a, tt.b, got, tt.expected)
            }
        })
    }
}

エラーケースを含むテーブル駆動テスト

func TestParseConfig(t *testing.T) {
    tests := []struct {
        name    string
        input   string
        want    *Config
        wantErr bool
    }{
        {
            name:  "valid config",
            input: `{"host": "localhost", "port": 8080}`,
            want:  &Config{Host: "localhost", Port: 8080},
        },
        {
            name:    "invalid JSON",
            input:   `{invalid}`,
            wantErr: true,
        },
        {
            name:    "empty input",
            input:   "",
            wantErr: true,
        },
        {
            name:  "minimal config",
            input: `{}`,
            want:  &Config{}, // ゼロ値のコンフィグ
        },
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got, err := ParseConfig(tt.input)

            if tt.wantErr {
                if err == nil {
                    t.Error("expected error, got nil")
                }
                return
            }

            if err != nil {
                t.Fatalf("unexpected error: %v", err)
            }

            if !reflect.DeepEqual(got, tt.want) {
                t.Errorf("got %+v; want %+v", got, tt.want)
            }
        })
    }
}

サブテストとサブベンチマーク

関連テストの整理

func TestUser(t *testing.T) {
    // すべてのサブテストで共有するセットアップ
    db := setupTestDB(t)

    t.Run("Create", func(t *testing.T) {
        user := &User{Name: "Alice"}
        err := db.CreateUser(user)
        if err != nil {
            t.Fatalf("CreateUser failed: %v", err)
        }
        if user.ID == "" {
            t.Error("expected user ID to be set")
        }
    })

    t.Run("Get", func(t *testing.T) {
        user, err := db.GetUser("alice-id")
        if err != nil {
            t.Fatalf("GetUser failed: %v", err)
        }
        if user.Name != "Alice" {
            t.Errorf("got name %q; want %q", user.Name, "Alice")
        }
    })

    t.Run("Update", func(t *testing.T) {
        // ...
    })

    t.Run("Delete", func(t *testing.T) {
        // ...
    })
}

パラレルサブテスト

func TestParallel(t *testing.T) {
    tests := []struct {
        name  string
        input string
    }{
        {"case1", "input1"},
        {"case2", "input2"},
        {"case3", "input3"},
    }

    for _, tt := range tests {
        tt := tt // 範囲変数をキャプチャ
        t.Run(tt.name, func(t *testing.T) {
            t.Parallel() // サブテストを並列実行
            result := Process(tt.input)
            // アサーション...
            _ = result
        })
    }
}

テストヘルパー

ヘルパー関数

func setupTestDB(t *testing.T) *sql.DB {
    t.Helper() // これをヘルパー関数としてマーク

    db, err := sql.Open("sqlite3", ":memory:")
    if err != nil {
        t.Fatalf("failed to open database: %v", err)
    }

    // テスト終了時のクリーンアップ
    t.Cleanup(func() {
        db.Close()
    })

    // マイグレーションを実行
    if _, err := db.Exec(schema); err != nil {
        t.Fatalf("failed to create schema: %v", err)
    }

    return db
}

func assertNoError(t *testing.T, err error) {
    t.Helper()
    if err != nil {
        t.Fatalf("unexpected error: %v", err)
    }
}

func assertEqual[T comparable](t *testing.T, got, want T) {
    t.Helper()
    if got != want {
        t.Errorf("got %v; want %v", got, want)
    }
}

一時ファイルとディレクトリ

func TestFileProcessing(t *testing.T) {
    // 一時ディレクトリを作成 - 自動的にクリーンアップ
    tmpDir := t.TempDir()

    // テストファイルを作成
    testFile := filepath.Join(tmpDir, "test.txt")
    err := os.WriteFile(testFile, []byte("test content"), 0644)
    if err != nil {
        t.Fatalf("failed to create test file: %v", err)
    }

    // テストを実行
    result, err := ProcessFile(testFile)
    if err != nil {
        t.Fatalf("ProcessFile failed: %v", err)
    }

    // アサーション...
    _ = result
}

ゴールデンファイル

testdata/ に保存された期待される出力ファイルに対してテストします。

var update = flag.Bool("update", false, "update golden files")

func TestRender(t *testing.T) {
    tests := []struct {
        name  string
        input Template
    }{
        {"simple", Template{Name: "test"}},
        {"complex", Template{Name: "test", Items: []string{"a", "b"}}},
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got := Render(tt.input)

            golden := filepath.Join("testdata", tt.name+".golden")

            if *update {
                // ゴールデンファイルを更新: go test -update
                err := os.WriteFile(golden, got, 0644)
                if err != nil {
                    t.Fatalf("failed to update golden file: %v", err)
                }
            }

            want, err := os.ReadFile(golden)
            if err != nil {
                t.Fatalf("failed to read golden file: %v", err)
            }

            if !bytes.Equal(got, want) {
                t.Errorf("output mismatch:\ngot:\n%s\nwant:\n%s", got, want)
            }
        })
    }
}

インターフェースを使ったモック

インターフェースベースのモック

// 依存関係のインターフェースを定義

type UserRepository interface {
    GetUser(id string) (*User, error)
    SaveUser(user *User) error
}

// プロダクション実装
type PostgresUserRepository struct {
    db *sql.DB
}

func (r *PostgresUserRepository) GetUser(id string) (*User, error) {
    // 実際のデータベースクエリ
}

// テスト用のモック実装
type MockUserRepository struct {
    GetUserFunc  func(id string) (*User, error)
    SaveUserFunc func(user *User) error
}

func (m *MockUserRepository) GetUser(id string) (*User, error) {
    return m.GetUserFunc(id)
}

func (m *MockUserRepository) SaveUser(user *User) error {
    return m.SaveUserFunc(user)
}

// モックを使ったテスト
func TestUserService(t *testing.T) {
    mock := &MockUserRepository{
        GetUserFunc: func(id string) (*User, error) {
            if id == "123" {
                return &User{ID: "123", Name: "Alice"}, nil
            }
            return nil, ErrNotFound
        },
    }

    service := NewUserService(mock)

    user, err := service.GetUserProfile("123")
    if err != nil {
        t.Fatalf("unexpected error: %v", err)
    }
    if user.Name != "Alice" {
        t.Errorf("got name %q; want %q", user.Name, "Alice")
    }
}

ベンチマーク

基本的なベンチマーク

func BenchmarkProcess(b *testing.B) {
    data := generateTestData(1000)
    b.ResetTimer() // セットアップ時間を計測しない

    for i := 0; i < b.N; i++ {
        Process(data)
    }
}

// 実行: go test -bench=BenchmarkProcess -benchmem
// 出力: BenchmarkProcess-8   10000   105234 ns/op   4096 B/op   10 allocs/op

異なるサイズでのベンチマーク

func BenchmarkSort(b *testing.B) {
    sizes := []int{100, 1000, 10000, 100000}

    for _, size := range sizes {
        b.Run(fmt.Sprintf("size=%d", size), func(b *testing.B) {
            data := generateRandomSlice(size)
            b.ResetTimer()

            for i := 0; i < b.N; i++ {
                // 既にソートされたデータをソートしないようにコピーを作成
                tmp := make([]int, len(data))
                copy(tmp, data)
                sort.Ints(tmp)
            }
        })
    }
}

メモリアロケーションベンチマーク

func BenchmarkStringConcat(b *testing.B) {
    parts := []string{"hello", "world", "foo", "bar", "baz"}

    b.Run("plus", func(b *testing.B) {
        for i := 0; i < b.N; i++ {
            var s string
            for _, p := range parts {
                s += p
            }
            _ = s
        }
    })

    b.Run("builder", func(b *testing.B) {
        for i := 0; i < b.N; i++ {
            var sb strings.Builder
            for _, p := range parts {
                sb.WriteString(p)
            }
            _ = sb.String()
        }
    })

    b.Run("join", func(b *testing.B) {
        for i := 0; i < b.N; i++ {
            _ = strings.Join(parts, "")
        }
    })
}

ファジング (Go 1.18以上)

基本的なファズテスト

func FuzzParseJSON(f *testing.F) {
    // シードコーパスを追加
    f.Add(`{"name": "test"}`)
    f.Add(`{"count": 123}`)
    f.Add(`[]`)
    f.Add(`""`)

    f.Fuzz(func(t *testing.T, input string) {
        var result map[string]interface{}
        err := json.Unmarshal([]byte(input), &result)

        if err != nil {
            // ランダムな入力では不正なJSONは予想される
            return
        }

        // パースに成功した場合、再エンコードは成功するはず
        _, err = json.Marshal(result)
        if err != nil {
            t.Errorf("Marshal failed after successful Unmarshal: %v", err)
        }
    })
}

// 実行: go test -fuzz=FuzzParseJSON -fuzztime=30s

複数入力のファズテスト

func FuzzCompare(f *testing.F) {
    f.Add("hello", "world")
    f.Add("", "")
    f.Add("abc", "abc")

    f.Fuzz(func(t *testing.T, a, b string) {
        result := Compare(a, b)

        // プロパティ: Compare(a, a) は常に0を返す
        if a == b && result != 0 {
            t.Errorf("Compare(%q, %q) = %d; want 0", a, b, result)
        }

        // プロパティ: Compare(a, b) と Compare(b, a) は逆の符号を持つ
        reverse := Compare(b, a)
        if (result > 0 && reverse >= 0) || (result < 0 && reverse <= 0) {
            if result != 0 || reverse != 0 {
                t.Errorf("Compare(%q, %q) = %d, Compare(%q, %q) = %d; inconsistent",
                    a, b, result, b, a, reverse)
            }
        }
    })
}

テストカバレッジ

カバレッジの実行

# 基本的なカバレッジ
go test -cover ./...

# カバレッジプロファイルを生成
go test -coverprofile=coverage.out ./...

# ブラウザでカバレッジを表示
go tool cover -html=coverage.out

# 関数ごとにカバレッジを表示
go tool cover -func=coverage.out

# レース検出とカバレッジ
go test -race -coverprofile=coverage.out ./...

カバレッジ目標

コード種別目標
重要なビジネスロジック100%
公開API90%以上
一般コード80%以上
生成コード除外

カバレッジから生成コードを除外する

//go:generate mockgen -source=interface.go -destination=mock_interface.go

// カバレッジプロファイルではビルドタグで除外:
// go test -cover -tags=!generate ./...

HTTPハンドラーテスト

func TestHealthHandler(t *testing.T) {
    // リクエストを作成
    req := httptest.NewRequest(http.MethodGet, "/health", nil)
    w := httptest.NewRecorder()

    // ハンドラーを呼び出し
    HealthHandler(w, req)

    // レスポンスをチェック
    resp := w.Result()
    defer resp.Body.Close()

    if resp.StatusCode != http.StatusOK {
        t.Errorf("got status %d; want %d", resp.StatusCode, http.StatusOK)
    }

    body, _ := io.ReadAll(resp.Body)
    if string(body) != "OK" {
        t.Errorf("got body %q; want %q", body, "OK")
    }
}

func TestAPIHandler(t *testing.T) {
    tests := []struct {
        name       string
        method     string
        path       string
        body       string
        wantStatus int
        wantBody   string
    }{
        {
            name:       "get user",
            method:     http.MethodGet,
            path:       "/users/123",
            wantStatus: http.StatusOK,
            wantBody:   `{"id":"123","name":"Alice"}`,
        },
        {
            name:       "not found",
            method:     http.MethodGet,
            path:       "/users/999",
            wantStatus: http.StatusNotFound,
        },
        {
            name:       "create user",
            method:     http.MethodPost,
            path:       "/users",
            body:       `{"name":"Bob"}`,
            wantStatus: http.StatusCreated,
        },
    }

    handler := NewAPIHandler()

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            var body io.Reader
            if tt.body != "" {
                body = strings.NewReader(tt.body)
            }
            req := httptest.NewRequest(tt.method, tt.path, body)
            w := httptest.NewRecorder()

            handler.ServeHTTP(w, req)

            resp := w.Result()
            if resp.StatusCode != tt.wantStatus {
                t.Errorf("got status %d; want %d", resp.StatusCode, tt.wantStatus)
            }

            if tt.wantBody != "" {
                gotBody, _ := io.ReadAll(resp.Body)
                if string(gotBody) != tt.wantBody {
                    t.Errorf("got body %q; want %q", gotBody, tt.wantBody)
                }
            }
        })
    }
}

環境変数とテスト

func TestConfigFromEnv(t *testing.T) {
    // 環境変数の設定
    t.Setenv("DATABASE_URL", "localhost:5432")
    t.Setenv("LOG_LEVEL", "debug")

    cfg := LoadConfig()

    if cfg.DatabaseURL != "localhost:5432" {
        t.Errorf("got DB URL %q; want %q", cfg.DatabaseURL, "localhost:5432")
    }
    if cfg.LogLevel != "debug" {
        t.Errorf("got log level %q; want %q", cfg.LogLevel, "debug")
    }
}

共通パターンとベストプラクティス

テストアサーション

// エラーの確認
if err != nil {
    t.Fatalf("unexpected error: %v", err)
}

// 値の等価性の確認
if got != want {
    t.Errorf("got %v; want %v", got, want)
}

// ディープ等価性の確認(スライス、マップ、構造体用)
if !reflect.DeepEqual(got, want) {
    t.Errorf("got %+v; want %+v", got, want)
}

// 型アサーション
var val interface{} = GetValue()
str, ok := val.(string)
if !ok {
    t.Fatalf("expected string, got %T", val)
}

テストケース命名規則

// 明確で説明的なテスト名
func TestFunctionName_Scenario_ExpectedBehavior(t *testing.T) {
    // TestAdd_PositiveNumbers_ReturnsSum
    // TestParse_InvalidInput_ReturnsError
    // TestUserService_GetUser_ExistingUser_ReturnsUser
}

// サブテストではテーブル駆動のケース名を使う
func TestCalculate(t *testing.T) {
    tests := []struct {
        name string // "positive numbers", "negative numbers", "zero"
        // ...
    }
}

テストの失敗メッセージ

// 悪い例 - 曖昧
if got != want {
    t.Error("test failed")
}

// 良い例 - 説明的
if got != want {
    t.Errorf("CalculateTotal(100, 0.1) = %f; want %f", got, want)
}

// 良い例 - Fatalで早期終了
if err != nil {
    t.Fatalf("Setup failed with input %q: %v", input, err)
}

テストファイルの構造

package/
  module.go              # プロダクションコード
  module_test.go         # 外部テスト(_testパッケージ)
  internal/
    testutil/
      helpers.go         # テストヘルパー
  testdata/
    input.json           # テスト入力
    expected.json        # 期待される出力(ゴールデンファイル)

よくある落とし穴と解決策

テスト順序への依存

// 悪い例 - テストが順序に依存
var globalCounter int

func TestIncrement(t *testing.T) {
    // TestAでインクリメント、TestBで値を期待
}

// 良い例 - 独立したテスト
func TestIncrement(t *testing.T) {
    counter := NewCounter()
    counter.Increment()
    if counter.Value() != 1 {
        t.Errorf("got %d; want 1", counter.Value())
    }
}

グローバル状態の共有

// 悪い例 - グローバル変数を変更
var db *sql.DB

// 良い例 - テストごとに新しいインスタンスを作成
func newTestDB(t *testing.T) *sql.DB {
    t.Helper()
    db := setupTestDB(t)
    t.Cleanup(func() { db.Close() })
    return db
}

タイムアウトとデッドライン

func TestSlowOperation(t *testing.T) {
    // テストのデッドラインを設定
    if testing.Short() {
        t.Skip("Skipping slow test in short mode")
    }

    // タイムアウト付きのコンテキストを作成
    ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    defer cancel()

    result, err := SlowOperationWithContext(ctx)
    // ...
}

データ競合

go test -race ./...

テスト実行のベストプラクティス

# すべてのテストを実行
go test ./...

# キャッシュを無効化してテストを実行
go test -count=1 ./...

# 特定のテストパッケージを実行
go test ./internal/service/...

# テスト名でフィルタリング
go test -run TestUser/Create ./...

# 詳細な出力
go test -v ./...

# テストのリスト表示
go test -list . ./...

まとめ

Goテストのベストプラクティス:

  1. テーブル駆動テストで包括的なカバレッジを実現
  2. サブテストでテストを整理し、並列実行
  3. t.Helper() と t.Cleanup() でヘルパー関数を作成
  4. ゴールデンファイルで複雑な出力を検証
  5. インターフェースを使ったモックで依存関係を分離
  6. ベンチマークでパフォーマンスを測定
  7. ファジングで予期しない入力を発見
  8. テストカバレッジの目標を設定し、カバレッジレポートを生成

Goテストツールの実行コマンド:

  • go test - テスト実行
  • go test -v - 詳細な出力
  • go test -cover - カバレッジ表示
  • go test -bench=. - ベンチマーク実行
  • go test -fuzz=. - ファズテスト実行
  • go test -race - データ競合検出

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

関連スキル