Release Guard
Overview
Release Guard is a quality assurance skill that validates skills before they are published or shared. It runs a comprehensive checklist of validations to catch common issues and ensure skills meet minimum standards.
The release-guard skill ensures that skill releases meet quality and safety standards. It runs pre-release validation checks including security scans, dependency audits, documentation completeness, and compatibility verification.
When to Use
- - Before publishing any skill to ClawHub
- When preparing a new version release
- During CI/CD release pipelines
- When the user asks to "检查" or "验证" a release
- Before creating GitHub releases
Prerequisites
- - Node.js 18+ for script execution
- Optional:
security-auditor for detailed security scans
Usage
CLI Commands
CODEBLOCK0
Check Levels
| Level | Description | Failure Action |
|---|
| INLINECODE2 | Required for release | Blocks release |
| INLINECODE3 |
Best practice | Warning |
|
optional | Enhancement | Suggestion |
Validation Rules
Version Format
- - Must follow semver (e.g.,
1.0.0, 1.2.3-beta.1) - Version must increment from previous release
Documentation Requirements
- - README.md must exist
- SKILL.md must exist
- No Chinese characters in documentation
- All headings properly capitalized
Security Checks
- - No hardcoded secrets
- No vulnerable dependencies
- Safe file permissions (644 for files, 755 for executables)
Output
The tool produces a JSON report:
CODEBLOCK1
Exit Codes
- -
0 - All checks passed - INLINECODE8 - One or more checks failed
- INLINECODE9 - Invalid arguments or skill not found
Limitations
- - Does not execute skill code (use testing framework for that)
- Cannot verify runtime behavior
- Does not check external API availability
Related Skills
发布守卫
概述
发布守卫是一项质量保证技能,用于在技能发布或共享前进行验证。它运行全面的检查清单,以发现常见问题并确保技能符合最低标准。
release-guard技能确保技能发布符合质量和安全标准。它执行发布前验证检查,包括安全扫描、依赖审计、文档完整性和兼容性验证。
使用时机
- - 在向ClawHub发布任何技能之前
- 准备新版本发布时
- 在CI/CD发布流水线中
- 当用户要求检查或验证发布时
- 在创建GitHub发布之前
前置条件
- - Node.js 18+(用于脚本执行)
- 可选:security-auditor(用于详细安全扫描)
使用方法
CLI命令
bash
运行所有发布检查
./scripts/release-check.sh <技能目录>
使用自动修复模式运行
./scripts/release-check.sh <技能目录> --fix
快速验证(当前目录)
./scripts/release-check.sh .
检查级别
| 级别 | 描述 | 失败处理 |
|---|
| critical | 发布必需 | 阻止发布 |
| standard |
最佳实践 | 警告 |
| optional | 增强建议 | 建议 |
验证规则
版本格式
- - 必须遵循语义化版本(例如:1.0.0、1.2.3-beta.1)
- 版本必须高于上一个发布版本
文档要求
- - README.md必须存在
- SKILL.md必须存在
- 文档中不能包含中文字符
- 所有标题必须正确大写
安全检查
- - 无硬编码密钥
- 无易受攻击的依赖
- 安全的文件权限(文件644,可执行文件755)
输出
该工具生成JSON格式报告:
json
{
skill: 示例技能,
version: 1.2.0,
timestamp: 2024-03-12T09:00:00Z,
checks: {
security: { status: pass, issues: 0 },
docs: { status: pass, issues: 0 },
version: { status: pass, issues: 0 },
deps: { status: pass, issues: 0 }
},
overall: pass,
warnings: [],
errors: []
}
退出代码
- - 0 - 所有检查通过
- 1 - 一个或多个检查失败
- 2 - 参数无效或未找到技能
局限性
- - 不执行技能代码(请使用测试框架)
- 无法验证运行时行为
- 不检查外部API可用性
相关技能