with one click
tdd
// Test-Driven Development workflow. Write failing test first, implement code to pass, then refactor. Essential for all languages: Go, TypeScript, C++, Python. Use before any implementation task.
// Test-Driven Development workflow. Write failing test first, implement code to pass, then refactor. Essential for all languages: Go, TypeScript, C++, Python. Use before any implementation task.
C++ development best practices. Modern C++20/23, RAII, zero-overhead abstractions, safety. Use when writing C++ code.
Docker and container best practices. Multi-stage builds, security, optimization. Use when creating Dockerfiles.
Go development best practices. Idiomatic Go, error handling, concurrency patterns, testing. Use when writing Go code.
Observability best practices. Logging, metrics, tracing, alerting. Essential for production services. Use for any backend service.
React Native development. Cross-platform code, native modules, performance. Use when building mobile apps.
Use when the user wants to commit, push, and open a pull request for the current changes. Stages relevant files, writes a descriptive commit message, pushes the branch, opens a PR against main, and posts an /oc review comment so opencode automatically reviews and approves if ready.
| name | tdd |
| description | Test-Driven Development workflow. Write failing test first, implement code to pass, then refactor. Essential for all languages: Go, TypeScript, C++, Python. Use before any implementation task. |
Enforce TDD for every implementation task. This skill ensures quality throughtests first.
func TestUnitName(t *testing.T) {
t.Run("should do thing", func(t *testing.T) {
// arrange
input := ...
expected := ...
// act
result := DoThing(input)
// assert
assert.Equal(t, expected, result)
})
}
describe('UnitName', () => {
it('should do thing', () => {
const input = ...;
const expected = ...;
const result = doThing(input);
expect(result).toEqual(expected);
});
});
TEST_F(UnitNameTest, ShouldDoThing) {
auto input = ...;
auto expected = ...;
auto result = doThing(input);
EXPECT_EQ(expected, result);
}