Agent skill
db-test
Generate database integration tests with Testcontainers
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/db-test
SKILL.md
Database Integration Tests
Generate integration tests using Testcontainers for real database validation.
For .NET (Testcontainers)
dotnet add package Testcontainers.CosmosDb
public class CandidateRepositoryTests : IAsyncLifetime
{
private readonly CosmosDbContainer _container = new CosmosDbBuilder().Build();
public async Task InitializeAsync() => await _container.StartAsync();
public async Task DisposeAsync() => await _container.DisposeAsync();
[Fact]
public async Task Create_ValidCandidate_Persists()
{
var client = new CosmosClient(_container.GetConnectionString());
var repo = new CandidateRepository(client, Options.Create(settings));
var candidate = CreateTestCandidate();
await repo.CreateAsync(candidate);
var result = await repo.GetByIdAsync(candidate.Id);
result.Should().BeEquivalentTo(candidate);
}
}
Arguments
<repository-name>: Repository class to test--provider=<cosmosdb|postgres|mongodb>: Database provider
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?