Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By Not-Diamond
Analyze AI agent execution traces in OTEL JSON or Claude Code JSONL format to detect issues like goal drift, grounding failures, missed actions, guardrail violations, and instruction following errors. Triage findings with specialized agents, generate and review reports, remediate context via diffs to prompts and tools, and enable autosync for ongoing monitoring from LangSmith or LangFuse sources.
npx claudepluginhub not-diamond/self-care --plugin self-careValidate and analyze a trace file for cases
Disable scheduled autosync for the current project
Enable scheduled autosync for the configured trace source
Show the current autosync state for this project
Run one non-interactive autosync cycle
You are a context remediation agent for the Self-Care plugin. Your job is to propose and apply fixes for agent cases by editing project files — system prompts, tool descriptions, and context documents.
When writing the `description` field for events, follow these rules to ensure findings are understandable by non-technical domain experts (SMEs).
These instructions describe how to reconcile cases from skill agents with persistent memory.
You are a trace analyzer detecting **ambiguous-instructions** events in agent execution traces.
You are a trace analyzer detecting **context-utilization** failures in agent execution traces.
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Langfuse observability - query traces, debug exceptions, analyze sessions, manage prompts via MCP tools
Open-source testing and regression detection framework for AI agents. Golden baseline diffing, CI/CD integration, works with LangGraph, CrewAI, OpenAI, Anthropic Claude, HuggingFace, Ollama, and MCP.
Self-audit AI agent, tool, and MCP-server code for security and reliability misconfigurations with Trustabl, the static analyzer for the OpenAI Agents SDK, Claude Agent SDK, Google ADK, and MCP. Ships two skills: trustabl-scan scans your agent code with Trustabl (via a bundled MCP server) right after you write or change it, before you commit — optionally matching your declared dependencies against the OSV database for known CVEs — and trustabl-enrich applies the scan findings directly to your source files as targeted code edits.
Thoughtbox observability, protocol enforcement, and CLI for Claude Code
OpenLit telemetry for Claude Code: sessions, tool calls, edit decisions, and cost rollups.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Agent trace analysis and context remediation plugin for Claude Code.
Your AI agents fail in subtle ways — they drift from goals, ignore context, skip steps, or hallucinate mid-task. These issues hide in traces and are hard to catch manually. Self-Care scans your agent traces, detects 14 types of common quality issues, and helps you fix them.
# Add the marketplace
/plugin marketplace add Not-Diamond/self-care
# Install the plugin
/plugin install self-care@self-care
Analyze traces from a connected source:
/self-care:init # Configure LangSmith or LangFuse
/self-care:run # Fetch and analyze traces
Or analyze a local trace file directly:
/self-care:run path/to/trace.json
Running /self-care:run on a trace produces a triage report like this:
Trace: customer-support-agent (abc123def456)
Cases: 3 (2 auto-fixable, 1 manual-review)
Report saved to: .self-care/reports/2026-04-06-a1b2c3d4-triage.md
The report contains detailed findings:
## Cases
### Event 1: goal-drift (high)
**Description**: Agent was asked to update shipping address but pivoted to
processing a refund after the customer mentioned a late delivery.
**Evidence**: Turn 4 initiates refund flow without completing address update.
**Classification**: auto-fixable
**Proposed Fix**: Add instruction anchoring — "Complete the current task before
addressing new requests."
---
### Event 2: missed-action (medium)
**Description**: Customer asked for email confirmation. Agent acknowledged
but never triggered the send-email tool.
**Evidence**: Turn 7 says "I'll send that right away" but no tool call follows.
**Classification**: auto-fixable
**Proposed Fix**: Add explicit action verification step after acknowledgment.
---
### Event 3: grounding (medium)
**Description**: Agent cited a "30-day return policy" but the retrieved policy
document specifies 14 days.
**Evidence**: Turn 5 states "30 days" vs knowledge base showing "14 days".
**Classification**: manual-review
**Recommendation**: Review system prompt for hardcoded policy references that
may conflict with retrieved documents.
Auto-fixable cases can be applied directly. Manual-review cases are escalated for human judgment.
After running the pipeline, Self-Care can automatically fix auto-remediable cases by editing your project files — system prompts, tool descriptions, and context documents.
The remediation flow is two-phase:
After /self-care:run completes, the auto-remediable report (.self-care/reports/<date>-<id>-auto-remediable.md) contains each case with its proposed fix. The context-refiner agent reads these cases, finds the right files in your project, and generates minimal, targeted edits.
Example remediation for a grounding case:
# In prompts/agent.md
- You can process refunds within 30 days of purchase.
+ Retrieve the current return policy before quoting any deadlines.
+ Do not state specific timeframes unless confirmed by a retrieved document.
Remediation targets the root cause in your agent's configuration — not the trace itself.
Self-Care can automatically poll your trace source and analyze new traces on a schedule using Claude Code's scheduled tasks:
/self-care:autosync-enable # Set up recurring analysis
You'll be asked to choose a polling interval (e.g. every 10 minutes) and a sampling rate (e.g. 5% of new traces). Self-Care then runs in the background — fetching, analyzing, and generating reports without manual intervention.
/self-care:autosync-status # Check current monitoring state
/self-care:autosync-disable # Stop background monitoring
Reports from autosync are saved to .self-care/reports/ just like manual runs, and a notification signal is written when new cases are found.