微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🛡️

8轮质检,发布零失误

Validator Agent · v1.1.0
办公 安全 S 级 作者 up2itnow 公开目录收录
下载 1.4k 安装 0 收藏 3.7k 浏览 12
原始页面

简介

8轮自动化验证流水线,在发布前自动完成编译、测试、安全审计、文档检查等关键把关,杜绝手动审查遗漏。

原始描述

Validates project pre-deployment by running comprehensive security, testing, quality, documentation, CI/CD, privacy, maintainability, usability, marketabilit...

中文使用说明 来自收录源

核心用法

Validator Agent 是一个专为 TypeScript/Solidity 项目设计的八轮自动化验证流水线。用户通过简单指令即可触发完整验证流程或指定特定轮次检查。系统会自动检测项目类型(通过 package.json 识别 TypeScript/Node 项目,通过 foundry.toml 识别 Solidity/Forge 项目),并适配相应的命令工具链。

完整验证:Run the Validator Agent on <project-path> 指定轮次:Run Validator Agent round 0 (compile gate) on <project-path>

显著优点

  1. 多维度把关机制:涵盖编译检查、代码规范、测试回归、安全漏洞、类型覆盖率、文档完整性、变更日志、最终汇总八大维度,形成立体防护网
  2. 智能阻断设计:Round 0 编译失败将阻断后续所有流程,避免问题代码进入后续环节;测试数量下降、高危安全漏洞等关键指标同样触发阻断
  3. 风险分级处理:采用 ✅ PASS / ⚠️ WARN / 🚨 BLOCK 三级体系,警告项记录但不阻断,关键问题强制拦截
  4. 项目类型自适应:自动识别 TypeScript 与 Solidity 项目,动态切换 tsc/forge build、npm test/forge test 等工具链
  5. 可追溯报告:生成标准化 Markdown 报告存档于 ops/reports/,包含完整时间戳与项目标识

潜在局限

  • 工具依赖:Round 4 类型覆盖率检查需要单独安装 type-coverage 包,未安装时自动跳过
  • Solidity 生态支持有限:Round 3 安全审计依赖 npm audit(TypeScript)或 slither(Solidity),后者需额外配置
  • 基线对比依赖人工维护:测试回归检测需要手动维护 ops/test-baselines.md 文件
  • 无自动修复能力:纯只读检测,不修改代码,发现问题后需人工介入修复

适合人群

  • 维护 TypeScript SDK 或 Solidity 合约的开发者
  • 需要在 npm publish 前强制质量把关的 CI/CD 流程
  • 依赖更新后需要快速验证回归场景的工程团队
  • 多成员协作项目中需要统一发布标准的技术负责人

常规风险

  • 阻塞风险:严格的阻断机制可能导致发布延迟,需预留验证修复时间
  • 假阴性可能:WARN 级别问题累积可能影响代码质量,团队需建立定期审查 WARN 项的机制
  • 环境差异:本地验证通过不代表 CI 环境通过,建议在多环境执行验证
  • 权限依赖:最终发布仍需 Max 或 Bill 人工审批,自动化流程存在人工瓶颈

典型应用场景

  1. npm publish 前的完整验证
  2. PR 合并前的质量门禁
  3. 依赖更新后的回归验证
  4. Solidity 合约部署前的安全检查

技能正文

Validator Agent

Multi-round automated validation pipeline for TypeScript/Solidity projects. Runs 8 rounds of checks before any publish or deploy: compile gate, lint, test suite, security audit, type coverage, docs, changelog, and final review.

The gold standard — catches what manual review misses. Originally built to validate the agent-wallet-sdk before every npm publish. Now available as a reusable skill for any project.

When to Use

  • Before npm publish — run the full 8-round validation
  • Before merging a PR — run as a quality gate
  • After a dependency update — verify nothing regressed
  • On any TypeScript or Solidity project in the workspace

Quick Start

Run the Validator Agent on skills/agent-nexus-2/agent-wallet-sdk

Or trigger specific rounds:

Run Validator Agent round 0 (compile gate) on projects/mastra-plugin

The 8 Rounds

Round 0 — Compile Gate (BLOCKING)

cd <project> && npx tsc --noEmit 2>&1

If this fails, ALL subsequent rounds are BLOCKED. Nothing proceeds until compile is clean. This was added after a Feb 20 incident where broken types were published to npm.

Round 1 — Lint

cd <project> && npm run lint 2>&1 | tail -20

Check for lint errors. Warnings are noted but don't block. Errors block.

Round 2 — Test Suite

cd <project> && npm test 2>&1

Capture: total tests, passing, failing, skipped. Compare against baseline in ops/test-baselines.md if it exists. Any test count drop = regression = BLOCK.

Round 3 — Security Audit

cd <project> && npm audit 2>&1 | tail -15
  • 0 vulnerabilities → ✅ PASS
  • Moderate only (transitive) → ⚠️ WARN (note but don't block)
  • HIGH or CRITICAL → 🚨 BLOCK

Round 4 — Type Coverage

cd <project> && npx type-coverage 2>&1 || echo "type-coverage not installed — skip"

If available, report percentage. Target: >95%. Below 90% = WARN.

Round 5 — Documentation Check

  • Does README.md exist and reference current version?
  • Does CHANGELOG.md have an entry for the version being published?
  • Are all exported functions documented?

Round 6 — Changelog Verification

  • Read package.json version field
  • Read CHANGELOG.md — does it have an entry matching that version?
  • If no changelog entry for current version → BLOCK publish

Round 7 — Final Review Summary

Aggregate all rounds into a single verdict:

# Validator Agent Report — [project] — [timestamp]

## Verdict: [✅ PASS / ⚠️ WARN / 🚨 BLOCK]

| Round | Check | Result |
|-------|-------|--------|
| 0 | Compile | ✅/❌ |
| 1 | Lint | ✅/⚠️/❌ |
| 2 | Tests | ✅ X/X passing / ❌ regression |
| 3 | Security | ✅/⚠️/🚨 |
| 4 | Type Coverage | ✅ X% / ⚠️ / skipped |
| 5 | Docs | ✅/⚠️ |
| 6 | Changelog | ✅/❌ |
| 7 | Summary | [verdict] |

## Blocking Issues
[list or "None"]

## Warnings
[list or "None"]

## Recommendation
[PUBLISH / FIX FIRST / DO NOT PUBLISH]

Save report to: ops/reports/validator-YYYY-MM-DD-HH-[project].md

Configuration

The skill auto-detects project type from:

  • package.json → TypeScript/Node project
  • foundry.toml → Solidity/Forge project

For Solidity projects, Round 0 uses forge build instead of tsc, Round 2 uses forge test, and Round 3 uses forge audit (if slither is available).

Authority

  • This skill is read-only — it checks and reports, never modifies code
  • It produces a recommendation, never auto-publishes
  • Max or Bill must approve the publish after reviewing the report

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

ci-cdtestingtypescriptsoliditysecurity-auditquality-gatevalidationnpm

同类 Skill