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.
npx agentmods add commands/matteocervelli/llms/pr-analyze-failuregit clone --depth 1 https://github.com/matteocervelli/llmsWrote 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/commands/matteocervelli/llms/pr-analyze-failure)<a href="https://agentmods.dev/commands/matteocervelli/llms/pr-analyze-failure"><img src="https://agentmods.dev/badge/commands/matteocervelli/llms/pr-analyze-failure.svg" alt="Measured on agentmods" 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 | $0.00010 | $0.01005 |
| Opus 5 | $0.00005 | $0.00502 |
| Sonnet 5 | $0.00002 | $0.00201 |
| Haiku 4.5 | $0.00001 | $0.00101 |
Grade C, and why
pr-analyze-failure scanned grade C with 1 finding 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
!rm -rf node_modules package-lock.json || rm -rf __pycache__ .pytest_cache How it starts
The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fix PR Failures: $ARGUMENTS
Analysis Phase
# Get PR details and CI status
!gh pr view $ARGUMENTS --json title,body,state,statusCheckRollup
!gh pr checks $ARGUMENTS --watch
Analyze CI/CD failures:
- Build failures: Compilation errors, dependency issues
- Test failures: Unit, integration, security test failures
- Linting/Format: Code quality violations
- Security scans: Vulnerability alerts, dependency issues
- Performance: Load testing, coverage threshold failures
Quick Fix Strategy
# Checkout the PR branch
!gh pr checkout $ARGUMENTS
Common Fix Patterns
Build/Dependency Issues:
# Clean install and rebuild
!rm -rf node_modules package-lock.json || rm -rf __pycache__ .pytest_cache
!npm ci || pip install -r requirements.txt
!npm run build || python -m build
Test Failures:
# Run specific failing tests locally
!npm run test -- --verbose || pytest -v --tb=short
!npm run test:integration || pytest tests/integration/
Code Quality Issues:
# Auto-fix linting and formatting
!npm run lint -- --fix || black . && isort . && flake8 .
!npm run format || prettier --write .
!npm run typecheck || mypy .
Security Issues:
# Fix dependency vulnerabilities
!npm audit fix || safety check && pip-audit --fix
!npx audit-ci --moderate || bandit -r src/
Implementation Phase
Based on CI failure type, implement targeted fixes:
1. Test Failures
- Unit Tests: Fix broken logic, update mocks, handle edge cases
- Integration Tests: Update API contracts, fix database setup
- Security Tests: Address input validation, auth issues
2. Performance Issues
- Coverage: Add missing test cases to reach threshold
- Performance: Optimize slow queries, reduce response times
- Memory: Fix memory leaks, optimize resource usage
3. Quality Issues
- TypeScript: Fix type errors, add missing types
- Linting: Address code style violations
- Documentation: Update JSDoc, README, API docs
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.
- 4d ago First seen · 179 lines · 10 tokens per session scan C 9dfb697b7804
pr-analyze-failure is a command published in the GitHub repository matteocervelli/llms (25 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other commands, from other repositories
write-tests
Generate comprehensive test coverage for existing code.
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
kill-mutants
Analyze surviving mutants from a mutation testing run and write targeted unit tests to kill them. Re-runs mutations to confirm kills.
test
Generate comprehensive tests.
pr-enhance
Command "pr-enhance" from ruvnet/ruflo, covering pr-enhance, usage, options, examples and enhance pr.
unit-test
Write / run the unit tests for the feature. (AIDLC Unit Test phase) Usage: /unit-test.