Install
openclaw skills install @afonsoft/quality-test-implementationUse when raising code quality or test coverage across a .NET, Java, or Python repository.
openclaw skills install @afonsoft/quality-test-implementationSenior SRE Engineer focused on quality, stability, and technical-debt reduction across multi-language codebases.
Perform a comprehensive intervention in the target repository to stabilize the build, reduce static-analysis warnings, raise test coverage to the language target, apply high-level architectural patterns, and produce a measured improvement report — without auto-opening a Pull Request.
.NET, Java, or Python) has accumulated warnings, smells, or suppressed exceptions.When NOT to use: one small file, a single change review, or a quick lint pass. For reviewing a single change, use code-review-and-quality.
REPO_NAME: full name (owner/repo).BASE_BRANCH: branch to start from (default main/develop).OUTPUT_BRANCH: feature/{YYYYMMDD}-{function-name}.PRIMARY_LANGUAGE: dotnet, java, or python.{REPO_NAME} if not already present.feature/{YYYYMMDD}-{function-name}.*.sln, *.csproj, Directory.Build.props, global.json.pom.xml (Maven) or build.gradle* (Gradle).pyproject.toml, setup.py, requirements*.txt, tox.ini.Environment.SetEnvironmentVariable("Testing", "true") (or equivalent) inside the test execution context only.Run the appropriate static-analysis tools and fix the following categories.
| Category | Codes | Fix |
|---|---|---|
| Logging | CA2017, S2629, CA2254 | Use static templates and consistent placeholders |
| Asynchronism | CS4014, CS1998 | Add await or remove unnecessary async |
| Cleanup | CS0105, CS0219 | Remove duplicate usings / unused variables |
| Exceptions | S3445, S2139 | Replace throw ex; with throw;; add context on rethrow |
| Web/API | ASP0019 | Use .Append in headers |
| Security | NU1903 | Resolve package vulnerabilities (high priority) |
| Documentation | — | Add /// <summary> to public classes and methods |
Tools: dotnet build, dotnet test, dotnet format, SonarScanner, Roslyn analyzers.
| Category | Codes / Tools | Fix |
|---|---|---|
| Logging | SLF4J placeholders, Checkstyle | Parameterized logging; avoid string concatenation in logs |
| Asynchronism | SpotBugs NP_NULL, Sonar S2190 | Proper CompletableFuture chaining; avoid fire-and-forget async |
| Cleanup | PMD, Checkstyle | Remove unused imports and variables |
| Exceptions | Sonar S1166, S2221 | Preserve stack trace; do not swallow exceptions |
| Web/API | Sonar S3751, S2658 | Use correct header APIs; avoid mutable static state |
| Security | OWASP dependency-check, Snyk | Update vulnerable dependencies |
| Documentation | Javadoc | Add Javadoc to public classes and methods |
Tools: mvn compile, mvn test, mvn spotbugs:spotbugs, mvn checkstyle:checkstyle, mvn org.owasp:dependency-check-maven:check.
| Category | Codes / Tools | Fix |
|---|---|---|
| Logging | Pylint W1203, Ruff G001 | Use %/f-string formatting with logging correctly |
| Asynchronism | Pylint W0707, Ruff ASYNC | Use await properly; avoid asyncio fire-and-forget |
| Cleanup | F401, F841 (Ruff/Flake8) | Remove unused imports and variables |
| Exceptions | Pylint W0706, W0719 | Re-raise with raise or raise Custom() with from |
| Web/API | Bandit B104 | Avoid hard-coded * in CORS; validate headers |
| Security | Bandit, Safety, Snyk | Fix high/critical CVEs in requirements.txt / pyproject.toml |
| Documentation | Pydocstyle, Ruff D | Add docstrings to public classes and methods |
Tools: ruff check ., ruff format ., mypy, pylint, bandit -r ., pytest --cov=src --cov-report=xml.
Refactor only when it reduces warnings or improves testability.
For framework-specific commands (xUnit/NUnit/MSTest, Maven/Gradle, pytest/unittest), thresholds, and HTML reports, see the references/ files:
references/coverage-dotnet.mdreferences/coverage-java.mdreferences/coverage-python.mdUse the auxiliary dispatcher to auto-detect the stack and run coverage:
bash references/run-coverage.sh
dotnet test --collect:"XPlat Code Coverage" --results-directory ./TestResults
mvn test
# or
./gradlew test jacocoTestReport
pytest --cov=src --cov-report=term-missing --cov-report=xml
| Language | Minimum target |
|---|---|
| .NET | 90% line and branch |
| Java | 85% line and branch |
| Python | 90% line and branch |
Generate reports with reportgenerator (.NET), JaCoCo (Java), or pytest-coverage (Python).
Update with:
Use Conventional Commits:
feat: — new featuresfix: — bug fixestest: — testsdocs: — documentationrefactor: — refactoringschore: — maintenance tasksRestriction: Do not open the Pull Request automatically. Prepare the commit, update the README/CHANGELOG, and generate a Detailed Technical Summary containing all changes so the user can open the PR manually.
Unreleased changes.| Mistake | Consequence | How to avoid |
|---|---|---|
throw ex; instead of raise/throw | Stack trace lost, root cause hidden | Re-raise with original trace; add context, do not reset |
| String concatenation in logs | Allocation/SQLi-style risk, no structured params | Use parameterized logging placeholders |
| Auto-opening the PR | User loses control of merge timing | Generate the summary; let the user open the PR |
| New tests before fixing red suite | Unstable baseline, false confidence | Stabilize existing failures first |
| Skip coverage report | No evidence target was met | Always emit cobertura/jacoco/xml coverage |
references/coverage-dotnet.md — .NET coverage (xUnit/NUnit/MSTest, Coverlet, reportgenerator, thresholds).references/coverage-java.md — Java coverage (Maven JaCoCo, Gradle JaCoCo, thresholds).references/coverage-python.md — Python coverage (pytest-cov, unittest + coverage.py, mypy, thresholds).references/run-coverage.sh — Stack-detecting dispatcher that runs the right coverage command.code-review-and-quality.sonarqube-autofix.Adapted from the devin/playbooks/multi-language-quality/PLAYBOOK.md playbook into an agentskills.io-format skill, following the catalog standards (license: MIT, metadata.version, tripartite description with explicit Do NOT use for clause).