Skill
Community

corder-test-generation

Install
1
Install the plugin
$
npx claudepluginhub takemi-ohama/ai-plugins --plugin ndf

Want just this skill?

Then install: npx claudepluginhub u/[userId]/[slug]

Description

Generate unit tests, integration tests, and test fixtures for code. Supports Jest, Mocha, pytest. Use when writing tests or improving test coverage. This skill provides automated test generation: - Unit tests with AAA pattern (Arrange, Act, Assert) - Integration tests for APIs and databases - Test fixtures and mocks - Edge case identification Triggers: "generate tests", "create unit test", "add test coverage", "write tests", "テスト生成", "テストコード作成", "カバレッジ向上"

Tool Access

This skill is limited to using the following tools:

ReadWriteBash
Supporting Assets
View in Repository
01-patterns.md
02-examples.md
Skill Content

Corder Test Generation Skill

概要

corderエージェントが既存のコードに対してテストを自動生成する際に使用します。Jest、Mocha、pytestなどの主要なテストフレームワークに対応。

クイックリファレンス

AAA パターン

test('should do something', () => {
  // Arrange: テストデータを準備
  const input = { ... };
  const expected = { ... };

  // Act: テスト対象を実行
  const result = functionUnderTest(input);

  // Assert: 結果を検証
  expect(result).toEqual(expected);
});

基本コマンド

node scripts/generate-tests.js src/utils/calculator.js

カバレッジ目標

  • ユニットテスト: 80%以上
  • クリティカルパス: 100%
  • エッジケース: 主要な境界値をカバー

ベストプラクティス

DODON'T
AAAパターンに従うテストの重複
1テスト = 1アサーション実装の詳細に依存
エッジケースをテスト過剰なモック
独立したテスト(実行順序に依存しない)外部依存(ネットワーク等)
わかりやすいテスト名テストのテスト

詳細ガイド

ファイル内容
01-patterns.mdAAAパターン、エッジケース、モック・スパイの詳細
02-examples.mdユニットテスト、API統合テストの実装例

関連Skill

  • corder-code-templates: テスト対象のコード生成
Stats
Stars0
Forks0
Last CommitFeb 5, 2026

Similar Skills