ワンクリックで
test-patterns
Generate tests following project conventions with proper patterns for unit, integration, and e2e testing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate tests following project conventions with proper patterns for unit, integration, and e2e testing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create Architecture Decision Records using the Michael Nygard template with context, decision, alternatives, and consequences
Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination
Generate CHANGELOG.md from git history in Keep a Changelog format with Added, Changed, Deprecated, Removed, Fixed, and Security categories
Generate CI/CD pipeline config for detected platform with lint, test, build, and deploy stages
Scan dependencies for CVEs, outdated packages, license issues, and unused deps to produce a prioritized remediation list
Guide deployment processes including CI/CD pipeline creation, environment setup, and rollback procedures
| name | test-patterns |
| description | Generate tests following project conventions with proper patterns for unit, integration, and e2e testing |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"general"} |
Use this skill when you need to write tests for new or existing code. This skill first analyzes existing tests to match the project's style.
Discover: Find existing tests to understand patterns
*.test.*, *.spec.*, __tests__/ directoriesAnalyze: Read the code under test
Generate: Write tests following discovered patterns
describe("ModuleName", () => {
// Setup
beforeEach(() => { /* ... */ })
describe("methodName", () => {
it("should return expected value for valid input", () => {
// Arrange
const input = createTestInput()
// Act
const result = methodName(input)
// Assert
expect(result).toEqual(expectedValue)
})
it("should throw for invalid input", () => {
expect(() => methodName(null)).toThrow(ExpectedError)
})
})
})
class TestModuleName:
@pytest.fixture
def setup(self):
return create_test_fixture()
def test_method_returns_expected_for_valid_input(self, setup):
result = method_name(setup)
assert result == expected_value
def test_method_raises_for_invalid_input(self):
with pytest.raises(ExpectedError):
method_name(None)
@DisplayName("ModuleName Tests")
class ModuleNameTest {
@BeforeEach
void setUp() { /* ... */ }
@Test
@DisplayName("should return expected value for valid input")
void methodName_validInput_returnsExpected() {
var result = moduleName.methodName(validInput);
assertEquals(expected, result);
}
@Test
@DisplayName("should throw for invalid input")
void methodName_invalidInput_throws() {
assertThrows(ExpectedException.class,
() -> moduleName.methodName(null));
}
}