Prompt file imported from DatMoshu/Claude-Code-reWASD-Powertools (
.claude/commands/rewasd-validate.md). Fill in{{arguments}}before use. Copyright stays with the author.
Validate reWASD Profile: {{arguments}}
Step 1: Resolve Paths
Read rewasd.config.json at the repo root to get rewasdProfilesPath.
Step 2: Find Profiles to Validate
If argument given, search for matching profiles in:
- Repo library:
profiles/**/*.rewasd - Installed:
{rewasdProfilesPath}/**/*.rewasd
If no argument given, validate ALL profiles in both locations.
Step 3: Validate Each Profile
For each profile, check:
Structural Checks
- Valid JSON syntax (parse without errors)
schemaVersionis3or3.0appVersionis present and non-emptyconfig.appNameis present
Mask Integrity
- Mask IDs are sequential starting from 1 with no gaps
- No duplicate mask IDs
- Every mask has at least one button in
set[] - Every mask button has
deviceId,buttonId, anddescription
Mapping Integrity
- Every mapping with a
maskcondition references a mask ID that exists inmasks[] - Every mapping with a
shiftIdreferences a shift that exists inshifts[] - All keyboard outputs have a valid
buttonId(check against DIK code table indocs/dik-keycodes.md) - All keyboard outputs have a
descriptionfield matching the DIK name
Device Integrity
- Device IDs referenced in masks match devices in
devices.hardware[] - Virtual gamepad type is one of:
"360","ds4","ds3","xboxonebt"
Radial Menu Integrity (if present)
- Radial menu sector/circle cross-references are valid
Sync Check
- If found in repo library, check whether an installed copy exists at
{rewasdProfilesPath}— warn if out of sync
Step 4: Report
For each issue found, report:
- Severity: ERROR (will break in reWASD) or WARNING (may cause unexpected behavior)
- Location: which array/index/field
- Description: what's wrong and how to fix it
If no issues: "Profile is valid."
Present results as a checklist with pass/fail markers. At the end: total profiles checked, total errors, total warnings.
