cqs-gc

Detect stale chunks and missing files in the code search index.

13|3|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/jamie8johnson/cqs --skill cqs-gc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cqs-gc
Source: https://github.com/jamie8johnson/cqs/tree/main/.claude/skills/cqs-gc
Command: npx skills add https://github.com/jamie8johnson/cqs --skill cqs-gc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and report index staleness for the code search tool by detecting stale chunks and missing files.

Core Features & Use Cases

  • Maintains index health by reporting staleness in the code-search index.
  • CLI maintenance workflow prunes deleted chunks, cleans orphan call graph entries, and rebuilds the HNSW index.
  • MCP version is read-only, suitable for non-destructive maintenance tasks.

Quick Start

Run the cqs gc command to prune deleted chunks, clean orphan call graph entries, and rebuild the HNSW index.

Frequently Asked Questions about cqs-gc

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

FAQPage Schema
How do I fix code-search index staleness when files are deleted or modified?

Code-search index staleness is identified by detecting stale chunks and missing files within your codebase. It occurs when indexed files are deleted or modified, requiring maintenance to prune orphaned call graph entries and rebuild the HNSW index.

How do I prune deleted chunks and clean orphan call graph entries in my code search index?

The CLI maintenance workflow prunes deleted chunks, cleans orphan call graph entries, and rebuilds the HNSW index. The MCP version operates as read-only, making it suitable for non-destructive maintenance tasks and reporting index health without modifying data.

Can I use the MCP version of the code search tool to rebuild the HNSW index?

No, the MCP version remains read-only and is suitable for non-destructive maintenance tasks like reporting staleness. You must use the CLI workflow to execute the cqs gc command for pruning chunks and rebuilding the HNSW index.

What is the best way to maintain code-search index health after large codebase updates?

The best way to maintain code-search index health after updates is running the cqs gc command. This CLI workflow enforces pruning of deleted chunks, cleans orphan call graph entries, and rebuilds the HNSW index to resolve detected staleness.

Why does my code search return results for files that have been deleted?

Code search returns deleted file results due to index staleness, where stale chunks and orphan call graph entries persist. Running the cqs gc command prunes these deleted chunks and cleans the orphan entries to resolve the issue.