cross-plugin-detective
This cross-plugin detective skill maps agents to appropriate investigation tools based on their roles, enabling developers, architects, and testers to analyze codebases through the code-analysis plugin. Use it when integrating multi-agent workflows that require role-specific code investigation, ensuring all detective queries use claudemem indexed memory searches rather than file system tools.
git clone --depth 1 https://github.com/MadAppGang/claude-code /tmp/cross-plugin-detective && cp -r /tmp/cross-plugin-detective/plugins/code-analysis/skills/cross-plugin-detective ~/.claude/skills/cross-plugin-detectiveSKILL.md
# Cross-Plugin Detective Integration
**Version:** 1.0.0
**Purpose:** Connect ANY agent to the appropriate detective skill based on role
## ⛔ CORE PRINCIPLE: INDEXED MEMORY ONLY
```
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ ALL DETECTIVE SKILLS USE claudemem (INDEXED MEMORY) EXCLUSIVELY ║
║ ║
║ When ANY agent references a detective skill, they MUST: ║
║ ❌ NEVER use grep, find, rg, Glob tool, Grep tool ║
║ ✅ ALWAYS use claudemem search "query" ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════╝
```
---
## Agent-to-Skill Mapping
### Frontend Plugin Agents
| Agent | Should Use Skill | Purpose |
|-------|-----------------|---------|
| `typescript-frontend-dev` | `code-analysis:developer-detective` | Find implementations, trace data flow |
| `frontend-architect` | `code-analysis:architect-detective` | Analyze architecture, design patterns |
| `test-architect` | `code-analysis:tester-detective` | Coverage analysis, test quality |
| `senior-code-reviewer` | `code-analysis:ultrathink-detective` | Comprehensive code review |
| `ui-developer` | `code-analysis:developer-detective` | Find UI implementations |
| `designer` | `code-analysis:architect-detective` | Understand component structure |
| `plan-reviewer` | `code-analysis:architect-detective` | Review architecture plans |
### Bun Backend Plugin Agents
| Agent | Should Use Skill | Purpose |
|-------|-----------------|---------|
| `backend-developer` | `code-analysis:developer-detective` | Find implementations, trace data flow |
| `api-architect` | `code-analysis:architect-detective` | API architecture analysis |
| `apidog` | `code-analysis:developer-detective` | Find API implementations |
### Code Analysis Plugin Agents
| Agent | Should Use Skill | Purpose |
|-------|-----------------|---------|
| `codebase-detective` | All detective skills | Full investigation capability |
### Any Other Plugin
| Agent Role | Should Use Skill |
|------------|-----------------|
| Any "developer" agent | `code-analysis:developer-detective` |
| Any "architect" agent | `code-analysis:architect-detective` |
| Any "tester" agent | `code-analysis:tester-detective` |
| Any "reviewer" agent | `code-analysis:ultrathink-detective` |
| Any "debugger" agent | `code-analysis:debugger-detective` |
---
## How to Reference Skills in Agent Frontmatter
### Example: Developer Agent
```yaml
---
name: my-developer-agent
description: Implements features
skills: code-analysis:developer-detective
---
# My Developer Agent
When investigating code, use the developer-detective skill.
This gives you access to indexed memory search via claudemem.
## Investigation Pattern
Before implementing:
1. Check claudemem status: `claudemem status`
2. Search for related code: `claudemem search "feature I'm implementing"`
3. Read specific files from results
4. NEVER use grep or find for discovery
```
### Example: Architect Agent
```yaml
---
name: my-architect-agent
description: Designs architecture
skills: code-analysis:architect-detective
---
# My Architect Agent
When analyzing architecture, use the architect-detective skill.
## Architecture Discovery
1. Check claudemem status: `claudemem status`
2. Search for patterns: `claudemem search "service layer architecture"`
3. Map dependencies: `claudemem search "import dependency injection"`
4. NEVER use grep or find for discovery
```
### Example: Multi-Skill Agent
```yaml
---
name: comprehensive-reviewer
description: Reviews all aspects
skills: code-analysis:ultrathink-detective, code-analysis:tester-detective
---
```
---
## Skill Selection Decision Tree
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ WHICH DETECTIVE SKILL TO USE? │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ What is the agent's PRIMARY focus? │
│ │
│ ├── IMPLEMENTING code / Finding where to change │
│ │ └── Use: developer-detective │
│ │ │
│ ├── DESIGNING architecture / Understanding patterns │
│ │ └── Use: architect-detective │
│ │ │
│ ├── TESTING / Coverage analysis / Quality │
│ │ └── Use: tester-detective │
│ │ │
│ ├── DEBUGGING / Finding root cause │
│ │ └── Use: debugger-detective │
│ │ │
│ └── COMPREHENSIVE analysis / Technical debt / Audit │
│ └── Use: ultrathink-detective │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
```
---
## Integration Examples
### Example 1: Frontend Developer Agent Needing to Find Code
```typescript
// In frontend plugin's typescript-frontend-dev agent:
// ❌ WRONG - Never do this
Grep({ pattern: "UserService", type: "ts" });
Glob({ pat|
|
|
Common agent patterns and templates for Claude Code. Use when implementing agents to follow proven patterns for Tasks integration, quality checks, and external model invocation via claudish CLI.
YAML frontmatter schemas for Claude Code agents and commands. Use when creating or validating agent/command files.
XML tag structure patterns for Claude Code agents and commands. Use when designing or implementing agents to ensure proper XML structure following Anthropic best practices.
YAML format for Claude Code agent definitions as alternative to markdown. Use when creating agents with YAML, converting markdown agents to YAML, or validating YAML agent schemas. Trigger keywords - "YAML agent", "agent YAML", "YAML format", "agent schema", "YAML definition", "convert to YAML".
Linear API patterns and examples for autopilot. Includes authentication, webhooks, issue CRUD, state transitions, file attachments, and comment handling.