ccg-rag

Enable semantic code search across large repositories with tree-sitter chunking and knowledge graphs.

6|3|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/phuongrealmax/claude-code-guardian --skill ccg-rag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ccg-rag
Source: https://github.com/phuongrealmax/claude-code-guardian/tree/main/plugins/ccg-guardian/skills/ccg-rag
Command: npx skills add https://github.com/phuongrealmax/claude-code-guardian --skill ccg-rag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Navigating large or unfamiliar codebases to find specific functionalities or related patterns can be time-consuming and inefficient. This Skill provides intelligent, semantic search capabilities to quickly understand code and documentation, saving developers valuable time.

Core Features & Use Cases

  • Semantic Code Search: Find code by describing its functionality (e.g., "authentication middleware"), not just keywords, for more relevant results.
  • Pattern Search: Discover similar code implementations across your codebase (e.g., "functions similar to validateUser"), promoting consistency and reuse.
  • Documentation Search: Retrieve relevant documentation (e.g., "API documentation for payments") using natural language queries, centralizing knowledge access.
  • Knowledge Graph: Understand function call relationships, import/export dependencies, and type hierarchies, providing a deeper insight into codebase structure.
  • Use Case: Imagine joining a new project and needing to quickly understand the authentication flow. Use CCG-RAG to semantically query "user authentication login session" and instantly get relevant code files and documentation, saving days of manual exploration and onboarding time.

Quick Start

Find all code related to user authentication using CCG-RAG.

Frequently Asked Questions about ccg-rag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search code by functionality instead of just keywords?

Semantic code search lets you describe what code does rather than search for exact text. This Skill uses embeddings and language-aware chunking with tree-sitter to match queries like "authentication middleware" to relevant functions and files across your codebase, returning results by meaning instead of keyword overlap.

Can I understand unfamiliar codebases faster using semantic search?

Yes. This Skill builds a knowledge graph of function calls and dependencies, then maps your natural language queries to relevant code patterns and documentation. Joining a new project, you can query "user authentication login session" and instantly retrieve related files, documentation, and call hierarchies instead of manually exploring the repository.

What's the difference between semantic search and keyword search for code?

Keyword search matches exact terms; semantic search understands intent and functionality. This Skill implements hybrid search combining both approaches with embeddings, so a query about "validation logic" surfaces similar implementations across your codebase even if they use different function names or variable conventions.

How does this Skill handle large repositories with many files and dependencies?

It chunks code intelligently using tree-sitter for language awareness, indexes embeddings for semantic retrieval, and constructs a knowledge graph of function relationships and imports. This approach scales across large codebases by structuring search and dependency traversal hierarchically rather than linearly scanning all files.

Can I find similar code patterns across my entire codebase?

Yes. Pattern search discovers similar implementations of functions or logic throughout your repository. Query "functions similar to validateUser" to locate related validation patterns, promoting code consistency and enabling reuse of proven approaches across teams and modules.

Does this work for both code and documentation search?

Yes. This Skill performs semantic search across both code files and documentation. Query "API documentation for payments" to retrieve relevant technical docs and code examples together, centralizing knowledge access and reducing time spent switching between repositories and documentation sites.