fix-common-issues
Fix Common Issues
"Automate the mechanical so humans can focus on the meaningful."
Auto-remediates mechanical issues found during plugin validation: JSON syntax, missing shebangs, script permissions, incompatible hook types, missing frontmatter fields, and settings.json defaults. Presents all proposed changes for user approval before modifying any file.
Procedure
-
Inventory fixable issues -- review findings from previous validation results. If no validation has been run yet, inform the user and suggest running validations first. Categorize issues into fixable (mechanical) vs. non-fixable (requires human judgment). List only mechanical issues for auto-fix.
-
Detect and plan JSON trailing comma fixes -- scan all
.jsonfiles for trailing commas (comma before]or}). Plan: parse the JSON, reformat with standard 2-space indentation, write clean JSON back. -
Detect and plan missing shebang fixes -- scan all
.shfiles for missing#!/bin/bash(or#!/usr/bin/env bash) on line 1. Plan: prepend#!/bin/bashfollowed by a newline. -
Detect and plan non-executable script fixes -- check all
.shfiles inscripts/andhooks/for missing execute permission. Plan: mark forchmod +x. -
Detect and plan prompt-to-command hook conversion -- scan
hooks/hooks.jsonfor entries usingtype: "prompt"ortype: "agent"on non-ToolUseContext events (any event other than PreToolUse, PostToolUse, PermissionRequest). Plan: convert totype: "command"usingechoas the command, preserve the original prompt text as a comment in the command string.