/qe-code-intelligence
Builds semantic code indexes, maps dependency graphs, and performs intelligent code search across large codebases. Use when understanding unfamiliar code, tracing call chains, analyzing import dependencies, or reducing context window usage through targeted retrieval.
$ npx -y skills add proffesor-for-testing/agentic-qe --skill qe-code-intelligence --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/qe-code-intelligence
Context preview
The summary Claude sees to decide when to auto-load this skill.
Builds semantic code indexes, maps dependency graphs, and performs intelligent code search across large codebases. Use when understanding unfamiliar code, tracing call chains, analyzing import dependencies, or reducing context window usage through targeted retrieval.
SKILL.md
qe-code-intelligence.SKILL.mdname: "qe-code-intelligence"
description: "Builds semantic code indexes, maps dependency graphs, and performs intelligent code search across large codebases. Use when understanding unfamiliar code, tracing call chains, analyzing import dependencies, or reducing context window usage through targeted retrieval."
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/qe-code-intelligence.yaml
QE Code Intelligence
Purpose
Guide the use of v3's code intelligence capabilities including knowledge graph construction, semantic code search, dependency mapping, and context-aware code understanding with significant token reduction.
Activation
- When understanding unfamiliar code
- When searching for code semantically
- When analyzing dependencies
- When building code knowledge graphs
- When reducing context for AI operations
Quick Start
# Index codebase into knowledge graph
aqe code index src/ --incremental
# Semantic code search
aqe code search "authentication middleware"
# Analyze change impact
aqe code impact src/services/UserService.ts --depth 3
# Map dependencies
aqe code deps src/
# Analyze complexity and find hotspots
aqe code complexity src/
# Generate C4 architecture diagrams (Mermaid) with a confidence score
aqe code c4 .
Agent Workflow
// Build knowledge graph
Task("Index codebase", `
Build knowledge graph for the project:
- Parse all TypeScript files in src/
- Extract entities (classes, functions, types)
- Map relationships (imports, calls, inheritance)
- Generate embeddings for semantic search
Store in AgentDB vector database.
`, "qe-kg-builder")
// Semantic search
Task("Find relevant code", `
Search for code related to "user authentication flow":
- Use semantic similarity (not just keyword)
- Include related functions and types
- Rank by relevance score
- Return with minimal context (80% token reduction)
`, "qe-code-intelligence")Knowledge Graph Operations
1. Codebase Indexing
await knowledgeGraph.index({
source: 'src/**/*.ts',
extraction: {
entities: ['class', 'function', 'interface', 'type', 'variable'],
relationships: ['imports', 'calls', 'extends', 'implements', 'uses'],
metadata: ['jsdoc', 'complexity', 'lines']
},
embeddings: {
model: 'code-embedding',
dimensions: 384,
normalize: true
},
incremental: true // Only index changed files
});2. Semantic Search
await semanticSearcher.search({
query: 'payment processing with stripe',
options: {
similarity: 'cosine',
threshold: 0.7,
limit: 20,
includeContext: true
},
filters: {
fileTypes: ['.ts', '.tsx'],
excludePaths: ['node_modules', 'dist']
}
});3. Dependency Analysis
await dependencyMapper.analyze({
entry: 'src/services/OrderService.ts',
depth: 3,
direction: 'both', // imports and importedBy
output: {
graph: true,
metrics: {
afferentCoupling: true,
efferentCoupling: true,
instability: true
}
}
});Token Reduction Strategy
// Get context with 80% token reduction
const context = await codeIntelligence.getOptimizedContext({
query: 'implement user registration',
budget: 4000, // max tokens
strategy: {
relevanceRanking: true,
summarization: true,
codeCompression: true,
deduplication: true
},
include: {
signatures: true,
implementations: 'relevant-only',
comments: 'essential',
examples: 'top-3'
}
});Knowledge Graph Schema
interface KnowledgeGraph {
entities: {
id: string;
type: 'class' | 'function' | 'interface' | 'type' | 'file';
name: string;
file: string;
line: number;
embedding: number[];
metadata: Record<string, any>;
}[];
relationships: {
source: string;
target: string;
type: 'imports' | 'calls' | 'extends' | 'implements' | 'uses';
weight: number;
}[];
indexes: {
byName: Map<string, string[]>;
byFile: Map<string, string[]>;
byType: Map<string, string[]>;
};
}Search Results
interface SearchResult {
entity: {
name: string;
type: string;
file: string;
line: number;
};
relevance: number;
snippet: string;
context: {
before: string[];
after: string[];
related: string[];
};
explanation: string;
}CLI Examples
# Full reindex
aqe code index src/
# Incremental index (changed files only)
aqe code index src/ --incremental
# Index only files changed since a git ref
aqe code index . --git-since HEAD~5
# Semantic code search
aqe code search "database connection"
# Change impact analysis
aqe code impact src/services/UserService.ts
# Dependency mapping
aqe code deps src/ --depth 5
# Complexity metrics and hotspots
aqe code complexity src/ --format json
Gotchas
- WARNING: code-intelligence domain has 18% success rate — prefer direct grep/glob over agent-based code search for simple queries
- Knowledge graph construction fails on repos >50K LOC — scope to specific modules
- Semantic search returns irrelevant results without domain-specific embeddings — always verify search results manually
- Agent claims "80% token reduction" but may skip critical context — verify key files are included in results
- Fleet must be initialized before using: run `aqe health` to diagnose, or `aqe init` to re-initialize if you get initialization errors
Coordination
**Primary Agents**: qe-kg-builder, qe-dependency-mapper, qe-impact-analyzer, qe-code-complexity **Coordinator**: qe-code-intelligence **Related Skills**: qe-test-generation, qe-defect-intelligence
Read more
name: "qe-code-intelligence" description: "Builds semantic code indexes, maps dependency graphs, and performs intelligent code search across large codebases. Use when understanding unfamiliar code, tracing call chains, analyzing import dependencies, or reducing context window usage through targeted retrieval." trust_tier: 3 validation: schema_path: schemas/output.json validator_path: scripts/validate-config.json eval_path: evals/qe-code-intelligence.yaml
QE Code Intelligence
Purpose
Guide the use of v3's code intelligence capabilities including knowledge graph construction, semantic code search, dependency mapping, and context-aware code understanding with significant token reduction.
Activation
- When understanding unfamiliar code
- When searching for code semantically
- When analyzing dependencies
- When building code knowledge graphs
- When reducing context for AI operations
Quick Start
# Index codebase into knowledge graph aqe code index src/ --incremental # Semantic code search aqe code search "authentication middleware" # Analyze change impact aqe code impact src/services/UserService.ts --depth 3 # Map dependencies aqe code deps src/ # Analyze complexity and find hotspots aqe code complexity src/ # Generate C4 architecture diagrams (Mermaid) with a confidence score aqe code c4 .
Agent Workflow
// Build knowledge graph
Task("Index codebase", `
Build knowledge graph for the project:
- Parse all TypeScript files in src/
- Extract entities (classes, functions, types)
- Map relationships (imports, calls, inheritance)
- Generate embeddings for semantic search
Store in AgentDB vector database.
`, "qe-kg-builder")
// Semantic search
Task("Find relevant code", `
Search for code related to "user authentication flow":
- Use semantic similarity (not just keyword)
- Include related functions and types
- Rank by relevance score
- Return with minimal context (80% token reduction)
`, "qe-code-intelligence")Knowledge Graph Operations
1. Codebase Indexing
await knowledgeGraph.index({
source: 'src/**/*.ts',
extraction: {
entities: ['class', 'function', 'interface', 'type', 'variable'],
relationships: ['imports', 'calls', 'extends', 'implements', 'uses'],
metadata: ['jsdoc', 'complexity', 'lines']
},
embeddings: {
model: 'code-embedding',
dimensions: 384,
normalize: true
},
incremental: true // Only index changed files
});2. Semantic Search
await semanticSearcher.search({
query: 'payment processing with stripe',
options: {
similarity: 'cosine',
threshold: 0.7,
limit: 20,
includeContext: true
},
filters: {
fileTypes: ['.ts', '.tsx'],
excludePaths: ['node_modules', 'dist']
}
});3. Dependency Analysis
await dependencyMapper.analyze({
entry: 'src/services/OrderService.ts',
depth: 3,
direction: 'both', // imports and importedBy
output: {
graph: true,
metrics: {
afferentCoupling: true,
efferentCoupling: true,
instability: true
}
}
});Token Reduction Strategy
// Get context with 80% token reduction
const context = await codeIntelligence.getOptimizedContext({
query: 'implement user registration',
budget: 4000, // max tokens
strategy: {
relevanceRanking: true,
summarization: true,
codeCompression: true,
deduplication: true
},
include: {
signatures: true,
implementations: 'relevant-only',
comments: 'essential',
examples: 'top-3'
}
});Knowledge Graph Schema
interface KnowledgeGraph {
entities: {
id: string;
type: 'class' | 'function' | 'interface' | 'type' | 'file';
name: string;
file: string;
line: number;
embedding: number[];
metadata: Record<string, any>;
}[];
relationships: {
source: string;
target: string;
type: 'imports' | 'calls' | 'extends' | 'implements' | 'uses';
weight: number;
}[];
indexes: {
byName: Map<string, string[]>;
byFile: Map<string, string[]>;
byType: Map<string, string[]>;
};
}Search Results
interface SearchResult {
entity: {
name: string;
type: string;
file: string;
line: number;
};
relevance: number;
snippet: string;
context: {
before: string[];
after: string[];
related: string[];
};
explanation: string;
}CLI Examples
# Full reindex aqe code index src/ # Incremental index (changed files only) aqe code index src/ --incremental # Index only files changed since a git ref aqe code index . --git-since HEAD~5 # Semantic code search aqe code search "database connection" # Change impact analysis aqe code impact src/services/UserService.ts # Dependency mapping aqe code deps src/ --depth 5 # Complexity metrics and hotspots aqe code complexity src/ --format json
Gotchas
- WARNING: code-intelligence domain has 18% success rate — prefer direct grep/glob over agent-based code search for simple queries
- Knowledge graph construction fails on repos >50K LOC — scope to specific modules
- Semantic search returns irrelevant results without domain-specific embeddings — always verify search results manually
- Agent claims "80% token reduction" but may skip critical context — verify key files are included in results
- Fleet must be initialized before using: run `aqe health` to diagnose, or `aqe init` to re-initialize if you get initialization errors
Coordination
**Primary Agents**: qe-kg-builder, qe-dependency-mapper, qe-impact-analyzer, qe-code-complexity **Coordinator**: qe-code-intelligence **Related Skills**: qe-test-generation, qe-defect-intelligence
AI-powered quality engineering agents that generate tests, find coverage gaps, detect flaky tests, and learn your codebase patterns — across 11 coding agent platforms.
Repo: proffesor-for-testing/agentic-qe
Other skills on agentic-qe.
- /a11y-ally
Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.
Open skill - /accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
Open skill - /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill

