# Ce Debug

Diagnosis loop for bugs and failing behavior.

- Repository: https://github.com/EveryInc/compound-engineering-plugin (25818 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add EveryInc/compound-engineering-plugin --skill ce-debug -g -a claude-code -y`
Codex: `npx skills add EveryInc/compound-engineering-plugin --skill ce-debug -g -a codex -y`
Cursor: `npx skills add EveryInc/compound-engineering-plugin --skill ce-debug -g -a cursor -y`
Gemini CLI: `npx skills add EveryInc/compound-engineering-plugin --skill ce-debug -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add EveryInc/compound-engineering-plugin`

## Description

Diagnosis loop for bugs and failing behavior. Use when asked to debug or fix failing or slow behavior.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Debug and Fix

Find the root cause of a failure, then, when the user chooses to, fix it with test-first discipline.

**Done when:** the causal chain from trigger to symptom is stated with no gaps and file:line evidence, and either a verified fix has been handed off (PR, commit, or the user's chosen stop) or a diagnosis-only summary has been delivered. **Escalate rather than persist:** 2-3 hypotheses exhausted without confirmation, or 3 failed fix attempts, means diagnose *why* instead of trying again, that is the smart escalation `references/investigate.md` describes. One hypothesis, one change at a time; changing several to see what helps is shotgun debugging.

`<bug_description>` is whatever this skill was invoked with, a failure description, a `mode:` token, or an issue reference (`#123`, `org/repo#123`, an issue URL), from the user or from a calling skill (`ce-babysit-pr` / `lfg` in `mode:pipeline` pass the failing jobs and log tails; `lfg`'s defect route passes `mode:return-to-caller` and the user's own reference). Blank if nothing was provided.


## Mode

Default is **interactive**: investigate, run the Phase 2 fix-choice gate, then the Phase 4 handoff.

**`mode:pipeline`** (set by an orchestrator such as `ce-babysit-pr` or `lfg`): run fully non-interactively and never call the blocking-question tool. Strip the token from `<bug_description>`, then **read `references/pipeline-mode.md` and follow it**, it overrides every "ask the user" point with a conservative default, replaces the Phase 2 fix-gate with "fix convergent bugs, defer divergent ones", and replaces the Phase 4 handoff with a structured return whose `status` is exactly one of `fixed-and-pushed | fixed-not-pushed | diagnosed-no-fix | flaky-infra | needs-human`. The caller branches on those exact spellings, so never rename, abbreviate, or add to them.

The rest: https://github.com/EveryInc/compound-engineering-plugin/blob/HEAD/skills/ce-debug/SKILL.md
