MCPInstall

mirror-doctor

Diagnose and fix broken Goldsky Mirror pipelines. Use this skill whenever a user has a Mirror pipeline that is failing, stuck, terminated, won't start, is in a restart loop, or is blocked by an in-flight request. Also use when the user mentions a specific Mirror pipeline name alongside a problem — even if they don't say 'mirror' explicitly, if they're using goldsky pipeline commands (not goldsky turbo), this is the right skill. Runs CLI commands directly to check status, read errors, identify root cause, and apply fixes. For YAML syntax or config reference, use /mirror instead. For turbo pipeline problems, use /turbo-doctor instead.

Installs
3.7K
Last 24h
+235
Trending rank
#1152
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/goldsky-io/goldsky-agent --skill mirror-doctor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads mirror-doctor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Mirror Pipeline Doctor

Diagnose and fix existing Mirror pipeline problems by running CLI commands, identifying root causes, and executing fixes.

Boundaries

  • Diagnose and fix EXISTING Mirror pipeline problems.
  • Do not build new pipelines — use /mirror for config reference or /turbo-builder for new Turbo pipelines.
  • Do not serve as a command reference — use /mirror for CLI syntax and flag lookups.
  • Do not handle Turbo pipelines — use /turbo-doctor for goldsky turbo problems.
  • Do not create secrets — use /secrets for credential management. But DO check whether secrets exist as part of diagnosis.

Diagnostic Workflow

Follow these steps in order. Each step builds on the previous one.

Step 1: Verify Authentication

Run goldsky project list 2>&1 to confirm the user is logged in.

  • If logged in: Note the project name and continue.
  • If not logged in: Direct the user to /auth-setup. Do not proceed until auth works.

Step 2: Identify the Pipeline

Run goldsky pipeline list --include-runtime-details 2>&1 to list all Mirror pipelines with their status.

If the user already named a pipeline, confirm it exists in the list. If not, show the list and ask which pipeline they want to diagnose.

Note both the desired status (ACTIVE, INACTIVE, PAUSED) and the runtime status (STARTING, RUNNING, FAILING, TERMINATED) — Mirror pipelines have both, and the combination tells the story.

Step 3: Triage by Status

The desired + runtime status combination determines the diagnostic path:

DesiredRuntimeMeaningAction
ACTIVERUNNINGHealthy — pipeline is processing dataAsk user what symptom they're seeing. Proceed to Step 4.
ACTIVESTARTINGPipeline is initializingAsk how long. If >10 min, proceed to Step 4.
ACTIVEFAILINGPipeline is encountering errors but hasn't terminated yetProceed to Step 4 immediately — this is time-sensitive.
ACTIVETERMINATEDMost common failure. Pipeline wanted to run but crashed.Proceed to Step 4.
PAUSEDTERMINATEDUser paused the pipeline (snapshot was taken).Ask if they want to resume: goldsky pipeline start <name> --from-snapshot last
INACTIVETERMINATEDUser stopped the pipeline (no snapshot).Ask if they want to start: goldsky pipeline start <name>

ACTIVE + TERMINATED is the most common case. The pipeline's desired status is ACTIVE (it should be running) but the runtime has terminated due to an error. Focus the diagnosis here.

Step 4: Gather Diagnostic Data

Run these commands to understand what went wrong:

# Get error details and runtime metrics
goldsky pipeline monitor <name> 2>&1

# Check for in-flight requests blocking operations
goldsky pipeline monitor <name> --update-request 2>&1

# Get the pipeline definition to check for misconfig
goldsky pipeline get <name> --definition 2>&1

# Get pipeline info including version
goldsky pipeline info <name> 2>&1

# Check available snapshots
goldsky pipeline snapshots list <name> 2>&1

Run these in sequence and analyze the output before proceeding. The monitor output is the most important — it shows error messages, records received/written metrics, and runtime status transitions.

Step 5: Match Error Patterns

Based on the diagnostic data, match against these known patterns:

Bad or Missing Secret

Symptoms: Pipeline terminates shortly after starting. Monitor shows credential or authentication errors.

Verify: Run goldsky secret list 2>&1 and cross-reference with the secret_name values in the pipeline definition from Step 4.

Fix:

  1. If the secret doesn't exist, direct the user to /secrets to create it.
  2. If the secret exists but credentials are wrong, update it in place with goldsky secret update; follow Rotating Credentials for the required JSON format and credential handling. Do not delete and recreate an in-use secret.
  3. Restart: goldsky pipeline restart <name> --from-snapshot last

Sink Unreachable

Symptoms: Connection timeout, connection refused, or network errors in the monitor output. Pipeline may cycle between FAILING and TERMINATED.

Common causes:

  • Firewall not allowing inbound from AWS us-west-2 (Mirror pipelines write from this region)
  • Database is down or restarted
  • Connection pool exhausted
  • Wrong port or host in the secret

Fix:

  1. Verify the sink is reachable from us-west-2.
  2. Check that the secret has the correct host, port, and credentials.
  3. Once connectivity is restored, restart: goldsky pipeline restart <name> --from-snapshot last

Resource Exhaustion

Symptoms: Pipeline runs for a while then terminates. Monitor may show high record counts or slow processing. Common during large backfills or pipelines with many sources/JOINs.

Fix:

  1. Resize: goldsky pipeline resize <name> <size> — sizes are s, m, l, xl, xxl.
  2. Start small and go up. s handles most workloads (up to 300K records/sec, ~8 subgraph sources). Use l or larger for big chain backfills or heavy JOINs.

In-Flight Request Blocking

Symptoms: User tries to update, delete, or restart the pipeline but gets "Cannot process request, found existing request in-flight."

Diagnose: goldsky pipeline monitor <name> --update-request — this shows what operation is in progress (usually a snapshot).

Fix:

  1. If the in-flight operation is a snapshot that's making progress, wait for it.
  2. If it's stuck or unwanted: goldsky pipeline cancel-update <name>
  3. Then retry the original operation.

Stuck Snapshot

Symptoms: Pipeline can't be paused, updated, or restarted because a snapshot creation is taking too long or failing. The --update-request monitor shows snapshot progress stuck at a percentage.

Fix:

  1. Cancel the stuck snapshot: goldsky pipeline cancel-update <name>
  2. Restart without waiting for a new snapshot: goldsky pipeline restart <name> --from-snapshot last
  3. If there's no usable snapshot: goldsky pipeline restart <name> --from-snapshot none (starts from scratch — warn the user this reprocesses data)

Transform SQL Error

Symptoms: Pipeline terminates with SQL-related error messages. Could be syntax errors, referencing a non-existent column, or type mismatches.

Diagnose: Check the pipeline definition (goldsky pipeline get <name> --definition) and look at the transforms section.

Fix:

  1. Identify the SQL error from the monitor output.
  2. Fix the SQL in the pipeline YAML file.
  3. Validate: goldsky pipeline validate <file.yaml>
  4. Reapply: goldsky pipeline apply <file.yaml> --status ACTIVE --from-snapshot last

Use /mirror for SQL transform syntax reference if needed.

Pipeline in Restart Loop

Symptoms: Pipeline repeatedly cycles through STARTING → FAILING → TERMINATED. Monitor shows the same error recurring.

This is usually a symptom of another root cause — bad secret, sink unreachable, or resource issues. The pipeline keeps trying to start but hits the same wall.

Fix:

  1. Identify the underlying error from the monitor (it's usually one of the patterns above).
  2. Fix the root cause first.
  3. Then restart: goldsky pipeline restart <name> --from-snapshot last

Sink Downtime Cascade

Symptoms: Pipeline was running fine, then the sink (database) went down temporarily. Pipeline auto-retried, then restarted its writers, then eventually terminated.

This is expected behavior — Mirror handles transient sink errors automatically (retry batch → restart writers → fail after prolonged issues).

Fix:

  1. Confirm the sink is back up and healthy.
  2. Restart from the last snapshot: goldsky pipeline restart <name> --from-snapshot last
  3. The pipeline will resume from where it left off, not reprocess everything.

Step 6: Present Diagnosis

After identifying the issue, present findings clearly:

## Diagnosis

**Pipeline:** <name>
**Status:** <desired> + <runtime>
**Issue:** <one-line summary>

**Root cause:**
<What's wrong and why>

**Evidence:**
- <Error message or observation from monitor>
- <Relevant detail from pipeline definition>

**Recommended fix:**
1. <Step 1>
2. <Step 2>

**Prevention:**
<How to avoid this in the future, if applicable>

Step 7: Execute Fix

Offer to run the fix commands directly. Always confirm with the user before executing:

  • Restart: goldsky pipeline restart <name> --from-snapshot last
  • Resize: goldsky pipeline resize <name> <size>
  • Cancel blocked operation: goldsky pipeline cancel-update <name>
  • Restart from scratch: goldsky pipeline restart <name> --from-snapshot none (warn: reprocesses data)
  • Reapply config: goldsky pipeline apply <file.yaml> --status ACTIVE --from-snapshot last
  • Delete and recreate: goldsky pipeline delete <name> -f then goldsky pipeline apply <file.yaml> --status ACTIVE (last resort)

After executing, verify recovery by running goldsky pipeline monitor <name> and watching for STARTING → RUNNING transition.

Important Rules

  • Always gather data before diagnosing. Never guess at the problem.
  • Check both desired AND runtime status — the combination matters.
  • Confirm with the user before running any destructive commands (delete, restart from scratch).
  • --from-snapshot last preserves progress. --from-snapshot none starts over. Default to last unless there's a reason not to.
  • Transient errors are auto-retried for up to 6 hours. Non-transient errors terminate immediately. If the pipeline terminated quickly after starting, it's likely a config issue (bad secret, wrong SQL), not a transient network blip.
  • If the problem is beyond CLI diagnosis, suggest contacting support@goldsky.com with the pipeline name, error messages, and project ID.

When Bash is Not Available

If you don't have the Bash tool, output the diagnostic commands for the user to run, but structure them clearly:

  1. Give one command at a time.
  2. Explain what to look for in the output.
  3. Based on their description of the output, proceed with the diagnosis.

This is the fallback path — always prefer running commands directly when Bash is available.

Related

  • /mirror — Pipeline YAML configuration, CLI flag reference, sink setup
  • /secrets — Create and manage sink credentials
  • /auth-setup — CLI installation and authentication
  • /turbo-doctor — Diagnose Turbo pipeline problems (not Mirror)

FAQ

What does the mirror-doctor skill do?

Diagnose and fix broken Goldsky Mirror pipelines. Use this skill whenever a user has a Mirror pipeline that is failing, stuck, terminated, won't start, is in a restart loop, or is blocked by an in-flight request. Also use when the user mentions a specific Mirror pipeline name alongside a problem — even if they don't say 'mirror' explicitly, if they're using goldsky pipeline commands (not goldsky turbo), this is the right skill. Runs CLI commands directly to check status, read errors, identify root cause, and apply fixes. For YAML syntax or config reference, use /mirror instead. For turbo pipeline problems, use /turbo-doctor instead.

How do I install mirror-doctor?

Run npx skills add https://github.com/goldsky-io/goldsky-agent --skill mirror-doctor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/mirror-doctor/ (personal) or .claude/skills/mirror-doctor/ (project).

Which AI agents can use mirror-doctor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is mirror-doctor safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains mirror-doctor?

It is published by goldsky-io in goldsky-io/goldsky-agent. It has 3,749 recorded installs.

More from goldsky-io/goldsky-agent

View all →

turbo-pipelines

goldsky-io/goldsky-agent

Turbo pipeline YAML reference and architecture guide. Covers: YAML field syntax (startat, from, version, primarykey), source/transform/sink configuration, validation errors, resource sizing (xs–xxl), architecture decisions (dataset vs kafka, streaming vs job, fan-out vs fan-in, sink selection, pipeline splitting). Triggers on: 'what does field X do', 'what fields does a postgres sink need', 'what resource size', 'should I use kafka or dataset', 'how to structure my pipeline'. For writing transforms, use /turbo-transforms. For end-to-end building, use /turbo-builder.

Data & Databases3.8K installs

turbo-transforms

goldsky-io/goldsky-agent

Write SQL, TypeScript, and dynamic table transforms for Turbo pipelines. Covers: decoding EVM logs with gslogdecode, filtering/casting blockchain data, UNION ALL for combining events, TypeScript/WASM transforms (invoke function), dynamic lookup tables (dynamictablecheck), transform chaining, and Solana decoding. Triggers on: 'decode Transfer events', 'write a SQL transform', 'filter by contract', 'TypeScript transform', 'dynamic table', 'UNION ALL'. For pipeline YAML structure, use /turbo-pipelines. For end-to-end building, use /turbo-builder.

turbo-doctor

goldsky-io/goldsky-agent

Diagnose and fix broken Goldsky Turbo pipelines interactively. Triggers on: pipeline in error state, stuck starting, connection refused, not getting data, duplicate rows, missing fields, slow backfill, or any named pipeline misbehaving. Runs logs/status commands, identifies root cause, and offers fixes. For CLI syntax or error pattern lookup without an active problem, use /turbo-operations instead.

3.8K installs

turbo-builder

goldsky-io/goldsky-agent

Build and deploy new Goldsky Turbo pipelines: requirements, dataset selection, YAML, validation, and deployment. Use for 'build a pipeline', 'index X on Y chain', or moving chain/contract data into Postgres, MySQL, ClickHouse, Kafka, Pub/Sub, S3, SQS, or webhooks. Also use for data goals such as Polymarket fills/positions/PnL, prediction markets, stablecoin or circulating supply, proof of reserves, sanctions/AML transfer monitoring, deposit detection, CCTP burns/mints, cross-chain settlement, payment reconciliation, wallet history streamed into the user's own database, token holder registries, tokenized equities/RWA, and wash-trading detection. A REST lookup of one wallet's balances or transfers is /feeds, not a pipeline, and so is a read of Polymarket activity, positions or balances. Debug existing pipelines with /turbo-doctor; look up syntax with /turbo-pipelines.

Data & Databases3.8K installs

datasets

goldsky-io/goldsky-agent

Use this skill when the user needs to look up or verify Goldsky blockchain dataset names, chain prefixes, dataset types, or versions. Triggers on questions like 'what\'s the dataset name for X?', 'what prefix does Goldsky use for chain Y?', 'what version should I use for Z?', or 'what datasets are available for Solana/Stellar/Arbitrum/etc?'. Also use for chain-specific dataset questions (e.g., polygon vs matic prefix, stellarnet balance datasets, solana token transfer dataset names), and to answer 'is there a dataset for X?' where X is a domain rather than a chain — decoded logs, token transfers and balances, mint/burn events for circulating supply, DEX or prediction-market activity (Polymarket), or the raw blocks, transactions and traces behind wallet history and reconciliation. Do NOT trigger for questions about CLI commands, pipeline setup, or general Goldsky architecture unless the core question is about finding the right dataset name or chain prefix. Wallet Feeds API queries are /

Data & Databases3.8K installs

auth-setup

goldsky-io/goldsky-agent

Set up Goldsky CLI authentication and project configuration. Use this skill when the user needs to: install the goldsky CLI (what's the official install command?), run goldsky login (including when the browser opens but 'authentication failed'), run goldsky project list and see 'not logged in' or 'unauthorized', switch between Goldsky projects, check which project they're currently authenticated to, or fix 'unauthorized' errors when running goldsky turbo commands. Also use for 'walk me through setting up goldsky CLI from scratch for the first time', and when they just installed Goldsky and say 'Set it up and help me get started'. If any other Goldsky skill hits an auth error, redirect here first.

Backend & APIs3.8K installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs