developer-detective
⚡ PRIMARY TOOL for: 'how does X work', 'find implementation of', 'trace data flow', 'where is X defined', 'audit integrations', 'find all usages'. Uses claudemem v0.3.0 AST with callers/callees analysis. GREP/FIND/GLOB ARE FORBIDDEN.
What this skill does
# ⛔⛔⛔ CRITICAL: AST STRUCTURAL ANALYSIS ONLY ⛔⛔⛔
```
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ 🧠 THIS SKILL USES claudemem v0.3.0 AST ANALYSIS EXCLUSIVELY ║
║ ║
║ ❌ GREP IS FORBIDDEN ║
║ ❌ FIND IS FORBIDDEN ║
║ ❌ GLOB IS FORBIDDEN ║
║ ║
║ ✅ claudemem --nologo callers <name> --raw FOR USAGE ANALYSIS ║
║ ✅ claudemem --nologo callees <name> --raw FOR DEPENDENCY TRACING ║
║ ✅ claudemem --nologo context <name> --raw FOR FULL UNDERSTANDING ║
║ ║
║ ⭐ v0.3.0: callers/callees show exact data flow and dependencies ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════╝
```
# Developer Detective Skill
**Version:** 3.3.0
**Role:** Software Developer
**Purpose:** Implementation investigation using AST callers/callees and impact analysis
## Role Context
You are investigating this codebase as a **Software Developer**. Your focus is on:
- **Implementation details** - How code actually works
- **Data flow** - How data moves through the system (via callees)
- **Usage patterns** - How code is used (via callers)
- **Dependencies** - What a function needs to work
- **Impact analysis** - What breaks if you change something
## Why callers/callees is Perfect for Development
The `callers` and `callees` commands show you:
- **callers** = Every place that calls this code (impact of changes)
- **callees** = Every function this code calls (its dependencies)
- **Exact file:line** = Precise locations for reading/editing
- **Call kinds** = call, import, extends, implements
## Developer-Focused Commands (v0.3.0)
### Find Implementation
```bash
# Find where a function is defined
claudemem --nologo symbol processPayment --raw
# Get full context with callers and callees
claudemem --nologo context processPayment --raw
```
### Trace Data Flow
```bash
# What does this function call? (data flows OUT)
claudemem --nologo callees processPayment --raw
# Follow the chain
claudemem --nologo callees validateCard --raw
claudemem --nologo callees chargeStripe --raw
```
### Find All Usages
```bash
# Who calls this function? (usage patterns)
claudemem --nologo callers processPayment --raw
# This shows EVERY place that uses this code
```
### Impact Analysis (v0.4.0+ Required)
```bash
# Before modifying ANY code, check full impact
claudemem --nologo impact functionToChange --raw
# Output shows ALL transitive callers:
# direct_callers:
# - LoginController.authenticate:34
# - SessionMiddleware.validate:12
# transitive_callers (depth 2):
# - AppRouter.handleRequest:45
# - TestSuite.runAuth:89
```
**Why impact matters**:
- `callers` shows only direct callers (1 level)
- `impact` shows ALL transitive callers (full tree)
- Critical for refactoring decisions
**Handling Empty Results:**
```bash
IMPACT=$(claudemem --nologo impact functionToChange --raw)
if echo "$IMPACT" | grep -q "No callers"; then
echo "No callers found. This is either:"
echo " 1. An entry point (API handler, main function) - expected"
echo " 2. Dead code - verify with: claudemem dead-code"
echo " 3. Dynamically called - check for import(), reflection"
fi
```
### Impact Analysis (BEFORE Modifying)
```bash
# Quick check - direct callers only (v0.3.0)
claudemem --nologo callers functionToChange --raw
# Deep check - ALL transitive callers (v0.4.0+ Required)
IMPACT=$(claudemem --nologo impact functionToChange --raw)
# Handle results
if [ -z "$IMPACT" ] || echo "$IMPACT" | grep -q "No callers"; then
echo "No static callers found - verify dynamic usage patterns"
else
echo "$IMPACT"
echo ""
echo "This tells you:"
echo "- Direct callers (immediate impact)"
echo "- Transitive callers (ripple effects)"
echo "- Grouped by file (for systematic updates)"
fi
```
### Understanding Complex Code
```bash
# Get full picture: definition + callers + callees
claudemem --nologo context complexFunction --raw
```
## PHASE 0: MANDATORY SETUP
### Step 1: Verify claudemem v0.3.0
```bash
which claudemem && claudemem --version
# Must be 0.3.0+
```
### Step 2: If Not Installed → STOP
Use AskUserQuestion (see ultrathink-detective for template)
### Step 3: Check Index Status
```bash
# Check claudemem installation and index
claudemem --version && ls -la .claudemem/index.db 2>/dev/null
```
### Step 3.5: Check Index Freshness
Before proceeding with investigation, verify the index is current:
```bash
# First check if index exists
if [ ! -d ".claudemem" ] || [ ! -f ".claudemem/index.db" ]; then
# Use AskUserQuestion to prompt for index creation
# Options: [1] Create index now (Recommended), [2] Cancel investigation
exit 1
fi
# Count files modified since last index
STALE_COUNT=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" -o -name "*.rs" \) \
-newer .claudemem/index.db 2>/dev/null | grep -v "node_modules" | grep -v ".git" | grep -v "dist" | grep -v "build" | wc -l)
STALE_COUNT=$((STALE_COUNT + 0)) # Normalize to integer
if [ "$STALE_COUNT" -gt 0 ]; then
# Get index time with explicit platform detection
if [[ "$OSTYPE" == "darwin"* ]]; then
INDEX_TIME=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M" .claudemem/index.db 2>/dev/null)
else
INDEX_TIME=$(stat -c "%y" .claudemem/index.db 2>/dev/null | cut -d'.' -f1)
fi
INDEX_TIME=${INDEX_TIME:-"unknown time"}
# Get sample of stale files
STALE_SAMPLE=$(find . -type f \( -name "*.ts" -o -name "*.tsx" \) \
-newer .claudemem/index.db 2>/dev/null | grep -v "node_modules" | grep -v ".git" | head -5)
# Use AskUserQuestion (see template in ultrathink-detective)
fi
```
### Step 4: Index if Needed
```bash
claudemem index
```
---
## Workflow: Implementation Investigation (v0.3.0)
### Phase 1: Map the Area
```bash
# Get overview of the feature area
claudemem --nologo map "payment processing" --raw
```
### Phase 2: Find the Entry Point
```bash
# Locate the main function (highest PageRank in area)
claudemem --nologo symbol PaymentService --raw
```
### Phase 3: Trace the Flow
```bash
# What does PaymentService call?
claudemem --nologo callees PaymentService --raw
# For each major callee, trace further
claudemem --nologo callees validatePayment --raw
claudemem --nologo callees processCharge --raw
claudemem --nologo callees saveTransaction --raw
```
### Phase 4: Understand Usage
```bash
# Who uses PaymentService?
claudemem --nologo callers PaymentService --raw
# This shows the entry points
```
### Phase 5: Read Specific Code
```bash
# Now read ONLY the relevant file:line ranges from results
# DON'T read whole files
```
## Output Format: Implementation Report
### 1. Symbol Overview
```
┌─────────────────────────────────────────────────────────┐
│ IMPLEMENTATION ANALYSIS │
├─────────────────────────────────────────────────────────┤
│ Symbol: processPayment │
│ Location: src/services/payment.ts:45-89 │
│ Kind: function │
│ PageRank: 0.034 │
│ Search Method: claudemem v0.3.0 (AST analysis) │
└─────────────────────────────────────────────────────────┘
```
### 2. Data Flow (Callees)
```
processPayment
├── validateCard (src/validators/card.ts:12)
├── getCustomer (src/services/customer.ts:34)
├── chargeStripe (src/inteRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.