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

testing

Validates skill files and registration consistency, then checks project tests and system health. Compares failures with recent changes to distinguish regressions, outdated tests, intermittent failures, and infrastructure issues, producing a report that tracks results over time.

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

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Validating definitions and registration for new skills
  • Running daily tests and system health checks
  • Classifying failures after code changes
  • Tracking test trends and intermittent failures

포함된 파일(1)

  • SKILL.md8.5 KB

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

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • A test fails because of a missing API key or a flaky provider: classify it as an environment failure, not a code failure, and say which key.
  • A security test fails: always escalate to the user; never auto-fix it.
  • gbrain doctor cannot reach the brain (GBRAIN_DB_ACCESS): route to the db-repair skill before running integration tests.

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

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Check research claims cited in books, articles, or conversations by tracing the original paper, methods, underlying data, and independent replication. Save a sourced assessment explaining whether the claim holds up and what remains uncertain.

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

  • Check a study cited in a book
  • Trace a numerical claim in an article to its source data
  • Verify research evidence before using it in writing
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Explore old files and email archives to rediscover personal writing, ideas, and meaningful conversations. Review selected items one at a time, save worthwhile material as organized notes, and track progress within explicitly permitted folders.

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

  • Rediscover old journals and creative writing
  • Find meaningful letters and email conversations
  • Recover past product and business ideas
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Restructure raw article text stored in gbrain into summaries, exact quotes, key insights, and links to related pages. Preserve the original text and connect the article's significance to projects and interests already recorded in gbrain.

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

  • Organizing saved articles into readable notes
  • Collecting exact quotes for essays
  • Connecting articles to current projects
garrytan/gbrain3.1만2026년 10월 19일 업데이트

ask-user

무료

Present clear choices when a task needs a human decision, then pause execution until the user replies. This reusable interaction pattern supports filing decisions, priority selection, and confirmation before destructive actions, with an option to decline.

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

  • Clarifying requests with several possible meanings
  • Confirming before bulk deletion or overwriting
  • Choosing where to file meeting notes
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Collect public posts across a blog, newsletter, or feed archive and save clean Markdown pages for each article. The workflow avoids duplicates, supports resumed runs, repairs empty results, and hands articles to a separate enrichment skill.

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

  • Importing a blog's public article archive
  • Organizing public newsletter posts as knowledge pages
  • Rerunning a feed import without duplicates
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Create a detailed chapter-by-chapter reading companion from an EPUB or PDF, connecting the book’s ideas to experiences and words saved in your personal knowledge store. The result highlights parallels without prescribing actions.

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

  • Connect a book’s ideas to personal experiences
  • Review detailed chapter summaries alongside personal reflections
  • Create a parent’s guide for reading a children’s book aloud
garrytan/gbrain3.1만2026년 10월 19일 업데이트

garrytan의 스킬 모두 보기

이 스킬의 문제 신고