agentleFS
bis-codebis-code/claude-toolkit/.claude/skills/deep-dive/SKILL.md

deep-dive

Skill8 starsChanged 6 months agoMITView on GitHub

Cross-repo investigation: research planning issues, break down into sub-issues, generate ralph session prompts per repo.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ralplan, deep-interview and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ibahgatSkill

    ralplan

    Create a strict, quality-first execution plan with explicit gates and rollback-ready sequencing.

    Also in 4 projects that use this

  • klauswgSkill

    deep-interview

    在明确批准执行之前,通过数学化歧义门控进行苏格拉底式深度访谈

    Also in 3 projects that use this

  • thoughtbotSkill

    trace

    Run a scenario and record what actually happened.

    Also in 3 projects that use this

  • sahinSkill

    execute

    Also in 4 projects that use this

  • nicolasestremSkill

    brainstorm

    Structured idea generation and solution exploration with systematic analysis.

    Also in 4 projects that use this

  • MicrosoftSkill

    git-commit

    Stage user-selected paths, confirm the exact staged set, and create one local Conventional Commit, or generate a commit message for staged changes without committing. Use when you want a guarded commit or a ready-to-paste message.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 12 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No args — ask the user which planning issue to investigate

    line 14
  2. Very specific:

    Call toolkit__get_workspace with the current directory

    line 42
  3. Distinctive:

    If no workspace config exists:

    line 46
  4. Distinctive:

    Ask the user which repos are involved

    line 47
  5. Very specific:

    Read workspace config via toolkit__get_workspace

    line 55
  6. Very specific:

    If no planning_repo in config, ask the user which repo holds the planning issue.

    line 60
  7. Distinctive:

    Check for in-flight branches in each affected repo:

    line 66
  8. Distinctive:

    Ask: "Ready to investigate?

    line 74
  9. Distinctive:

    APPROVAL GATE: Wait for user confirmation before spawning agents.

    line 76
  10. Distinctive:

    If no domain-specific checks apply, skip this section.

    line 136
  11. Distinctive:

    After all agents return:

    line 142
  12. Distinctive:

    If branches exist, note what they already cover

    line 162
  13. Distinctive:

    Ask: "Does this breakdown look right?

    line 169
  14. Distinctive:

    APPROVAL GATE: Wait for user to approve the sub-issue breakdown.

    line 171
  15. Very specific:

    Use domain_labels from workspace config for additional labels.

    line 212
  16. Distinctive:

    Update the parent planning issue with investigation results:

    line 218

“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/deep-dive

Comprehensive investigation workflow for planning issues that span multiple repositories. Produces actionable sub-issues and ralph session prompts ready to copy-paste into per-repo Claude sessions.

Arguments: $ARGUMENTS

  • <number> — planning issue number (e.g., /deep-dive 9)
  • <url> — full GitHub issue URL
  • No args — ask the user which planning issue to investigate

Overview

/deep-dive 9
    ↓
Phase 1: Fetch & Understand the planning issue
    ↓
Phase 2: Parallel investigation (sub-agents per repo)
    ↓
Phase 3: Synthesize findings & identify sub-issues
    ↓
Phase 4: Create GitHub sub-issues in each affected repo
    ↓
Phase 5: Update planning issue with findings + ralph session guide
    ↓
Phase 6: Output ralph session prompts

Workspace Context

This skill reads workspace configuration from .claude-workspace.json in the current directory (or auto-detects using the toolkit__get_workspace MCP tool).

Workspace Discovery

  1. Call toolkit__get_workspace with the current directory
  2. This returns: repos (path, branch, type), planning_repo, dependency_order, domain_labels, shared dirs
  3. For each repo, read its .claude-toolkit.json for test/lint commands and MCP server info

If no workspace config exists:

  • Ask the user which repos are involved
  • Fall back to manual configuration

Phase 1: Fetch & Understand

  1. Parse $ARGUMENTS to get the issue number or URL
  2. Read workspace config via toolkit__get_workspace
  3. Fetch the planning issue:
    gh issue view <number> --repo <planning_repo> --json number,title,body,labels,milestone
    If no planning_repo in config, ask the user which repo holds the planning issue.
  4. Identify affected repositories from the issue body (look for repo links or "Affected repositories" section)
  5. For each affected repo, read .claude-toolkit.json:
    cat <repo-path>/.claude-toolkit.json
  6. Check for in-flight branches in each affected repo:
    cd <repo-path> && git branch -a | grep -i "<issue-slug-or-number>"
  7. Present a brief summary to the user:
    • Issue title and current description quality
    • Repos identified + their tech stacks (from toolkit config)
    • Any in-flight work found
    • Ask: "Ready to investigate? Any specific areas to focus on?"

APPROVAL GATE: Wait for user confirmation before spawning agents.


Phase 2: Parallel Investigation

Spawn one Task(subagent_type="Explore") agent per affected repository. Each agent gets:

  1. The issue context (title, body, acceptance criteria)
  2. The repo's toolkit config (test command, tech stack, LEANN indexes)
  3. Specific investigation questions:
    • What is the current implementation state?
    • What code paths are involved?
    • Are there existing tests?
    • What patterns does similar working code follow?
    • Are there deployment/config prerequisites?

Agent Prompt Template

## Investigation Task

**Planning Issue**: #<number> — <title>
**Repository**: <repo-name>
**Tech Stack**: <from .claude-toolkit.json or workspace config>
**Test Command**: <from .claude-toolkit.json>

**Issue Context**:
<issue body summary>

**Your mission**: Investigate the <repo-name> repository for this issue.

Answer these questions:
1. What is the current state of implementation for this feature?
2. Which files/classes are involved? List specific paths.
3. Are there existing tests covering this area?
4. What does a working similar feature look like? (for comparison/pattern reference)
5. Are there any deployment prerequisites (contracts deployed, configs, env vars)?
6. What are the specific bugs or gaps you can identify?

**Important**: Check for in-flight branches that may already address parts of this:
```bash
git branch -a | grep -i "<relevant-keywords>"

Return a structured report with sections for each question.


### Domain-Specific Checks

Domain checks are activated based on the repo's tech stack from `.claude-toolkit.json`:

| Tech Stack | Check |
|-----------|-------|
| `solidity` / `blockchain` | Check deployed contract addresses, compare contract ABI vs calling code |
| `unity` / `csharp` | Check for NuGet/package sync needs between repos |
| `typescript` / `react` | Check API endpoint compatibility with backend changes |
| `go` | Check protobuf/gRPC contract compatibility |
| `rust` | Check shared crate version compatibility |

If no domain-specific checks apply, skip this section.

---

## Phase 3: Synthesize Findings

After all agents return:

1. **Merge findings** into a unified picture:
   - Current state per repo
   - Root cause analysis (if bug)
   - Gap analysis (if feature)
   - Cross-repo dependencies

2. **Identify sub-issues** — break down into concrete, implementable units:
   - Each sub-issue should be completable in one ralph session
   - Group by repository
   - Order by dependency (use `dependency_order` from workspace config)
   - Each needs: title, description, acceptance criteria, affected files

3. **Determine dependency chain**:
   - Which repo must go first? (use `dependency_order` from config)
   - Are there package sync steps between repos?
   - Can any issues be parallelized?

4. **Check for in-flight work overlap**:
   - If branches exist, note what they already cover
   - Reduce sub-issue scope accordingly

5. Present findings to the user:
   - Root cause / gap summary
   - Proposed sub-issue breakdown
   - Dependency chain
   - Ask: "Does this breakdown look right? Any adjustments?"

**APPROVAL GATE**: Wait for user to approve the sub-issue breakdown.

---

## Phase 4: Create GitHub Sub-Issues

For each approved sub-issue, create it in the appropriate repository:

```bash
gh issue create \
  --repo <org>/<repo> \
  --title "<type>: <description>" \
  --body "$(cat <<'EOF'
## Context

Sub-issue of <planning_repo>#<parent-number>

<description with context from investigation>

## Acceptance Criteria

- [ ] Criterion 1
- [ ] Criterion 2

## Affected Files

- `path/to/file1`
- `path/to/file2`

## Technical Notes

<implementation hints from investigation>

## Dependencies

- <dependency on other sub-issues if any>
EOF
)" \
  --label "claude-ready"

Use domain_labels from workspace config for additional labels.


Phase 5: Update Planning Issue

Update the parent planning issue with investigation results:

gh issue edit <number> --repo <planning_repo> --body "$(cat <<'EOF'
<original issue body>

---

## Investigation Results (<date>)

### Summary
<findings overview>

### Sub-Issues (Execution Order)

<grouped by repo, ordered by dependency_order>

### Dependency Chain
<visual dependency graph>
EOF
)"

Phase 6: Output Ralph Session Prompts

Generate copy-paste-ready prompts for each repo's Claude session, ordered by dependency_order from workspace config.

Prompt Structure

For each affected repo:

### <Repo Name> Ralph Session

**Run from**: `cd <repo-path>`
**Command**: `/ralph --issues <comma-separated-issue-numbers>`

<If this repo depends on another repo's output>
**Prerequisite**: <dependent-repo> PR must be merged first.
</If>

**Context prompt**:

```
You are working on <planning_repo>#<N>: <title>.

## Issues to implement (in order):

1. **#<issue-number>: <title>**
   - <acceptance criteria summary>
   - Key files: <files>

## Important context from investigation:
- <key finding 1>
- <key finding 2>

## Test command: <from .claude-toolkit.json>
## Lint command: <from .claude-toolkit.json>
```

Error Handling

SituationAction
No workspace config foundAsk user which repos are involved
Planning issue not foundAsk user for correct repo/number
.claude-toolkit.json missing in a repoFall back to workspace config for tech stack
Agent returns insufficient infoRun targeted follow-up search
In-flight branch conflicts with planNote overlap, reduce sub-issue scope

Checklist (Internal — verify before completing)

  • Workspace config loaded (auto-detect or .claude-workspace.json)
  • All affected repos investigated
  • .claude-toolkit.json read for each repo
  • Root cause or gap clearly identified
  • Sub-issues created with acceptance criteria and claude-ready label
  • Planning issue updated with findings + session guide
  • Ralph prompts output for each repo (in dependency order)
  • Dependency chain is clear and documented

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.