Validate Spectr specifications and change proposals without requiring the spectr binary USE WHEN you're in a sandboxed or restricted execution context and spectr is not available in your path. DO NOT USE WHEN you need a lightweight alternative for task acceptance, but have the spectr binary available. DO NOT USE when you have the spectr binary available.
This skill provides the ability to validate Spectr specifications and change proposals without requiring the spectr binary. This is particularly useful in sandboxed environments, CI pipelines, or fresh repository checkouts where the spectr binary may not be available.
The skill provides a scripts/validate.sh script that implements the core validation rules matching the behavior of spectr validate.
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh [--spec <id> | --change <id> | --all] [--json]
# Validate the "validation" spec
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --spec validation
This validates spectr/specs/validation/spec.md for:
## Requirements section#### Scenario: block# Validate the "add-new-feature" change
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --change add-new-feature
This validates spectr/changes/add-new-feature/:
specs/*/spec.md)tasks.md) contains valid task items (if present)# Validate entire repository
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --all
This discovers and validates:
spectr/specs/spectr/changes/ (excluding archive)bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --spec validation
Example output:
changes/add-new-feature/specs/validation/spec.md
[ERROR] line 42: Requirement missing scenario block
[ERROR] line 58: Malformed scenario header (3 hashtags)
Summary: 0 passed, 1 failed (2 errors), 1 total
Colors are automatically enabled when output is to a TTY (terminal) and disabled when piped or redirected.
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --all --json
Example output:
{
"version": 1,
"items": [
{
"name": "validation",
"type": "spec",
"valid": false,
"issues": [
{
"level": "ERROR",
"path": "specs/validation/spec.md",
"line": 42,
"message": "Requirement missing scenario block"
}
]
}
],
"summary": {
"total": 1,
"passed": 0,
"failed": 1,
"errors": 1,
"warnings": 0
}
}
Note: JSON output requires jq to be installed. If jq is not available, the script will warn and fall back to human-readable output.
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --help
# or
bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh -h
Displays usage information, flags, and examples.
# Validate specs in a different location
SPECTR_DIR=custom/path/to/spectr bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --all
The SPECTR_DIR environment variable allows you to specify an alternative location for the spectr directory (default: spectr).
The script implements the following validation rules, matching spectr validate behavior:
Requirements Section
## Requirements sectionRequirement Headers
### Requirement: <name> formatScenario Blocks
#### Scenario: block (strict mode)Malformed Scenarios
**Scenario:**) instead of header- **Scenario:**)Delta Sections
ADDED Requirements
MODIFIED Requirements
REMOVED Requirements
RENAMED Requirements
tasks.md exists but contains zero task items- [ ] Task description or - [x] Task description- [ ] 1.1 Task description- [X] Task descriptionThe script uses standard exit codes for CI integration:
# Run validation in CI pipeline
if bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --all; then
echo "Validation passed!"
else
echo "Validation failed!"
exit 1
fi
You can verify bash version:
bash --version
--json output formatYou can verify jq is available:
which jq
If jq is not available and --json is requested, the script will emit a warning and fall back to human-readable output.
This skill provides validation capabilities equivalent to spectr validate but has some limitations:
spectr binary may be fasterspectr validate --pre-merge for advanced pre-commit validationspectr binary if you need this validationinternal/markdown/ matchersUse this skill when:
For production workflows with advanced requirements (pre-merge validation, parallel processing, cross-capability checks), consider installing the full spectr binary.
The script uses associative arrays which require bash 4.0+. Update your bash version or use the full spectr binary.
This warning appears when --json is used but jq is not installed. Install jq:
# macOS
brew install jq
# Ubuntu/Debian
apt-get install jq
# Alpine
apk add jq
Ensure you're running the script from the repository root or set SPECTR_DIR:
SPECTR_DIR=/path/to/spectr bash .claude/skills/spectr-validate-wo-spectr-bin/scripts/validate.sh --all
The specified spec ID does not exist under spectr/specs/. Check available specs:
ls spectr/specs/
The specified change ID does not exist under spectr/changes/. Check available changes:
ls spectr/changes/
If you notice differences between script validation and spectr validate output:
The script aims to match binary behavior exactly, but edge cases may exist.
Performance is primarily determined by:
The Go binary (spectr validate) uses parallel workers and is significantly faster for large repositories. Use the binary when:
Use the skill when:
npx skills add connerohnesorge/在没有 spectr 二进制的情况下验证 Spectr下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer