schema-validator
Skill2 starsChanged 2 months agoApache-2.0View on GitHub
Use when validating, authoring, or debugging an Open-MHS Capability Tag (.mhs / .ohs / .json) against schema/capability_schema.json. Triggers on "validate this capability tag", "is my .mhs file valid", "check device manifest", "why is my hardware rejected by the registry", or any task that creates or edits a device descriptor.
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- ethosagent/ethostheir own version, first seen Nov 3, 2026
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
- murphytrueman/design-system-opstheir own version, first seen Sep 23, 2026
- nexscope-ai/ecommerce-seo-geo-skillstheir own version, first seen Aug 26, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- murphytrueman/design-system-ops★ 197same name
- ethosagent/ethos★ 22same name
- nek1987/auto-agent-harness★ 4same name
- nexscope-ai/ecommerce-seo-geo-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- fastapi-scaffoldSkill
- pytest-hardware-mockSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
If the schema file is missing, stop and say so.
- Very specific: line 86
Never relax schema/capability_schema.json to accommodate one device.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Open-MHS Capability Tag Validator
Validate a hardware Capability Tag against the official Open-MHS JSON Schema and report actionable, line-anchored errors.
When to use
- A new driver author wrote a
.mhs/.ohsfile and needs it checked before registration. - The Discovery Layer rejected a device and the reason is unclear.
- You are about to edit
schema/capability_schema.jsonand must re-validate all fixtures. - CI needs a deterministic pass/fail gate over
examples/**/*.mhs.
Prerequisites
pip install jsonschemaThe canonical schema lives at schema/capability_schema.json. Never validate against a
copy — always resolve the repo-root path so drift is impossible.
Workflow
1. Locate the artifacts
ls schema/capability_schema.json
find . -name '*.mhs' -o -name '*.ohs' | grep -v node_modulesIf the schema file is missing, stop and say so. Do not invent a schema.
2. Run structural validation
python -m tools.validate_tag <path-to-tag> # preferred, if tools/ existsFallback one-liner when no CLI is present:
python - <<'PY'
import json, sys
from jsonschema import Draft202012Validator
schema = json.load(open("schema/capability_schema.json"))
doc = json.load(open(sys.argv[1] if len(sys.argv) > 1 else "device.mhs"))
errs = sorted(Draft202012Validator(schema).iter_errors(doc), key=lambda e: e.path)
for e in errs:
print(f"{'/'.join(map(str, e.absolute_path)) or '<root>'}: {e.message}")
print("VALID" if not errs else f"INVALID ({len(errs)} error(s))")
PY3. Run the semantic checks the schema cannot express
JSON Schema catches shape. It does not catch physics. Always additionally verify:
| Check | Rule |
| Safety coverage | Every entry inactuators[] has a matching safety_limits[] entry keyed by the same id. An unbounded actuator is a hard failure, not a warning. |
| Limit sanity | min < max for every limit. default (if present) falls inside [min, max]. |
| Unit agreement | Theunit on an actuator matches the unit on its safety limit. deg vs rad mismatches are the classic field failure. |
| ID uniqueness | id is unique across the union of sensors[] and actuators[], not just within each array. read("x") and write("x") must never be ambiguous. |
| Sensor immutability | Noid appears in both sensors[] and actuators[] unless the actuator declares a paired feedback_sensor. |
| Rate limits | Any actuator withmax_rate also declares unit and a time base. |
4. Report
Emit one line per problem, most severe first:
<file>:<json-pointer>: <ERROR|WARN>: <what is wrong>. <how to fix>.Close with a single verdict line: VALID or INVALID (n errors, m warnings).
Rules
- Never auto-fix a safety limit. Widening a bound to make validation pass can move real hardware into a destructive range. Report it and let a human decide.
- Never relax
schema/capability_schema.jsonto accommodate one device. If a legitimate device cannot be expressed, that is a schema RFC, not a local edit. - Unknown top-level keys are errors, not warnings —
additionalProperties: falseis deliberate so typos likeactuatorzcannot silently disable safety enforcement. - Validate the file as written on disk. Do not normalize, reformat, or reorder first.
Red flags
| Thought | Reality |
| "The limits are obviously wrong, I'll fix them" | You do not know the hardware. Report only. |
| "Just add the field to the schema" | Schema changes need an RFC + all fixtures re-validated. |
| "It parsed as JSON, so it's fine" | Parsing is not validation. Run the validator. |
| "One missing safety limit is a warning" | It is an ERROR. Unbounded write = unbounded hardware. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

