From codescope
Executes raw SurrealQL queries on the code knowledge graph to analyze functions, structs, call graphs, imports, and file metrics. Use for advanced queries or custom reports beyond standard tools.
npx claudepluginhub onur-gokyildiz-bhi/codescope --plugin codescopeThis skill uses the workspace's default tool permissions.
Execute a custom SurrealQL query using the `raw_query` MCP tool.
Queries codebase knowledge graphs to search functions, trace callers/callees, list file entities, analyze impact, and run SurrealQL. Use for code structure, dependencies, and relationships.
Explores codebase structure via codebase-memory-mcp SQLite index with queries for function callers/callees, symbols, hierarchies when index exists; prefers over grep.
Queries code graph database via Bash to find callers, callees, dependencies, serializers, and associations. Use proactively after reading files, searching code, or assessing change impacts.
Share bugs, ideas, or general feedback.
Execute a custom SurrealQL query using the raw_query MCP tool.
Query: $ARGUMENTS
function is a reserved word — always use backticks: `function`string::contains(string::lowercase(name), "pattern")-- All functions
SELECT name, file_path FROM `function` ORDER BY name
-- Largest functions by line count
SELECT name, file_path, (end_line - start_line) AS lines FROM `function` ORDER BY lines DESC LIMIT 10
-- All structs
SELECT name, file_path FROM class WHERE kind = "Struct"
-- Functions in a specific file
SELECT name, start_line FROM `function` WHERE file_path CONTAINS "main"
-- Call graph for a function
SELECT ->calls->`function`.name AS calls FROM `function` WHERE name = "main"
-- Most imported modules
SELECT name, count() AS usage FROM import_decl GROUP BY name ORDER BY usage DESC LIMIT 10
-- Files with most functions
SELECT file_path, count() AS fn_count FROM `function` GROUP BY file_path ORDER BY fn_count DESC LIMIT 10
Display results as a formatted table. Explain the results briefly.
See references/SURREALQL.md for the complete syntax guide including graph traversal, anti-patterns, and parameterized queries.