Sync checker configuration with installed tools
Updates checker configuration by validating installed tools and suggesting config changes.
/plugin marketplace add rcrsr/checker/plugin install checker@rcrsrMaintain and update the existing .claude/checker.json configuration.
You are helping maintain an existing checker configuration. This command:
Read the existing configuration:
cat .claude/checker.json
If file not found, STOP and warn the user:
No checker configuration found at .claude/checker.json
The /checker:refresh command updates an existing configuration.
To create a new configuration, run /checker:create instead.
Do not proceed if no config exists. Direct user to /checker:create.
Use the checker:detect-environment agent to get current invocation patterns.
Compare against config - if package manager changed (e.g., switched from npm to pnpm), suggest updating all tool commands.
For each check in the config, verify the command exists using the detected exec pattern:
<exec> <tool> --version 2>/dev/null && echo "<tool> OK" || echo "<tool> MISSING"
Report:
npx when pnpm exec should be used)Using the detected invocation pattern, check for tools that aren't in the config:
JavaScript/TypeScript (using detected exec pattern):
<exec> prettier --version 2>/dev/null && echo "prettier available"
<exec> eslint --version 2>/dev/null && echo "eslint available"
<exec> biome --version 2>/dev/null && echo "biome available"
<exec> tsc-files --version 2>/dev/null && echo "tsc-files available"
Note: Avoid tsc - it checks the entire project on every file change. Use tsc-files (per-file) or eslint with @typescript-eslint instead.
Python (using detected exec pattern):
<exec> ruff --version 2>/dev/null && echo "ruff available"
<exec> ty --version 2>/dev/null && echo "ty available"
<exec> mypy --version 2>/dev/null && echo "mypy available"
Go:
command -v golangci-lint && golangci-lint --version
command -v staticcheck && staticcheck --version
Compare against config - identify tools present but not configured.
Find file types in the project:
# Code files
find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.go" -o -name "*.rs" \) | \
sed 's/.*\./\./' | sort | uniq -c | sort -rn
# Formatter-compatible files
find . -type f \( -name "*.json" -o -name "*.md" -o -name "*.yaml" -o -name "*.yml" -o -name "*.css" \) | \
sed 's/.*\./\./' | sort | uniq -c | sort -rn
Report file types that exist but have no checks configured. Include formatter-compatible files if prettier or biome is available.
Show the user a summary:
Status Report:
Suggested changes:
Related file types: If prettier or biome is configured, suggest extending to:
.json - package.json, tsconfig.json, config files.md - README, documentation.yaml,.yml - CI configs, docker-compose.css,.scss - stylesheets (if present in project)After user confirmation:
Critical: Only modify checks with _auto: true
The _auto field marks checks that were auto-discovered by /checker:create. Checks without this marker are user-added and must never be modified or removed.
_auto: true for tools that are no longer installed_auto: true (use /checker:configure-tool for unfamiliar tools)_auto: true_auto marker are always preserved exactly as-isWrite the updated config:
# Backup first
cp .claude/checker.json .claude/checker.json.bak
Then write the new configuration.
Always ask the user to review changes before finishing:
Show a structured diff that distinguishes auto vs user checks:
Config Changes Summary
PRESERVED (user checks, no _auto marker):
✓ .py: custom-linter (user-added, never modified)
✓ .go: project-specific-check (user-added, never modified)
AUTO CHECKS - PROPOSED CHANGES:
+ Add: prettier for .ts,.tsx (_auto: true)
+ Add: eslint for .ts,.tsx (_auto: true)
- Remove: old-linter for .py (tool not found, was _auto: true)
~ Update: ruff invocation npm→pnpm (_auto: true)
NO CHANGES:
= .py: ruff (auto, still valid)
Confirm to apply, or specify changes.
Ask:
After user confirms, test with a sample file:
# Find a file that matches configured extensions
find . -name "*.py" -o -name "*.ts" | head -1
Run one of the updated commands manually to verify it works.
Report success or any issues found.
_auto: true - user checks (no marker) are never touched_auto checks only_auto: true from any check to "claim" it and prevent future modifications