Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/prassanna-ravishankar/clearml-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/prassanna-ravishankar/clearml-mcp/test-coverage-improvement)<a href="https://agentmods.dev/rules/prassanna-ravishankar/clearml-mcp/test-coverage-improvement"><img src="https://agentmods.dev/badge/rules/prassanna-ravishankar/clearml-mcp/test-coverage-improvement/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/prassanna-ravishankar/clearml-mcp/test-coverage-improvement"><img src="https://agentmods.dev/badge/rules/prassanna-ravishankar/clearml-mcp/test-coverage-improvement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00666 |
| Opus 5 | $0.00000 | $0.00333 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
test-coverage-improvement scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Coverage Improvement: From 34% to 69%
Achievement Summary
Improved test coverage by +35 percentage points (34% → 69%) through comprehensive behavioral testing rewrite.
What We Learned
❌ White-Box Testing Problems (Original 34%)
- Brittle tests that broke during refactoring
- Implementation-dependent test structure
- Incomplete coverage of public API behaviors
- Hard to maintain when internal code changed
✅ Behavioral Testing Success (New 69%)
- Stable tests that survive refactoring
- Complete public API coverage - every function tested
- Realistic scenarios with proper edge case handling
- Easy to maintain - tests focus on contracts, not internals
Key Implementation Patterns
Comprehensive Mock Strategy
# Mock external dependencies completely
@patch('clearml.Task.get_task')
@patch('clearml.Task.query_tasks')
# Test all public API paths with realistic data
Edge Case Coverage
- Missing attributes: Handle optional fields gracefully
- Empty responses: Test when API returns no data
- Error conditions: Test exception handling paths
- Different data structures: Test various response formats
Proper Mock Attribute Handling
# Correct way to mock optional attributes
with patch('builtins.hasattr') as mock_hasattr:
mock_hasattr.side_effect = lambda obj, attr: not (obj is mock_obj and attr == "missing_field")
Coverage Configuration
Configuration in pyproject.toml:
[tool.coverage.run]
branch = true
source = ["src"]
omit = ["_*.py", "__*.py"]
[tool.coverage.report]
skip_empty = true
show_missing = true
fail_under = 65 # Raised from default after improvement
Testing Commands
# Coverage testing (matches CI exactly)
coverage run -m pytest tests && coverage report
# Local development
uv run pytest --verbose --color=yes tests
uv run coverage run -m pytest tests && uv run coverage report
Success Metrics
- ✅ Coverage: 69% (vs 34% before)
- ✅ Test count: 26 comprehensive behavioral tests
- ✅ API coverage: All public functions tested
- ✅ Edge cases: Missing data, errors, empty responses
- ✅ Stability: Tests survive refactoring
- ✅ CI integration: Passes in all environments
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 86 lines · 0 tokens per session scan A 1202ec5afbe4
test-coverage-improvement is a cursor rule published in the GitHub repository prassanna-ravishankar/clearml-mcp (16 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 666 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
python-code-validator
Validate generated Python at every step, not once at the end.
testing-conventions
Testing conventions and techniques for Strapi MCP plugin.
development-workflow
Cursor rule "development-workflow" from floriscornel/todo-mcp, covering development workflow for todo mcp, testing & quality assurance, commit structure, branch & pr workflow and publication & releases.
incremental-validation
Validate frequently and early; find errors when they're small.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.