skills-catalog/ln-140-test-docs-creator/SKILL.md
Creates test documentation (testing-strategy.md, tests/README.md) with Risk-Based Testing philosophy. Use when setting up test strategy for a project.
npx skillsauth add levnikolaevich/claude-code-skills ln-140-test-docs-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L2 Worker
This skill creates and validates test documentation: testing-strategy.md (universal testing philosophy) + tests/README.md (test organization structure with tests/automated/ + Story-Level Test Task Pattern).
Creates and validates test documentation (testing-strategy.md + tests/README.md) establishing universal testing philosophy, Risk-Based Testing strategy, tests/automated/ as the default automated-test root, and the Story-Level Test Task Pattern for any project.
This skill is a L2 WORKER invoked by ln-100-documents-pipeline orchestrator.
This skill should be used directly when:
The skill follows a 3-phase workflow: CREATE → VALIDATE STRUCTURE → VALIDATE CONTENT. Each phase builds on the previous, ensuring complete structure and semantic validation.
MANDATORY READ: Load shared/references/docs_quality_contract.md, shared/references/docs_quality_rules.json, and shared/references/markdown_read_protocol.md.
Objective: Establish test philosophy and documentation structure.
Process:
1.1 Check & create directories:
docs/reference/guides/ exists → create if missingtests/ exists → create if missingtests/manual/ exists → create if missingtests/manual/results/ exists → create if missingtests/manual/results/ to project .gitignore if not present1.2 Check & create documentation files:
Check if docs/reference/guides/testing-strategy.md exists
If exists:
If NOT exists:
ln-140-test-docs-creator/references/testing_strategy_template.md → docs/reference/guides/testing-strategy.md[CURRENT_DATE] — current date (YYYY-MM-DD)Check if tests/README.md exists
If exists:
If NOT exists:
ln-140-test-docs-creator/references/tests_readme_template.md → tests/README.md{{DATE}} — current date (YYYY-MM-DD)1.3 Output:
docs/reference/guides/
└── testing-strategy.md # Created or existing
tests/
├── README.md # Created or existing
└── manual/
└── results/ # Created, added to .gitignore
Objective: Ensure test documentation files comply with structural requirements and auto-fix violations.
Process:
2.1 Check SCOPE tags:
<!-- SCOPE: ... --> tag and metadata markers in each<!-- SCOPE: Universal testing philosophy (Risk-Based Testing, test pyramid, isolation patterns) --><!-- SCOPE: Test organization structure (directory layout, Story-Level Test Task Pattern) -->scope_tags_added += 12.2 Check required sections:
references/questions.md## [Section Name] header existsmissing_sections += 12.3 Check Maintenance section:
## Maintenance header## Maintenance
**Last Updated:** [current date]
**Update Triggers:**
- Test framework changes
- Test organization changes
- New test patterns introduced
**Verification:**
- [ ] All test examples follow current framework syntax
- [ ] Directory structure matches actual tests/
- [ ] Test runner commands are current
maintenance_added += 12.4 Check POSIX file endings:
posix_fixed += 12.5 Report validation:
✅ Structure validation complete:
- SCOPE tags: [added N / already present]
- Missing sections: [added N sections]
- Maintenance sections: [added N / already present]
- POSIX endings: [fixed N / compliant]
Objective: Ensure each section answers its questions with meaningful content and populate test-specific sections from auto-discovery.
Process:
3.1 Load validation spec:
references/questions.md3.2 Validate testing-strategy.md sections:
For this file, use standard template content (no auto-discovery needed):
Testing Philosophy section:
Test Levels section:
Note: testing-strategy.md is universal philosophy - no project-specific auto-discovery needed.
3.3 Validate tests/README.md sections with auto-discovery:
Section: Test Organization
Auto-discover test framework:
package.json → "devDependencies" and "dependencies":
requirements.txt (if Python project):
go.mod (if Go project):
framework_detected = "[framework]"framework_detected = NoneAuto-discover test directory structure:
"tests/automated/e2e/**/*.{js,ts,py,go}""tests/automated/integration/**/*.{js,ts,py,go}""tests/automated/unit/**/*.{js,ts,py,go}"e2e_count = len(e2e_files)integration_count = len(integration_files)unit_count = len(unit_files)tests/
automated/
e2e/ (empty, ready for E2E tests)
integration/ (empty, ready for Integration tests)
unit/ (empty, ready for Unit tests)
Auto-discover naming conventions:
*.test.js → "*.test.js" convention*.spec.ts → "*.spec.ts" conventiontest_*.py → "test_*.py" convention*_test.go → "*_test.go" conventionCheck Test Organization section content:
tests/automated/e2e, tests/automated/integration, tests/automated/unit)Section: Running Tests
Auto-discover test runner command:
package.json → "scripts" → "test""jest" → Test runner: "npm test" (runs jest)"vitest" → Test runner: "npm test" (runs vitest)"mocha" → Test runner: "npm test" (runs mocha)Auto-discover coverage command (optional):
package.json → "scripts" for:
Check Running Tests section content:
3.4 Report content validation:
✅ Content validation complete:
- testing-strategy.md: [2 sections checked]
- tests/README.md: [2 sections checked]
- Test framework: [detected framework or "Not detected"]
- Test structure: [automated/e2e, automated/integration, automated/unit counts or "Created placeholder"]
- Naming convention: [pattern or "Framework default"]
- Test runner: [command]
- Coverage command: [command]
docs/reference/guides/
└── testing-strategy.md # Universal testing philosophy (465 lines)
tests/
└── README.md # Test organization + Story-Level Pattern (112 lines)
Note: Actual test directories (e2e/, integration/, unit/) created during Story test task execution or Phase 3 if missing.
SCOPE, metadata markers, Quick Navigation, Agent Entry, and Maintenanceshared/references/risk_based_testing_guide.mdTesting Strategy Template:
references/testing_strategy_template.md - Universal testing philosophy with:
tests/automated/e2e, tests/automated/integration, tests/automated/unit definitions)Tests README Template:
references/tests_readme_template.md - Test organization with:
Validation Specification:
references/questions.md (v1.0.0) - Question-driven validation:
Invoked by: ln-100-documents-pipeline orchestrator
Requires:
docs/reference/guides/ directory (created by ln-120-reference-docs-creator or Phase 1 if missing)Creates:
docs/reference/guides/testing-strategy.md (universal testing philosophy)tests/README.md (test organization structure)Return a normalized summary so ln-100 can run one centralized docs-quality gate:
{
"created_files": [
"docs/reference/guides/testing-strategy.md",
"tests/README.md"
],
"skipped_files": [],
"quality_inputs": {
"doc_paths": [
"docs/reference/guides/testing-strategy.md",
"tests/README.md"
],
"owners": {
"docs/reference/guides/testing-strategy.md": "ln-140-test-docs-creator",
"tests/README.md": "ln-140-test-docs-creator"
}
},
"validation_status": "passed|passed_with_fixes|skipped"
}
MANDATORY READ: Load shared/references/docs_generation_summary_contract.md
Accept optional summaryArtifactPath.
Summary kind:
docs-generationRequired payload semantics:
worker = "ln-140"statuscreated_filesskipped_filesquality_inputsvalidation_statuswarningsWrite the summary to the provided artifact path or return the same envelope in structured output.
Before completing work, verify ALL checkpoints:
✅ Structure Created (Phase 1):
docs/reference/guides/ directory existstests/ directory existstests/manual/ directory existstests/manual/results/ directory existstests/manual/results/ added to .gitignoretesting-strategy.md exists (created or existing)tests/README.md exists (created or existing)✅ Structure Validated (Phase 2):
✅ Content Validated (Phase 3):
✅ Reporting:
created_files, skipped_files, quality_inputs, and validation_statusStandards:
Language: English only
Auto-Discovery Support:
Version: 7.2.0 Last Updated: 2026-01-15
testing
Checks runtime lifecycle and config validation: bootstrap, shutdown, probes, cleanup, env sync, and fail-fast startup. Use for runtime readiness.
testing
Checks races, deadlocks, async hazards, TOCTOU, blocking I/O, and shared resource contention. Use when auditing concurrency correctness.
testing
Checks diagnosability through structured logs, metrics, traces, correlation IDs, and useful log levels. Use when auditing incident visibility.
development
Finds code that can be safely deleted: unreachable, unused, obsolete compatibility, and commented-out code. Use when pruning dead code.