Automated summary
Drives TDD (Red-Green-Refactor) implementation of tasks or bug fixes in the ETNA_TRADER project, working from documents in the tasks/ directory on a feature branch.
Strengths
- Automatically determines the right mode: starting fresh, resuming in-progress work, or applying code review feedback.
- Enforces an explicit TDD loop with dotnet build / dotnet test commands to run at each cycle.
- Restates the project's architecture rules (Contracts → Services → DAL → API, ConfigureAwait, CancellationToken, named exports).
- Gates all Git writes behind explicit user approval (commit, push, PR, merge).
Limitations
- Tightly coupled to ETNA_TRADER: .NET/TypeScript conventions and tasks/ + .claude/rules/ paths are repo-specific.
- Assumes a complete task document already exists (acceptance criteria, test plan, impacted files); it does not write one.
- The provided text is truncated mid-TDD section, so the refactor step and later phases are not fully documented.
Use it when a task or bug fix already has a structured document in tasks/ and needs to be implemented or resumed following TDD on a dedicated branch.
Avoid it for open-ended exploration, quick prototyping, or projects outside ETNA_TRADER where the architecture constraints and tasks/ workflow do not apply.
Security analysis
SafeThe skill instructs standard development workflows (TDD, builds, tests, linting) and explicitly requires user permission before any git writes. No destructive, exfiltration, or obfuscated commands are present.
No concerns found
How this analysis is madeExamples
Implement tasks/ETNA-142-order-cancellation/ using TDD. Start from scratch and follow the task document exactly.Continue the implementation of the task in tasks/ETNA-98-position-reconciliation — check git history and the task status to see where we stopped.Address the code review comments on the branch for tasks/ETNA-77-risk-limits and re-run the unit tests afterwards.name: si description: Execute structured TDD implementation following task documents or bug fixing in ETNA_TRADER. Use when starting, continuing, or resuming implementation of a task or fixing a bug from tasks/ directory. Also handles addressing code review feedback. argument-hint: "[task-directory]" user-invocable: true
Start Implementation — ETNA_TRADER
PRIMARY OBJECTIVE
Implement features systematically with TDD approach on feature branches.
Three modes of operation:
- Start — Begin implementation from scratch
- Continue — Resume in-progress implementation
- Address CR — Apply code review feedback
Before any work, determine which mode applies by reviewing the task document status and git history.
CONSTRAINTS
- Follow the existing task document in
tasks/directory - Git writes require explicit user permission: Do NOT create commits, push branches, open PRs, or merge unless the user explicitly approves
- STRICT DESCRIPTION ADHERENCE: Only implement what is explicitly described in the task document
- Follow ETNA_TRADER architecture layer rules (Contracts → Services → DAL → API)
- No hardcoded connection strings — always use
IConfigurationor app settings ConfigureAwait(false)on all service and repositoryawaitcallsCancellationTokenmust be propagated through the entire call chain- Named exports only — no default exports from TypeScript components (frontend tasks)
- No
async void— useasync Task(except event handlers) - Use
ArgumentNullException.ThrowIfNull/ guard clauses at service entry points
WORKFLOW STEPS
STEP 1: Task Validation
-
Ask user: "Which task to implement? Provide task name or path." If not provided:
- List tasks in
tasks/if unclear
- List tasks in
-
Validate document:
- Confirm the task exists
- Confirm scope is unambiguous: clear acceptance criteria, clear "done" definition
- Confirm task status is appropriate ("Ready for Implementation" or "Draft")
- Confirm there is an implementation plan: impacted files, layer notes, test plan
-
Pre-implementation check:
- Review relevant rules:
.claude/rules/trading-csharp-conventions.md,.claude/rules/trading-testing-architecture.md - Review frontend rules if UI work:
.claude/rules/trading-component-patterns.md - Explore affected codebase areas
- Verify .NET build and tests pass:
dotnet build+dotnet test qa/ --filter "Category!=Integration"— tail output
- Review relevant rules:
STEP 2: Setup
Note: Skip this step when continuing implementation or addressing Code Review results.
- Update task status to "In Progress" with timestamp
- Create feature branch (follow repo convention):
feat/<ticket-id>-[slug]orfix/<ticket-id>-[slug] - Update task document with branch name
- Permission gate: Ask for explicit approval before any git operation
STEP 3: Implementation
Parallelization (optional)
If part of the work can be done safely in parallel (e.g., separate .NET service + separate frontend component with no shared state), use the parallelization skill:
.claude/skills/parallelization/skill.md
Sequential Mode
Before Each Step:
- Announce: "Starting Step [N]: [Description]"
- Review requirements: Acceptance criteria, tests, artifacts
During Implementation (TDD + Docs):
-
Follow agreed Test Plan: Implement tests based on the Test Plan in the task document
-
TDD Red-Green-Refactor Cycle — .NET (NUnit/xUnit):
- RED: Write failing test first
dotnet test qa/<Project>.Tests/ --filter "FullyQualifiedName~<TestClass>" --no-build 2>&1 | tail -20 # Expected: FAIL - GREEN: Write minimal code to make test pass
dotnet build src/<Project>/ 2>&1 | tail -10 dotnet test qa/<Project>.Tests/ --filter "FullyQualifiedName~<TestClass>" 2>&1 | tail -20 # Expected: PASS - REFACTOR: Clean up while keeping tests green
- RED: Write failing test first
-
TDD Red-Green-Refactor Cycle — TypeScript (Vitest/Jest, frontend):
- RED: Write failing test
cd frontend/ACAT && npx vitest run --reporter=verbose 2>&1 | tail -20 - GREEN: Implement component/hook to pass test
- REFACTOR: Clean up
- RED: Write failing test
-
Update relevant documentation DURING code writing (not after):
- New service/repository → update
docs/architecture.mdif new pattern established - Architecture change → create or update ADR in
docs/adr/ - New DB object → document in
db/README.mdor inline comments in SSDT.sql - Provider/DI change → update Unity registration module and document in task
- New service/repository → update
-
Test file locations:
- Unit (C#):
qa/<Project>.Tests/<mirrors-src-path>/<Type>Tests.cs - Integration (C#):
qa/<Project>.IntegrationTests/<mirrors-src-path>/<Type>IntegrationTests.cs - Frontend:
frontend/ACAT/src/features/<feature>/<Component>.test.tsx(co-located)
- Unit (C#):
-
Build and type-check commands:
# .NET dotnet build src/<Project>/ 2>&1 | tail -20 dotnet test qa/<Project>.Tests/ 2>&1 | tail -30 # TypeScript frontend cd frontend/ACAT && npx tsc --noEmit 2>&1 | head -20 cd frontend/ACAT && npm run lint 2>&1 | head -20
After Each Step:
-
Update the task document (REQUIRED — not just chat output):
- Mark step checkbox as complete:
- [ ]→- [x] - Add Changelog entry describing what was done
- Update Tests field with command run + result
Example:
- [x] Sub-step 3.1: Add OrderService.PlaceOrderAsync - **Tests**: `dotnet test qa/Etna.Trader.FrontOffice.Tests/ --filter "OrderServiceTests"` — 8 PASS - **Changelog**: Created `OrderService.PlaceOrderAsync`, added `OrderServiceTests.cs` - Mark step checkbox as complete:
-
Commit changes (permission gate):
- If the user has not explicitly approved git writes: ask for permission before any
gitcommand - If approved: use conventional commits
- Code + tests:
git commit -m "feat(orders): add PlaceOrderAsync with validation" - DB change:
git commit -m "db(orders): add ClientOrderId column to Orders table" - Docs update:
git commit -m "docs(orders): document order placement architecture"
- Code + tests:
- If the user has not explicitly approved git writes: ask for permission before any
Error Recovery
- Tests fail: Fix the failing code, re-run tests. Do NOT skip or delete failing tests.
- Build errors: Fix the errors. Do NOT suppress with
#pragma warning disablewithout documented reason. - Type errors (TypeScript): Fix the type errors. Do NOT use
anyas a shortcut. - Lint errors: Fix the lint errors. Do NOT use
// eslint-disablewithout justification. - Task document incomplete: Ask user to clarify missing criteria before proceeding.
STEP 4: Completion
Final Verification
Run quality gates via agent:
- Use Task tool with subagent_type: "automated-quality-gate"
- Provide
task_path(absolute path to task directory) - Agent runs build/lint/tests and writes a Quality Gate Report in the task directory
# .NET quality gate
dotnet build 2>&1 | tail -10
dotnet test qa/Etna.Tests.sln --filter "Category!=Integration" 2>&1 | tail -30
# Frontend quality gate (if applicable)
cd frontend/ACAT && npx tsc --noEmit && npm run lint && npx vitest run 2>&1 | tail -20
Finalize Task Document
- Update status to "Ready for Review" with timestamp
- Verify all checkboxes are accurate
- Add implementation summary:
## Completion Summary **Implementation Complete**: [Brief technical description] **Files Changed**: [count] files modified, [count] files created **Tests**: [count] total (unit: [n], integration: [n]) **Quality Gate**: PASSED — build clean, lint clean, all tests pass **Technical Debt/Follow-ups**: [Any deferred work]
STEP 5: Prepare for Code Review
-
Permission gate (required):
- Creating a PR and pushing requires explicit user approval for git writes
-
Quick task-doc self-check:
- All implementation checkboxes are accurate
- Test evidence and quality-gate result are documented
- Branch name is consistent
- Completion summary is present and readable for reviewers
-
Prepare PR context in task document:
- Ensure branch name and test evidence are up to date
- Add a short reviewer-oriented implementation summary
- Create/open PR manually or via
gh pr create
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/tdd-implementation-for-etna-trader-mrwak8z2/download' --output '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md.part' && mv '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md.part' '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md' && test -s '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/si' && cp -R '.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2' '.claude/skills/si'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2'openskills read 'tdd-implementation-for-etna-trader-mrwak8z2'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/tdd-implementation-for-etna-trader-mrwak8z2/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.