branch-search

Indexes and searches Git branches using ContextHub OCXP code intelligence.

Updated May 12, 2026
One-click install
npx skills add https://github.com/contexthub-md/marketplace --skill branch-search-contexthub-md
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-search
Source: https://github.com/contexthub-md/marketplace/tree/main/contexthub/skills/branch-search
Command: npx skills add https://github.com/contexthub-md/marketplace --skill branch-search-contexthub-md

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that exists only on a feature branch is invisible to tools indexed against main, making it hard to search, review, or understand branch-specific changes before merging. ## Core Features & Use Cases - Branch Import & Indexing: Downloads branch code from GitHub, registers it, and triggers an OCXP delta index on top of the main branch graph. - Branch-Scoped Search: Runs exact grep and semantic search scoped to a branch, with branch results taking priority over main. - Branch Overview: Reports languages, file counts, entity totals, and module structure so you can see how the branch differs from main. - Use Case: Before reviewing a pull request for feat/auth, index the branch and grep for "authentication middleware" to find every branch-specific implementation without checking out the code locally. ## Quick Start Ask the assistant to index and search the branch feat/auth for authentication middleware using ContextHub.

Frequently Asked Questions about branch-search

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

FAQPage Schema
How do I search code on a specific Git branch?

Provide the branch name and an optional query, and the skill imports the branch, triggers an OCXP delta index, then runs ch_ocxp_grep for exact matches and ch_ocxp_search for semantic matches scoped to that branch.

How do I index a Git branch for code intelligence?

Call ch_import_repo with the GitHub URL and branch name to download the code, then ch_trigger_index to build a delta index on top of the main branch graph, and finally ch_reload_index so the OCXP engine picks it up.

Does branch search work without an active ContextHub project?

No. An active project with at least one indexed repository is required. If you receive NO_PROJECT or OCXP_UNAVAILABLE errors, run the connect skill first to set up the workspace and project.

Why does branch indexing fail with no repos have branch error?

This error means the branch code has not been downloaded yet. Go back to the import step and call ch_import_repo with the GitHub URL and branch name before triggering the index.

What is the difference between branch grep and branch semantic search?

Branch grep returns exact text matches showing the branch version of modified files and main's version of unchanged files. Semantic search overlays branch embeddings on main embeddings, with branch results taking priority.