From dknet-minimal
Create and maintain Reqnroll + NUnit BDD .feature scenarios for DKNet.Templates using specs/contracts as the assertion source of truth and docs/specs as scenario reference context. Use when adding or updating BDD scenarios and step bindings.
npx claudepluginhub baoduy/dknet.templates --plugin dknet-minimalThis skill uses the workspace's default tool permissions.
**Duration**: 25-45 minutes | **Difficulty**: Intermediate | **Category**: Testing & Quality
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Processes PDFs: extracts text/tables/images, merges/splits/rotates pages, adds watermarks, creates/fills forms, encrypts/decrypts, OCRs scans. Activates on PDF mentions or output requests.
Share bugs, ideas, or general feedback.
Duration: 25-45 minutes | Difficulty: Intermediate | Category: Testing & Quality
Use this skill to build high-quality BDD scenarios for src/ApiEndpoints/Minimal.App.BDDTests/ that are traceable to feature documentation and specifications.
This skill enforces a context-first workflow:
docs/features/** for business intent and architecture context.specs/** for acceptance criteria, contracts, and edge cases..feature scenarios that map directly to those requirements.[Binding] steps with deterministic setup and contract-first assertions.Assertion policy:
specs/<feature>/contracts/* is the source of truth for response assertions.docs/features/** and specs/<feature>/spec.md are reference context for scenario coverage and language only..feature file under src/ApiEndpoints/Minimal.App.BDDTests/Features/.Gather these first:
CustomerProfiles).docs/features/<feature-name>/.specs/<feature-id-or-name>/.Minimal.App.BDDTests/Support/.Collect sources in this order:
docs/features/<feature>/README.md (business narrative)docs/features/<feature>/api-reference.md (endpoint examples)docs/features/<feature>/architecture.md (workflow and boundaries)specs/<feature>/spec.md (user stories, acceptance scenarios, edge cases)specs/<feature>/contracts/* (canonical request/response and scenario contract)specs/<feature>/tasks.md (implementation checks)Output of this step:
Use this branching logic:
specs/<feature>/contracts/* for assertions.Location pattern:
src/ApiEndpoints/Minimal.App.BDDTests/Features/<Domain>/<Action>.featureAuthoring rules:
.feature file.Background only for setup shared by all scenarios.Location pattern:
src/ApiEndpoints/Minimal.App.BDDTests/Features/<Domain>/Steps/<Action>Steps.csImplementation rules:
[Binding] class with constructor injection for shared context (HttpClient, ScenarioState, and other registered services).SharedConsts.JsonSerializerOptions.X-Idempotency-Key).isSuccess, value, errors, required object/array shape)value.name, errors[0].message, identifiers, totals)Run and verify:
dotnet build src/DKNet.Templates.sln -c Releasedotnet test src/ApiEndpoints/Minimal.App.BDDTestsThen confirm:
A BDD scenario set is complete when:
docs/features and specs artifacts..feature step text and [Binding] attributes match exactly.See validation checklist: checklist.md
Cause: Asserting only IsSuccessStatusCode or plain string fragments without validating contract-defined JSON shape.
Fix: Parse JSON and assert contract fields (isSuccess, value, errors, nested fields and required values).
Cause: Step text changed in .feature but attributes in step class were not updated.
Fix: Keep step phrases centralized and copy exact text into [Given]/[When]/[Then] attributes.
Cause: Missing required headers or test host configuration mismatch.
Fix: Verify idempotency header and Support/ApiHooks.cs + Support/BddApiFactory.cs setup.