write-testlisted
Install: claude install-skill ghozimahdi/gm-aiagent-plugins
Use the current user request as this skill's input. In Claude Code invoke it as
`/ufil:write-test`; in Codex invoke it as `$ufil:write-test`. Resolve
`UFIL_ROOT` to the plugin root containing this skill; Claude Code may provide
`CLAUDE_PLUGIN_ROOT`, while Codex can resolve it from the installed skill path.
Write tests for a feature or file following GM testing conventions.
Arguments: <requested arguments> (feature name, file path, or "all" to scan for missing tests)
## Steps
### 0. Detect project type
- **Modular**: `packages/` directory exists → multi-package with melos
- **Single-module**: No `packages/` directory → single `lib/` project
### 1. Identify what needs tests
- Non-modular: find blocs, repositories, usecases, and DTOs in `lib/features/<feature>/`
- Modular: find across `packages/domain/domain_<feature>/`, `packages/data/data_<feature>/`, `packages/presentation/feature_<feature>/`
- If `<requested arguments>` is a file path, write tests for that specific file
- If `<requested arguments>` is `all`, scan all features and compare against existing tests to find missing ones
### 2. Read source files
Before writing any test, read the file under test and its related types (state, event, model, params).
### 3. Write tests
**Directory structure (non-modular):**
```
test/features/<feature>/
├── data/ # repository_impl_test.dart, dto_test.dart
├── domain/ # usecase_test.dart
└── presentation/ # bloc_test.dart
```
**Directory structure (modular —