danieldekay/ai-ops/django-domain-coverage-improvement
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Improve domain test coverage in Django Clean Architecture projects by systematically testing pure Python domain modules to reach coverage targets.
Install
npx vskill@latest install danieldekay/ai-ops/django-domain-coverage-improvementSKILL.md
When to Use
Use this skill when working on Django Clean Architecture projects and need to improve domain layer test coverage to meet quality gates (typically 95-96%). Especially effective when:
- Domain coverage is below target (starting from ~81%)
- Multiple modules have 0% coverage
- Need to implement OpenSpec change requirements for coverage
- Working with pure Python domain modules (no Django dependencies)
Procedure
- Assess Current Coverage
- Run
./run.sh test-domainto get baseline coverage report - Identify files with 0% coverage or low coverage
- Prioritize files by:
- Lines of code (larger files give more impact)
- Accessibility (simple pure Python modules first)
- Business criticality (core domain logic vs utilities)
- Examine Target Files
- Read the actual source code to understand the API
- Check for existing tests in
tests/unit/domain/ - Look for patterns in existing test files
- Verify method signatures and dataclass structures
- Create Focused Test Files
- Create test files in
tests/unit/domain/submissions/for submission modules - Follow existing pytest patterns and use
@pytest.mark.domainif needed - Start with basic tests that cover the main functionality
- Avoid testing implementation details - focus on public API
- Iterative Testing
- Run tests after each new file:
./run.sh test-domain - Check coverage improvement: look for reduced uncovered lines
- Fix any failing tests by adjusting expectations (don't fix implementation bugs in tests)
- Continue until coverage target is met
- Handle Implementation Bugs Gracefully
- If code has bugs (e.g., missing return statements), write tests that work around them
- Use
pytest.raises()for expected exceptions - Focus on testing what the code actually does, not what it should do
- Document known issues if necessary
Pitfalls to Avoid
- Don't assume APIs exist: Always check the actual implementation before writing tests
- Don't fix implementation bugs in tests: Work around bugs rather than correcting them
- Don't test private methods: Focus on public API and business logic
- Don't create overly complex tests: Start simple and add edge cases incrementally
- Don't ignore test failures: Fix failing tests promptly to avoid confusion
Verification
- Run
./run.sh test-domainand check coverage report - Look for: "OK" status (no test failures), improved coverage percentage
- Verify specific files now show coverage >80% instead of 0%
- Ensure all tests pass with
./run.sh lintand./run.sh typecheck
Example Files Tested
content_type_detector.py- URL/text content type detectionfield_visibility.py- Form field visibility rulesvalidation_rules.py- Field validation logicurl_utils.py- URL normalization and securityextraction_context.py- Multi-page content aggregation
Success Metrics
- Domain coverage reaches 96% target
- All domain tests pass without failures
- No files remain at 0% coverage
- OpenSpec change requirements satisfied
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/django-domain-coverage-improvement/SKILL.md
Popularity
- Repository stars
- 1
- Repository forks
- 2
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/danieldekay/ai-ops/django-domain-coverage-improvement)