Agent skill

Testing Strategy Enforcement

by Hack23 in Hack23/cia

Test strategy governance, coverage enforcement (80% line, 70% branch), test pyramid adherence, and CI gate enforcement

Apache-2.0Auto-check passedTesting & QA

Install Testing Strategy Enforcement

skills CLI
$ npx skills add Hack23/cia --skill testing-strategy-enforcement -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hack23/cia testing-strategy-enforcement --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/testing-strategy-enforcement .claude/skills/testing-strategy-enforcement && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
testing-strategy-enforcement
GitHub stars
239
Token cost
~2.1k tokens
SKILL.md length
467 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

Test strategy governance, coverage enforcement (80% line, 70% branch), test pyramid adherence, and CI gate enforcement

  • Works in 3 steps: Code is auto-generated (JPA metamodel,… → Code is boilerplate (getters/setters on… → Infrastructure code with no business logic
  • Tasks that involve Test strategy
  • SKILL.md covers Purpose, When to Use This Skill, Coverage Requirements and Test Pyramid, plus 5 more sections
  • Calls mvn

What it does

Testing Strategy Enforcement is an agent skill from Hack23/cia. Test strategy governance, coverage enforcement (80% line, 70% branch), test pyramid adherence, and CI gate enforcement

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test strategy. The repository describes itself as: Citizen Intelligence Agency. Open-source intelligence platform analyzing Swedish political activities using AI and data visualization. Tracks politicians, government… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Test strategy

Example prompts

  • “/testing-strategy-enforcement”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Code is auto-generated (JPA metamodel, JAXB)
  2. Code is boilerplate (getters/setters on simple DTOs)
  3. Infrastructure code with no business logic

What it can do on your machine

Read from SKILL.md and the folder at commit 6a9797b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mvn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • junit.org
    • javadoc.io
    • jacoco.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Testing Strategy Enforcement loads about 2.1k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 467 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Hack23/cia at commit 6a9797b, republished under its Apache-2.0 licence (© Hack23). 467 words, ~2,119 tokens.

Download SKILL.mdSave it as .claude/skills/testing-strategy-enforcement/SKILL.md (or your agent's skills folder).
name
testing-strategy-enforcement
description
Test strategy governance, coverage enforcement (80% line, 70% branch), test pyramid adherence, and CI gate enforcement
license
Apache-2.0

Testing Strategy Enforcement Skill

Purpose

This skill enforces the CIA platform's testing strategy, ensuring consistent coverage thresholds, proper test pyramid adherence, and CI/CD gate enforcement. It provides actionable guidance for maintaining test quality across all modules.

When to Use This Skill

Apply this skill when:

  • ✅ Writing tests for new features
  • ✅ Reviewing PRs for test adequacy
  • ✅ Configuring CI/CD test gates
  • ✅ Investigating test failures or flaky tests
  • ✅ Measuring and improving test coverage
  • ✅ Deciding test scope for a change
  • ✅ Refactoring existing test suites

Do NOT use for:

  • ❌ Security-specific testing (use secure-code-review)
  • ❌ Performance testing design (use performance analysis)
  • ❌ UI/UX validation (use playwright-ui-testing)

Coverage Requirements

Mandatory Thresholds
MetricMinimumTargetBlocking?
Line Coverage80%85%+Yes — CI gate
Branch Coverage70%75%+Yes — CI gate
New Code Coverage80%90%+Yes — SonarCloud
Mutation ScoreN/A60%+Advisory
JaCoCo Configuration
xml
<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>check</id>
            <goals><goal>check</goal></goals>
            <configuration>
                <rules>
                    <rule>
                        <element>BUNDLE</element>
                        <limits>
                            <limit>
                                <counter>LINE</counter>
                                <value>COVEREDRATIO</value>
                                <minimum>0.80</minimum>
                            </limit>
                            <limit>
                                <counter>BRANCH</counter>
                                <value>COVEREDRATIO</value>
                                <minimum>0.70</minimum>
                            </limit>
                        </limits>
                    </rule>
                </rules>
            </configuration>
        </execution>
    </executions>
</plugin>

Test Pyramid

        ╱╲
       ╱  ╲        E2E Tests (Playwright/Selenium)
      ╱ 5% ╲       - Critical user workflows only
     ╱──────╲      - Login, navigation, key features
    ╱        ╲
   ╱  15-20%  ╲    Integration Tests (Spring Test + TestContainers)
  ╱            ╲   - Service layer, repository layer
 ╱──────────────╲  - External API integration
╱                ╲
╱    75-80%       ╲ Unit Tests (JUnit 5 + Mockito)
╱──────────────────╲- Business logic, utilities, models
Unit Tests (75-80% of total tests)

Framework: JUnit 5 + Mockito + AssertJ

What to Test:

  • Business logic in service classes
  • Data transformation and mapping
  • Validation logic
  • Utility methods
  • Exception handling paths
  • Edge cases and boundary conditions

Patterns:

java
@ExtendWith(MockitoExtension.class)
class PoliticianServiceTest {

    @Mock
    private PoliticianRepository repository;

    @InjectMocks
    private PoliticianServiceImpl service;

    @Test
    void shouldReturnPoliticianWhenFound() {
        // Given
        var politician = createTestPolitician();
        when(repository.findById("id-1")).thenReturn(Optional.of(politician));

        // When
        var result = service.findById("id-1");

        // Then
        assertThat(result).isPresent();
        assertThat(result.get().getName()).isEqualTo("Test Name");
        verify(repository).findById("id-1");
    }

    @Test
    void shouldThrowWhenPoliticianNotFound() {
        when(repository.findById(anyString())).thenReturn(Optional.empty());

        assertThatThrownBy(() -> service.getById("invalid"))
            .isInstanceOf(EntityNotFoundException.class);
    }
}
Integration Tests (15-20% of total tests)

Framework: Spring Test + TestContainers

What to Test:

  • Database repository operations
  • Spring Security filter chains
  • Service layer with real dependencies
  • External API client integration
  • Transaction boundaries

Patterns:

java
@SpringBootTest
@ActiveProfiles("test")
class PoliticianRepositoryIntegrationTest {

    @Autowired
    private PoliticianRepository repository;

    @Test
    void shouldPersistAndRetrievePolitician() {
        var politician = createTestPolitician();
        repository.save(politician);

        var found = repository.findById(politician.getId());
        assertThat(found).isPresent();
    }
}
E2E Tests (5% of total tests)

Framework: Playwright

What to Test:

  • Critical user workflows (login, navigation)
  • Key data visualization pages
  • Admin operations
  • Cross-browser compatibility

CI Gate Enforcement

Required CI Gates
GateToolThresholdStage
CompilationMavenZero errorsBuild
Unit TestsJUnit 5100% passTest
CoverageJaCoCo80% line, 70% branchTest
Code QualitySonarCloudQuality gate passAnalysis
Security ScanCodeQLZero critical/highSecurity
Dependency CheckOWASP DCCVSS < 7Security
Integration TestsSpring Test100% passIntegration
Show full SKILL.md (183 more words)Show less
Gate Failure Response
CI Gate Failed
    │
    ├─→ Test Failure?
    │   ├─→ Is it a flaky test? → Fix flaky test, don't skip
    │   ├─→ Is it a real regression? → Fix the code
    │   └─→ Is the test outdated? → Update the test
    │
    ├─→ Coverage Below Threshold?
    │   ├─→ New code not tested? → Add tests for new code
    │   ├─→ Existing coverage dropped? → Add missing tests
    │   └─→ Threshold too aggressive? → Document exception
    │
    ├─→ Quality Gate Failed?
    │   ├─→ Critical issue? → Fix immediately
    │   ├─→ False positive? → Document suppression
    │   └─→ Technical debt? → Create backlog item
    │
    └─→ Security Scan Failed?
        ├─→ Real vulnerability? → Fix before merge
        └─→ False positive? → Add suppression with justification

Test Quality Guidelines

Test Naming Convention
methodUnderTest_condition_expectedResult

Example: findById_whenPoliticianExists_returnsPolitician

Test Anti-Patterns to Avoid
Anti-PatternProblemSolution
No assertionsTest passes vacuouslyAdd meaningful assertions
Testing implementationBrittle, breaks on refactorTest behavior, not implementation
Ignoring exceptionsHides failuresUse assertThrows or assertThatThrownBy
Shared mutable stateTests affect each otherIsolate test state
Excessive mockingTests don't verify real behaviorMock boundaries only
Flaky testsErode CI trustFix root cause, never @Ignore
Test per lineSlow, redundantTest per behavior
Coverage Exceptions

Coverage exceptions are permitted only when:

  1. Code is auto-generated (JPA metamodel, JAXB)
  2. Code is boilerplate (getters/setters on simple DTOs)
  3. Infrastructure code with no business logic

Exception Process:

xml
<!-- JaCoCo exclusion in pom.xml -->
<configuration>
    <excludes>
        <exclude>**/model/*_.class</exclude>    <!-- JPA metamodel -->
        <exclude>**/generated/**</exclude>       <!-- Generated code -->
    </excludes>
</configuration>

Measuring Test Effectiveness

Reports and Dashboards
bash
# Generate coverage report
mvn clean test jacoco:report

# View report
open target/site/jacoco/index.html

# Generate aggregate report for multi-module
mvn clean verify -pl . -am
Coverage Trend Monitoring
  • SonarCloud tracks coverage trends over time
  • Coverage must not decrease on any PR
  • Target steady improvement toward 85%+ line coverage

ISMS Alignment

Testing AreaISO 27001 ControlNIST CSF
Unit TestingA.8.29PR.IP-12
Integration TestingA.8.29PR.IP-12
Security TestingA.8.33DE.CM-8
Test DocumentationA.8.25PR.IP-12
CI/CD GatesA.8.31PR.IP-12

References

© Hack23, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/testing-strategy-enforcement of Hack23/cia.

Open the folder on GitHubat commit 6a9797b

Compare with similar skills

Testing Strategy Enforcement next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Testing Strategy Enforcement compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Testing Strategy Enforcement this skillHack23/cia239—~2.1kAutomated safety check: PassApache-2.0
Testing OpenLogi UIAprilNEA/OpenLogi23k—~1.1kAutomated safety check: PassApache-2.0
Testing Hashqlhashintel/hash1.7k—~1.9kAutomated safety check: PassAGPL-3.0
Dynamo Unit TestingDynamoDS/Dynamo2k—~622Automated safety check: PassApache-2.0
Designing TestsCloudAI-X/opencode-workflow275—~2.9kAutomated safety check: PassMIT
Openprd Test StrategyDavidLam-oss/obsidian-wechat-converter332—~578Automated safety check: PassMIT

Similar skills

  • Testing OpenLogi UI

    AprilNEA/OpenLogi

    Verifies OpenLogi's native GPUI interface with focused tests, the component gallery and a mock agent, choosing the evidence that fits each change.

    23k GitHub stars~1.1k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Testing Hashql

    hashintel/hash

    HashQL testing strategies including compiletest (UI tests), unit tests, and snapshot tests.

    1.7k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Dynamo Unit Testing

    DynamoDS/Dynamo

    Write comprehensive NUnit tests for the Dynamo codebase following Dynamo testing patterns, conventions, and architectural constraints.

    2k GitHub stars~622 tokensUpdated today
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/opencode-workflow

    Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.

    275 GitHub stars~2.9k tokensUpdated 9 mo ago
    Testing & QAAuto-check passed
  • Openprd Test Strategy

    DavidLam-oss/obsidian-wechat-converter

    OpenPrd 测试策略分流 skill:按风险把任务分到单元、集成、端到端、人工、视觉、小程序、性能和安全验证,并要求 evidence-plan。

    332 GitHub stars~578 tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Go Testing

    Gentleman-Programming/gentle-ai

    Trigger: Go tests, go test coverage, Bubbletea teatest, golden files.

    7.6k GitHub stars~550 tokensUpdated today
    Testing & QAAuto-check passed

More from Hack23/cia

All 78 skills in this repo
  • WCAG 2.1 AA compliance, ARIA attributes, keyboard navigation, screen reader optimization for accessible political data platforms

    239 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Advanced chart types, D3.js/Vaadin Charts patterns, political data visualization, time series analysis

    239 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • AI Governance

    Hack23/cia

    AI governance, EU AI Act compliance, OWASP LLM security, responsible AI practices for GitHub Copilot agents

    239 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • API Integration

    Hack23/cia

    External API integration patterns, retry logic, circuit breakers, caching, rate limiting for government data APIs

    239 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • AWS CloudWatch metrics, alarms, dashboards, log insights, and application monitoring for the CIA platform

    239 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • AWS security best practices, VPC security, IAM, KMS, CloudTrail, GuardDuty for CIA platform deployment

    239 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Testing Strategy Enforcement

What does Testing Strategy Enforcement do?

Test strategy governance, coverage enforcement (80% line, 70% branch), test pyramid adherence, and CI gate enforcement. Testing Strategy Enforcement is an agent skill from Hack23/cia.

When should I use Testing Strategy Enforcement?

Testing Strategy Enforcement fits situations like: tasks that involve Test strategy.

How do I install Testing Strategy Enforcement in Claude Code?

Run `npx skills add Hack23/cia --skill testing-strategy-enforcement -a claude-code`. Or copy the skill folder (.github/skills/testing-strategy-enforcement in Hack23/cia) into .claude/skills/testing-strategy-enforcement in your project. Claude Code loads it when a task matches its description.

How do I install Testing Strategy Enforcement in Codex?

Run `npx skills add Hack23/cia --skill testing-strategy-enforcement -a codex`. Or copy the skill folder (.github/skills/testing-strategy-enforcement in Hack23/cia) into .agents/skills/testing-strategy-enforcement in your project. Codex loads it when a task matches its description.

Can I use Testing Strategy Enforcement in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hack23/cia --skill testing-strategy-enforcement -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-strategy-enforcement, .gemini/skills/testing-strategy-enforcement, .github/skills/testing-strategy-enforcement and .opencode/skills/testing-strategy-enforcement in your project.

What does Testing Strategy Enforcement need to run?

Going by SKILL.md and its folder, Testing Strategy Enforcement needs the command-line tools its instructions call (mvn).

Does Testing Strategy Enforcement access the network?

SKILL.md names 3 domains. As links in the text: junit.org, javadoc.io and jacoco.org. This is read from the text; nothing was executed.

Is Testing Strategy Enforcement safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Testing Strategy Enforcement use?

Testing Strategy Enforcement is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Testing Strategy Enforcement use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Testing Strategy Enforcement?

Skills that share tags, products or a category with Testing Strategy Enforcement: Testing OpenLogi UI (AprilNEA/OpenLogi, 23k stars), Testing Hashql (hashintel/hash, 1.7k stars), Dynamo Unit Testing (DynamoDS/Dynamo, 2k stars) and Designing Tests (CloudAI-X/opencode-workflow, 275 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Testing Strategy Enforcement?

Hack23 (a GitHub organization) maintains it in Hack23/cia, which has 239 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: Hack23/cia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.