Source profileQuality 91/100Review permissions

garrytan/gbrain/skills/testing/SKILL.md

testing

Skill validation framework PLUS daily test-suite health and regression intelligence. Validates skill conformance (frontmatter, manifest coverage, resolver coverage). Runs the project test suite in tiered phases (unit / evals / integration / system health), classifies failures, and produces a regression-aware report.

Source repository stars
29,095
Declared platforms
0
Static risk flags
1
Last source update
2026-08-26
Source checked
2026-08-26

Decision brief

What it does: where it fits

Convention: see conventions/quality.md for the test-before-bulk pattern; this skill enforces it across the project's own test suite.

Best for

    Not for

    • ❌ Skipping conformance validation after adding a new skill
    • ❌ Adding skills to manifest.json without adding to RESOLVER.md

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/garrytan/gbrain --skill "skills/testing"
    Safe inspection promptEditorial

    Inspect the Agent Skill "testing" from https://github.com/garrytan/gbrain/blob/872c3d6ae4073eb6e77c661d0a72f30b31c4c999/skills/testing/SKILL.md at commit 872c3d6ae4073eb6e77c661d0a72f30b31c4c999. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Two modes

      This skill has two related but distinct modes:

      Skill conformance validation — gbrain's own conformance barProject test-suite health (v0.25.1 extension) — runs theThis skill has two related but distinct modes:
    2. 02

      Mode 1: Skill conformance validation

      1. Walk skills directory. List all subdirs containing SKILL.md. 2. Validate frontmatter. Parse YAML, check required fields. 3. Validate sections. Check for the required headings. 4. Check manifest. Every skill dir must be in manifest.json. 5. Check resolver. Every manifest skill…

      Every skill directory has a SKILL.md fileEvery SKILL.md has valid YAML frontmatter (name, description)Every SKILL.md has required sections per
    3. 03

      Contract

      Every skill directory has a SKILL.md file

      Every skill directory has a SKILL.md fileEvery SKILL.md has valid YAML frontmatter (name, description)Every SKILL.md has required sections per
    4. 04

      Phases

      1. Walk skills directory. List all subdirs containing SKILL.md. 2. Validate frontmatter. Parse YAML, check required fields. 3. Validate sections. Check for the required headings. 4. Check manifest. Every skill dir must be in manifest.json. 5. Check resolver. Every manifest skill…

      Walk skills directory. List all subdirs containing SKILL.md.Validate frontmatter. Parse YAML, check required fields.Validate sections. Check for the required headings.
    5. 05

      Automation

      The CI-gated check is the package.json test script.

      The CI-gated check is the package.json test script.

    Permission review

    Static risk signals and limitations

    Runs scripts

    medium · line 54

    The documentation asks the agent to run terminal commands or scripts.

    bun test test/skills-conformance.test.ts test/resolver.test.ts test/openclaw-plugin-manifest.test.ts

    Runs scripts

    medium · line 101

    The documentation asks the agent to run terminal commands or scripts.

    bun test 2>&1

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars29,095SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    garrytan/gbrain
    Skill path
    skills/testing/SKILL.md
    Commit
    872c3d6ae4073eb6e77c661d0a72f30b31c4c999
    License
    MIT
    Collected
    2026-08-26
    Default branch
    master
    View the original SKILL.md

    Testing Skill — Validation + Daily Health & Regression Intelligence

    Convention: see conventions/quality.md for the test-before-bulk pattern; this skill enforces it across the project's own test suite.

    Two modes

    This skill has two related but distinct modes:

    1. Skill conformance validation — gbrain's own conformance bar (the original 1.0 scope). Validates every skill has SKILL.md with frontmatter, every reference exists, manifest + resolver coverage round-trips.

    2. Project test-suite health (v0.25.1 extension) — runs the project's tiered test suite and produces a regression-classified report. Used by daily cron, container-restart bootstrap, and "how are the tests" prompts.

    Pick the mode by trigger.

    Mode 1: Skill conformance validation

    Contract

    This mode guarantees:

    • Every skill directory has a SKILL.md file
    • Every SKILL.md has valid YAML frontmatter (name, description)
    • Every SKILL.md has required sections per test/skills-conformance.test.ts
    • skills/manifest.json lists every skill directory
    • skills/RESOLVER.md references every skill in the manifest
    • openclaw.plugin.json skills[] round-trips with both
    • openclaw.plugin.json keeps OpenClaw install-required native plugin fields (id, object configSchema, and contracts.contextEngines when applicable)
    • No MECE violations (duplicate triggers across skills)

    Phases

    1. Walk skills directory. List all subdirs containing SKILL.md.
    2. Validate frontmatter. Parse YAML, check required fields.
    3. Validate sections. Check for the required headings.
    4. Check manifest. Every skill dir must be in manifest.json.
    5. Check resolver. Every manifest skill must have a RESOLVER row.
    6. Check round-trip. RESOLVER trigger ↔ frontmatter triggers.
    7. Report results.

    Automation

    bun test test/skills-conformance.test.ts test/resolver.test.ts test/openclaw-plugin-manifest.test.ts
    

    The CI-gated check is the package.json test script.

    Output format

    Skill Validation Report
    ========================
    Skills found:        N
    Conformance:         N/N pass
    Manifest coverage:   N/N
    Resolver coverage:   N/N
    Round-trip:          N/N
    MECE violations:     N
    
    Issues:
    - <skill>: <issue>
    

    Mode 2: Project test-suite health (v0.25.1)

    When to use

    • Daily test cron fires
    • User asks "run the tests" / "how are the tests" / "what's broken"
    • After significant code changes (often via cross-modal-review)
    • After container restart (bootstrap)
    • When something seems off and you want to verify system health

    Test tiers

    TierWhat it runsWall timeGates
    Unitbun test (deterministic, zero external calls)<2sEvery commit
    EvalsLLM-judge or quality evals~60sDaily
    IntegrationE2E tests against real Postgres~5mPre-ship + nightly
    System healthDisk / memory / CPU / service liveness<10sDaily

    Daily run protocol

    When the cron fires (or the user asks), do ALL of this:

    1. Run unit tests

    bun test 2>&1
    

    Parse: total passed, total failed, total skipped, file-level results.

    2. Run evals (if the project has an evals config)

    # Adapt to the project's eval config
    bun test --filter eval 2>&1
    

    Parse: same format. Note any flakes (tests that fail due to API timeouts, not code bugs).

    3. Run system health checks

    • Disk / memory / CPU
    • gbrain: gbrain doctor --fast --json
    • Database connection (if applicable)
    • Critical files exist (CLAUDE.md, AGENTS.md, etc.)

    4. Git diff analysis (CRITICAL — regression intelligence)

    # What changed since last test run?
    git log --oneline --since="24 hours ago"
    

    For each failing test:

    1. Check if the test itself was modified recently (test change, not regression).
    2. Check if the code it tests was modified recently (possible regression).
    3. Check if it's a known flake (API timeout, service down).
    4. Check if a dependency was updated (gbrain, bun, etc.).

    5. Classify each failure

    ClassificationMarkerAction
    REGRESSION — code changed, test broke🔴Flag with the commit that broke it
    STALE — test expects old behavior; code is correct🟡Fix the test, not the code
    FLAKE — API timeout, service down, LLM variance⚠️Note, don't alarm; retry once
    NEW — test was just added and isn't passing yet🟢Check if intentional
    INFRA — container restart wiped state🛠Run bootstrap, retest

    6. Report format

    🧪 Daily Tests — YYYY-MM-DD
    
    Unit:   X/Y passed (Z skipped)
    Evals:  X/Y passed
    System: [health summary]
    
    REGRESSIONS:
      🔴 <test-name>: broke by commit <sha> "<commit message>"
    
    STALE TESTS:
      🟡 <test-name>: expects X but code now does Y (commit <sha>)
    
    FLAKES:
      ⚠️ <test-name>: timeout (retry passed)
    
    ✅ ALL CLEAR  (when applicable)
    

    7. Auto-fix protocol

    DO auto-fix:

    • Test expects an old file path after a rename → update the test
    • Test expects an old version string → update
    • Test expects a file that was intentionally deleted → remove the test
    • Import path broke because file moved → fix the import

    DO NOT auto-fix:

    • Test expects behavior A but code now does B → ASK first. Maybe the test is right and the code has a bug.
    • Security test failing → ALWAYS escalate, never auto-fix.
    • Test was skipped with a TODO → don't un-skip without understanding why.

    When uncertain: check the commit message that changed the code, check if there's a related PR or conversation, ask the user if still unclear.

    State (regression history)

    Track results in ~/.gbrain/test-state.json for trend tracking:

    {
      "lastRun": "2026-04-16T13:37:00Z",
      "unit": { "passed": 1262, "failed": 31, "skipped": 8 },
      "evals": { "passed": 17, "failed": 0 },
      "system": { "doctor": "ok", "gbrain": "0.25.1" },
      "failureHistory": [
        { "test": "<name>", "since": "2026-04-14", "classification": "stale" }
      ]
    }
    

    This enables:

    • Trend tracking (are we getting better or worse?)
    • Flake detection (same test fails intermittently)
    • Regression velocity (how fast do we break things after changes?)

    Anti-Patterns

    • ❌ Skipping conformance validation after adding a new skill
    • ❌ Adding skills to manifest.json without adding to RESOLVER.md
    • ❌ Treating every red test as a regression. Classify first; many are stale or flaky.
    • ❌ Auto-un-skipping a test without understanding why it was skipped
    • ❌ Auto-"fixing" a security test failure
    • ❌ Reporting "all clear" without actually running system health checks

    Contract

    This skill guarantees:

    • Routing matches the canonical triggers in the frontmatter.
    • Output written under the directories listed in writes_to: (when applicable).
    • Conventions referenced (quality.md, brain-first.md, _brain-filing-rules.md) are followed.
    • Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references.

    The full behavior contract is documented in the body sections above; this section exists for the conformance test.

    Output Format

    The skill's output shape is documented inline in the body sections above (see "Output", "Brain page format", or equivalent). The literal section header here exists for the conformance test (test/skills-conformance.test.ts).

    Frequently asked questions

    What to verify before installation and use

    What does the testing source document cover?

    Convention: see conventions/quality.md for the test-before-bulk pattern; this skill enforces it across the project's own test suite.

    How do I install testing?

    The source record exposes this install command: npx skills add https://github.com/garrytan/gbrain --skill "skills/testing". Inspect the command and pinned source before running it.

    Which permission-related actions were detected?

    Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.

    Alternatives

    Compare before choosing

    Computed 10024,975

    alirezarezvani/claude-skills

    app-store-optimization

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

    Computed 976,854

    trailofbits/skills

    constant-time-testing

    Constant-time testing detects timing side channels in cryptographic code. Use when auditing crypto implementations for timing vulnerabilities.

    Computed 975,248

    dotnet/skills

    test-tagging

    Analyzes test suites in any language and tags each test with standardized traits (positive, negative, critical-path, boundary, smoke, regression, integration, performance, security). Use when the user wants to categorize, audit, or label tests with traits. Works across .NET (MSTest/xUnit/NUnit/TUnit), Python (pytest), TS/JS (Jest/Vitest), Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++ — auto-editing when the framework has canonical tag syntax, otherwise report-only. Do not use for writ

    Computed 97224

    yonatangross/orchestkit

    verify

    Grade work that already exists and decide whether it can merge. Runs the project's current unit, integration, and E2E suites plus security scanning and type checking, scores every dimension 0-10, and returns a merge verdict with a VERIFIED-vs-CLAIMED evidence manifest. Writes no test files and edits no source. Use when verifying changes are ready to merge. Use /ork:cover instead when the tests still have to be written.