grepai-chunking

Configure code chunking size and overlap for GrepAI semantic search indexing.

Updated May 12, 2026
One-click install
npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill grepai-chunking-eduardtomasek
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grepai-chunking
Source: https://github.com/eduardtomasek/codex-dev-stack/tree/main/skills/.agents/grepai-chunking
Command: npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill grepai-chunking-eduardtomasek

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Semantic code search quality depends heavily on how source files are split into chunks before embedding. Poorly sized chunks produce fragmented results, lost context at function boundaries, or bloated indexes, and most users do not know how to tune these settings. ## Core Features & Use Cases - Chunk Parameter Tuning: Explains the size and overlap settings in .grepai/config.yaml and their effects on search precision, context retention, and index size. - Language and Codebase Recommendations: Provides concrete presets for verbose languages like Java, concise languages like Go and Python, and codebases ranging from microservices to monoliths. - Experimentation Workflow: Shows how to re-index after changes and compare search results before and after tuning. - Use Case: Your searches for "authentication middleware" return only fragments of functions. Use this Skill to increase chunk size to 768 tokens, re-index, and verify that complete functions now appear in results. ## Quick Start Ask the assistant to adjust the GrepAI chunking configuration in .grepai/config.yaml for your codebase and re-index the project.

Frequently Asked Questions about grepai-chunking

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

FAQPage Schema
How do I configure chunk size in GrepAI?▼

Edit the chunking section of .grepai/config.yaml and set the size parameter in tokens, with 512 as the balanced default. After changing the value, delete .grepai/index.gob and run grepai watch to re-index the project.

What chunk size should I use for Go or Python code?▼

For concise languages like Go and Python, the recommended setting is size 512 with overlap 50. Verbose languages like Java or C# benefit from size 768, while very concise languages like Rust work well with size 384.

Why are my GrepAI search results fragmented?▼

Fragmented results usually mean the chunk size is too small, splitting functions across chunks. Increase the size value, for example to 768, and raise overlap to preserve context at chunk boundaries, then re-index.

Does chunk overlap affect GrepAI index size?▼

Yes, larger overlap creates more chunks and a larger index. With size 512, raising overlap from 0 to 100 increases chunk count by roughly 20 percent, so reduce overlap or increase chunk size if index size is a concern.

How do I test new GrepAI chunking settings?▼

Save current search output with grepai search to a file, update the chunking config, delete .grepai/index.gob, and re-index with grepai watch. Run the same search again and diff the two result files to compare quality.