
Grepai Search Boosting
Tune GrepAI YAML boost rules so agent code search ranks src/ production files above tests, docs, and vendor trees.
Install
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-search-boostingWhat is this skill?
- Explains score math: bonuses multiply scores up (e.g. +10% on /src/), penalties cut them (e.g. -50% on /tests/)
- Provides basic and full .grepai/config.yaml examples with enabled toggle
- Covers penalties for tests (__tests__, _test., .spec., .test.), docs, and vendor paths
- Documents bonuses for prioritizing important directories like /src/
- Use when customizing result ranking for production-focused agent workflows
Adoption & trust: 545 installs on skills.sh; 17 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Search ranking for agent retrieval is part of building the dev environment and agent stack—not something you fix on launch day. Agent-tooling is the shelf because boosting configures how GrepAI ranks paths during semantic or hybrid codebase search for coding agents.
Common Questions / FAQ
Is Grepai Search Boosting safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Grepai Search Boosting
# GrepAI Search Boosting This skill covers configuring score boosting to prioritize relevant code paths and deprioritize tests, docs, and vendor code. ## When to Use This Skill - Prioritizing source code over tests - Penalizing vendor/third-party code - Boosting important directories - Customizing result ranking ## What is Boosting? Boosting modifies search scores based on file paths: ``` Original score: 0.85 (src/auth.go) Bonus (+10%): 0.935 Original score: 0.85 (tests/auth_test.go) Penalty (-50%): 0.425 ``` This ensures production code ranks higher than tests with similar content. ## Configuration ### Basic Configuration ```yaml # .grepai/config.yaml search: boost: enabled: true penalties: - pattern: /tests/ factor: 0.5 bonuses: - pattern: /src/ factor: 1.1 ``` ### Full Configuration ```yaml search: boost: enabled: true # Reduce scores (factor < 1.0) penalties: # Test files - pattern: /tests/ factor: 0.5 - pattern: /__tests__/ factor: 0.5 - pattern: _test. factor: 0.5 - pattern: .spec. factor: 0.5 - pattern: .test. factor: 0.5 # Documentation - pattern: /docs/ factor: 0.6 - pattern: /documentation/ factor: 0.6 # Vendor/third-party - pattern: /vendor/ factor: 0.3 - pattern: /node_modules/ factor: 0.3 - pattern: /third_party/ factor: 0.3 # Generated code - pattern: /generated/ factor: 0.4 - pattern: .gen. factor: 0.4 - pattern: .pb.go factor: 0.4 # Examples and samples - pattern: /examples/ factor: 0.7 - pattern: /samples/ factor: 0.7 # Increase scores (factor > 1.0) bonuses: # Core source code - pattern: /src/ factor: 1.1 - pattern: /lib/ factor: 1.1 - pattern: /app/ factor: 1.1 - pattern: /core/ factor: 1.2 - pattern: /internal/ factor: 1.1 # Important directories - pattern: /services/ factor: 1.1 - pattern: /handlers/ factor: 1.1 - pattern: /controllers/ factor: 1.1 ``` ## How Factors Work | Factor | Effect | Use Case | |--------|--------|----------| | 0.3 | 70% reduction | Strong penalty (vendor) | | 0.5 | 50% reduction | Moderate penalty (tests) | | 0.7 | 30% reduction | Mild penalty (examples) | | 1.0 | No change | Neutral | | 1.1 | 10% increase | Mild boost (src) | | 1.2 | 20% increase | Moderate boost (core) | | 1.5 | 50% increase | Strong boost | ## Pattern Matching Patterns match against the full file path: ``` /project/src/auth/middleware.go ^^^^ Matches "/src/" pattern ``` ### Pattern Types | Pattern | Matches | Doesn't Match | |---------|---------|---------------| | `/tests/` | `src/tests/auth.go` | `tests.go` | | `_test.` | `auth_test.go` | `test_auth.go` | | `.spec.` | `auth.spec.ts` | `spec/auth.ts` | | `/src/` | `project/src/main.go` | `resource/file.go` | ## Effect on Rankings ### Without Boosting ``` Score: 0.85 | tests/auth_test.go:10-30 Score: 0.82 | src/auth/middleware.go:15-45 Score: 0.80 | src/auth/jwt.go:23-55 ``` ### With Boosting ```yaml penalties: - pattern: /tests/ factor: 0.5 bonuses: - pattern: /src/ factor: 1.1 ``` ``` Score: 0.90 | src/auth/middleware.go:15-45 (0.82 × 1.1) Score: 0.88 | src/auth/jwt.go:23-55 (0.80 × 1.1) Score: 0.43 | tests/auth_test.go:10-30 (0.85 × 0.5) ``` ## Common Configurations ### Standard (Recommended) ```yaml search: boost: enabled: true penalties: - pattern: /tests/ factor: 0.5 - pattern: _test. factor: 0.5 - pattern: .spec. factor: 0.5 - pattern: /vendor/