AgentSkillsCN

validate

运行验证检查——根据更改文件决定使用快速验证(validate)还是完整验证(validate:full)

SKILL.md
--- frontmatter
name: validate
description: Run validation checks - determines whether to use fast (validate) or full (validate:full) based on changed files

Validate Skill

Run the appropriate validation for your changes.

Commands

CommandWhat it doesWhen to use
bun run checklint + format + typecheckQuick syntax check
bun run validatecheck + build TS/worker + unit testsDefault for most changes
bun run validate:corevalidate + integration testsCore behavior changes

Decision Logic

  1. Check what files changed using git status or git diff --name-only

  2. Use bun run validate:core if changes touch:

    • src/agent/ (core agent behavior)
    • src/workspace/ (workspace lifecycle)
    • src/terminal/ (terminal/WebSocket)
  3. Use bun run validate for everything else

  4. Run specific tests relevant to your changes instead of full suites:

    bash
    bun test test/unit/relevant.test.ts
    bun test test/integration/relevant.test.ts
    bun test web/e2e/relevant.spec.ts
    

Steps

  1. Check changed files:

    bash
    git diff --name-only HEAD
    
  2. Run validation + relevant tests:

    bash
    bun run validate
    # Then run specific tests for your changes
    bun test test/unit/relevant.test.ts
    
  3. If validation fails, fix issues and re-run

  4. Run warden to get code review feedback locally (security, react best practices, code simplification):

    bash
    warden -v
    

    The -v flag streams findings in real-time. Fix any issues warden finds before creating a PR.

Notes

  • validate is fast (~30s), validate:core adds integration tests (~1-2min)
  • CI runs full validation on PRs, so targeted tests are usually sufficient locally