/mc-agent-toolkit:monte-carlo-reinforce-agentfrom mc-agent-toolkit
Reads Monte Carlo's daily reinforcement loop report for an AI agent, ranks diagnosed issues, and opens a pull request with fixes — with user approval at each step.
Ships in mc-agent-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill turns Monte Carlo's reinforcement loop diagnosis into landed code fixes. Monte Carlo runs a daily reinforcement loop pipeline that analyzes an agent's traces and produces, per workflow, a report of diagnosed issues — each with supporting evidence (trace deep-links, verifier checks) and recommended fixes. This skill reads that diagnosis, ranks it, proposes what to fix, and follows through with a pull request — pausing for the user's decision at each fan-out point.
Monte Carlo tool routing (required): Always call Monte Carlo MCP tools through this plugin's bundled server, whose fully-qualified tool names are
mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__<tool>(e.g.mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__get_reinforcement_loop_report). Bare tool names used in this skill (get_agent_metadata,get_reinforcement_loop_summaries,get_reinforcement_loop_report) refer to that bundled server. If the session also has a separately-configuredmonte-carlo-mcpserver, do not route to it — it may point at a different endpoint or credentials.
Activate when the user:
monte-carlo-troubleshoot-agent-traces. That skill investigates a single
incident; this one acts on the standing reinforcement loop diagnosis across a workflow and writes code.monte-carlo-monitoring-advisor / tune-monitor.monte-carlo-instrument-agent.get_reinforcement_loop_summaries reports that the reinforcement loop is not enabled,
tell the user the account isn't enrolled in the reinforcement loop pipeline and stop.| Tool | Purpose |
|---|---|
get_agent_metadata | List AI agents with their canonical agentName, friendly displayName, traceTableMcon, source type, and warehouse. Used to resolve the agent the user named to the exact agent_name + trace_table_mcon the reinforcement loop tools require (match on canonical name or display name; disambiguate when several match) |
get_reinforcement_loop_summaries | Per-workflow health rollups for one agent — issue_count + worst-severity health + detection_time per workflow. The cheap triage layer; rank on this before expanding anything |
get_reinforcement_loop_report | The latest reinforcement loop report for one workflow, as a single actionable markdown brief — diagnosed issues with evidence (trace deep-links), recommended fixes, any existing Linear ticket, and any proposed monitor. The expensive call; fetch only for workflows the user chose |
The flow is user-gated at every fan-out — never expand or act autonomously. The number of
get_reinforcement_loop_report calls is bounded by what the user picks, not by how many workflows exist.
The user triggers this skill with a specific agent in mind — expect them to name it ("reinforce
the chat agent", "fix ai-agent"). This step's job is to turn that name into the exact identifiers
the reinforcement loop tools need.
Call get_agent_metadata and match the user's name against each entry's agentName and
displayName (users often use the friendly display name, not the canonical one). Use the matched
entry's agentName + traceTableMcon together for every later call — the trace table
disambiguates agents that share a name.
trace_table_mcon.Call get_reinforcement_loop_summaries(agent_name, trace_table_mcon) — one cheap call covering every
workflow. Then:
issue_count == 0 (clean reports).health severity (CRITICAL → HIGH → MEDIUM → LOW), then by issue_count.Gate — ask the user which workflow(s) to dig into. Do NOT call get_reinforcement_loop_report for every
workflow. Default the suggestion to the single worst workflow; let the user pick one or a few. Only
the chosen workflows get expanded in Step 3.
For each workflow the user chose, call get_reinforcement_loop_report(agent_name, workflow_name, trace_table_mcon).
The response is a single markdown brief: a report header (health, coverage, window, and what changed
since the last report) followed by one section per issue. Each issue section is self-contained — the
summary, the evidence with clickable trace deep-links, and the recommended actions — so identifying
the top issues happens in-context from this one call. No per-issue tool calls are needed.
From the brief, pick the top issues by severity/priority. Prefer issues whose evidence includes a concrete node/tool and code-referable checks (those are the most directly fixable in code).
Summarize the top issues for the user in plain language — for each: what's wrong (the issue summary), the evidence, and the recommended fix. Call out signals that change the action:
proposed_monitor_yaml present in the brief) → the recommended
remediation may be a monitor rather than a code change; surface that as an option.Gate — ask the user which issue(s) to fix now. Fix one issue at a time. Confirm the target before writing any code.
For the chosen issue:
Gate — confirm before pushing / opening the PR. Show the diff and the PR body, and only push after the user approves. Then, if the user wants, return to Step 4 for the next issue (or Step 2 for the next workflow).
get_reinforcement_loop_summaries is the triage layer; call get_reinforcement_loop_report
only for user-chosen workflows. Expanding every workflow wastes context on reports no one will act
on.What SKILL.md sets; muted values are Claude Code's defaults
Use when the user wants to act on an AI agent's diagnosed health problems and land fixes: "fix my agent", "reinforce my agent", "improve my agent's health", "what should I fix in <agent>", "open a PR for my agent's top issue". Expects the user to name the agent; if they don't, it lists available agents and asks. The flow is user-gated: it surfaces the reinforcement loop diagnosis and asks which workflow to dig into and which issue to fix before writing any code. Do NOT use for: - investigating a single agent alert or trace (eval drop, latency spike, one trace id) — use monte-carlo-troubleshoot-agent-traces - creating or tuning agent monitors — use monte-carlo-monitoring-advisor / tune-monitor - instrumenting a brand-new agent to emit traces — use monte-carlo-instrument-agent
21 skills in this plugin
/monte-carlo-account-analyticsAnswers questions about your Monte Carlo account (alerts, data quality, coverage, monitors, credits, monitor runs) from the Analytics API, helps sharpen vague questions, and builds dashboards on request./monte-carlo-analyze-root-causeInvestigate data incidents and find root causes using Monte Carlo's
observability data. Guides the agent through systematic investigation:
alert lookup, lineage tracing, ETL checks, query analysis, and data
profiling. Activates when a user asks about data issues, incidents,
alerts, or why data looks wrong.
/monte-carlo-asset-healthnpx claudepluginhub monte-carlo-data/mc-agent-toolkit --plugin mc-agent-toolkitOther plugins' skills for the same job