/self-care:validatefrom self-care
Validates an OTEL or Claude Code trace file, extracts metadata, and optionally performs AI-assisted flexible validation on recoverable errors.
Ships in self-care. Installing the plugin adds it to Claude Code.
Validate the provided trace file and report its metadata. Supports both OTEL (JSON) and Claude Code (JSONL) formats.
Run the deterministic trace validator:
node "${CLAUDE_PLUGIN_ROOT}/agents/tools/validate-trace.mjs" $ARGUMENTS
Parse the JSON output. The result contains:
valid: boolean — whether the trace passed validationformat: "otel" | "claude-code" | "unknown"errors: array of critical failure messageswarnings: array of non-critical issuesmetadata: object with format-specific fieldsIf valid is true, display the validation results:
For OTEL:
Trace Validation: PASSED
Format: OTEL
Trace ID: <metadata.traceId>
Service Name: <metadata.serviceName>
Span Count: <metadata.spanCount>
System Prompt: <metadata.systemPromptDetected ? "FOUND (via " + metadata.systemPromptMethod + ")" : "NOT FOUND">
For Claude Code:
Trace Validation: PASSED
Format: Claude Code
Session ID: <metadata.sessionId>
Event Types: <metadata.eventTypes joined with ", ">
System Prompt: <metadata.systemPromptDetected ? "FOUND (via " + metadata.systemPromptMethod + ")" : "NOT FOUND">
If valid is false, check whether the errors are recoverable (eligible for flexible validation):
Recoverable errors (any of these present → offer fallback):
Unrecoverable errors (if ANY of these are present → do NOT offer fallback):
If any unrecoverable error is present, display the errors and stop:
Trace Validation: FAILED
Errors:
- <each error on its own line>
If at least one error is recoverable, offer flexible validation via AskUserQuestion:
Deterministic validation failed:
─────────────────────────────────────────────────────────
<each error on its own line, prefixed with •>
─────────────────────────────────────────────────────────
Would you like to try flexible (AI-assisted) validation?
This uses an LLM to assess whether the trace is still
structurally usable despite not passing strict format checks.
{ "label": "Try flexible validation", "description": "Use AI to assess trace structure" }{ "label": "Stop", "description": "Accept the validation failure" }If the user selects "Stop", display the errors and stop:
Trace Validation: FAILED
Errors:
- <each error on its own line>
If the user selects "Try flexible validation", invoke the flexible-validator agent via Task with:
$ARGUMENTSParse the agent's JSON output.
If the flexible validator returns valid: true:
For OTEL:
Trace Validation: PASSED (flexible)
Format: OTEL
Trace ID: <metadata.traceId>
Service Name: <metadata.serviceName>
Span Count: <metadata.spanCount>
System Prompt: <metadata.systemPromptDetected ? "FOUND (via " + metadata.systemPromptMethod + ")" : "NOT FOUND">
Note: <flexibleNotes>
For Claude Code:
Trace Validation: PASSED (flexible)
Format: Claude Code
Session ID: <metadata.sessionId>
Event Types: <metadata.eventTypes joined with ", ">
System Prompt: <metadata.systemPromptDetected ? "FOUND (via " + metadata.systemPromptMethod + ")" : "NOT FOUND">
Note: <flexibleNotes>
If the flexible validator returns valid: false:
Trace Validation: FAILED (deterministic + flexible)
Errors:
- <each error from the flexible validator on its own line>
Note: <flexibleNotes>
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub not-diamond/self-care --plugin self-care12 commands in this plugin
/analyzeAnalyze TraceValidate and analyze a trace file for cases/autosync-disableSelf-Care Autosync DisableDisable scheduled autosync for the current project/autosync-enableSelf-Care Autosync EnableEnable scheduled autosync for the configured trace source/autosync-statusSelf-Care Autosync StatusShow the current autosync state for this project/autosync-tickSelf-Care Autosync TickRun one non-interactive autosync cycle/configSelf-Care ConfigView or change Self-Care configuration settingsOther plugins' commands for the same job