본문으로 건너뛰기
cccskills
무료GitHub에 공개

quality-test-implementation

Use when raising code quality or test coverage across a .NET, Java, or Python repository.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md9.3 KB
  • references/coverage-dotnet.md1.8 KB
  • references/coverage-java.md2.4 KB
  • references/coverage-python.md1.6 KB
  • references/run-coverage.sh1.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Multi-Language Code Quality & Test Coverage

Role

Senior SRE Engineer focused on quality, stability, and technical-debt reduction across multi-language codebases.

Goal

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.

When to Use

  • A repository (.NET, Java, or Python) has accumulated warnings, smells, or suppressed exceptions.
  • Test coverage is below the language target and needs a structured push.
  • Technical debt must be reduced before a release or handoff.
  • Security CVEs (NU1903, OWASP, Bandit, Safety, Snyk) must be cleared.

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.

  • User asks or mentions this skill in English (e.g., "use /quality-test-implementation", "run quality-test-implementation").
  • O usuário pede ou menciona esta skill em português (ex.: "use /quality-test-implementation", "execute quality-test-implementation").

Inputs

  • 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.

Phase 1 — Preparation and Environment

  1. Clone {REPO_NAME} if not already present.
  2. Create working branch feature/{YYYYMMDD}-{function-name}.
  3. Identify the build/test tooling:
    • .NET: *.sln, *.csproj, Directory.Build.props, global.json.
    • Java: pom.xml (Maven) or build.gradle* (Gradle).
    • Python: pyproject.toml, setup.py, requirements*.txt, tox.ini.
  4. Keep any Environment.SetEnvironmentVariable("Testing", "true") (or equivalent) inside the test execution context only.

Phase 2 — Static Analysis and Warning Correction

Run the appropriate static-analysis tools and fix the following categories.

.NET

CategoryCodesFix
LoggingCA2017, S2629, CA2254Use static templates and consistent placeholders
AsynchronismCS4014, CS1998Add await or remove unnecessary async
CleanupCS0105, CS0219Remove duplicate usings / unused variables
ExceptionsS3445, S2139Replace throw ex; with throw;; add context on rethrow
Web/APIASP0019Use .Append in headers
SecurityNU1903Resolve package vulnerabilities (high priority)
Documentation—Add /// <summary> to public classes and methods

Tools: dotnet build, dotnet test, dotnet format, SonarScanner, Roslyn analyzers.

Java

CategoryCodes / ToolsFix
LoggingSLF4J placeholders, CheckstyleParameterized logging; avoid string concatenation in logs
AsynchronismSpotBugs NP_NULL, Sonar S2190Proper CompletableFuture chaining; avoid fire-and-forget async
CleanupPMD, CheckstyleRemove unused imports and variables
ExceptionsSonar S1166, S2221Preserve stack trace; do not swallow exceptions
Web/APISonar S3751, S2658Use correct header APIs; avoid mutable static state
SecurityOWASP dependency-check, SnykUpdate vulnerable dependencies
DocumentationJavadocAdd Javadoc to public classes and methods

Tools: mvn compile, mvn test, mvn spotbugs:spotbugs, mvn checkstyle:checkstyle, mvn org.owasp:dependency-check-maven:check.

Python

CategoryCodes / ToolsFix
LoggingPylint W1203, Ruff G001Use %/f-string formatting with logging correctly
AsynchronismPylint W0707, Ruff ASYNCUse await properly; avoid asyncio fire-and-forget
CleanupF401, F841 (Ruff/Flake8)Remove unused imports and variables
ExceptionsPylint W0706, W0719Re-raise with raise or raise Custom() with from
Web/APIBandit B104Avoid hard-coded * in CORS; validate headers
SecurityBandit, Safety, SnykFix high/critical CVEs in requirements.txt / pyproject.toml
DocumentationPydocstyle, Ruff DAdd docstrings to public classes and methods

Tools: ruff check ., ruff format ., mypy, pylint, bandit -r ., pytest --cov=src --cov-report=xml.


Phase 3 — Architecture and Style

Refactor only when it reduces warnings or improves testability.

SOLID

  • Single Responsibility: split classes/modules that mix persistence, business logic, and presentation.
  • Dependency Inversion: depend on abstractions (interfaces/abstract classes/protocols) instead of concrete implementations.

DDD

  • Identify Aggregates, Entities, Value Objects, and Repositories.
  • Keep domain logic independent of frameworks and UI.

Clean Architecture

  • Validate separation between Domain, Application, Infrastructure, and Presentation.
  • Domain must not depend on external frameworks, databases, or UI libraries.

Phase 4 — Tests and Coverage

For framework-specific commands (xUnit/NUnit/MSTest, Maven/Gradle, pytest/unittest), thresholds, and HTML reports, see the references/ files:

  • references/coverage-dotnet.md
  • references/coverage-java.md
  • references/coverage-python.md

Use the auxiliary dispatcher to auto-detect the stack and run coverage:

bash references/run-coverage.sh

.NET

dotnet test --collect:"XPlat Code Coverage" --results-directory ./TestResults

Java

mvn test
# or
./gradlew test jacocoTestReport

Python

pytest --cov=src --cov-report=term-missing --cov-report=xml

Stabilization Rules

  • Fix existing failures before creating new tests.
  • Remove or skip problematic infrastructure tests (e.g. JWT, external APIs) only when they require deep refactoring, and document the reason.
  • New tests follow BDD style: Given / When / Then (or Dado / Quando / Então for pt-BR projects).

Coverage Goals

LanguageMinimum target
.NET90% line and branch
Java85% line and branch
Python90% line and branch

Generate reports with reportgenerator (.NET), JaCoCo (Java), or pytest-coverage (Python).


Phase 5 — Documentation and Delivery

README.md

Update with:

  • Repository structure (hierarchical tree with descriptions).
  • Test coverage table: Total Tests, % Lines, % Branches.
  • Technical stack list.
  • Business Vision and Technical Vision sections.

CHANGELOG.md

Finalization

Use Conventional Commits:

  • feat: — new features
  • fix: — bug fixes
  • test: — tests
  • docs: — documentation
  • refactor: — refactorings
  • chore: — maintenance tasks

Restriction: 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.


Quality Checklist

  • No high/critical security vulnerabilities remain.
  • Static-analysis warnings reduced to acceptable baseline.
  • All existing tests pass.
  • Coverage report generated and meets the language target.
  • README updated with coverage and architecture sections.
  • CHANGELOG updated with Unreleased changes.
  • Commit message follows Conventional Commits.

Common Mistakes

MistakeConsequenceHow to avoid
throw ex; instead of raise/throwStack trace lost, root cause hiddenRe-raise with original trace; add context, do not reset
String concatenation in logsAllocation/SQLi-style risk, no structured paramsUse parameterized logging placeholders
Auto-opening the PRUser loses control of merge timingGenerate the summary; let the user open the PR
New tests before fixing red suiteUnstable baseline, false confidenceStabilize existing failures first
Skip coverage reportNo evidence target was metAlways emit cobertura/jacoco/xml coverage

References

  • 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.

See Also

  • For reviewing a single change before merge, see code-review-and-quality.
  • For automated SonarQube issue remediation across stacks, see sonarqube-autofix.

Origin

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).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Single owner of everything under docs/architecture/ — ADRs, architecture and design documents, and architecture diagrams. Routes each deliverable to the right engine: /mermaid-architecture for Markdown-native diagrams, /drawio-architecture for editable .drawio diagrams, and the optional archify skill for interactive standalone HTML diagrams (used only when already installed in the environment; never installed at runtime). Use whenever architecture documentation, ADRs, or architecture diagrams must be created or updated.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

Use when building a new MCP server in TypeScript, Python, or C# that exposes tools to LLMs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

Use when reviewing code before it merges, whether written by an agent or a human.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

Use when the user asks to connect an AI agent to external apps via Composio, or when Composio CLI or MCP setup fails.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

Use when initializing or migrating an AI agent harness in a repository.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

Use when turning approved plans, specs, PRDs, or Epics into trackable GitHub Issues.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

afonsoft/skills122026년 10월 16일 업데이트

afonsoft의 스킬 모두 보기

이 스킬의 문제 신고