Agent skill · Testing & QA

query-decomposition

Query decomposition for multi-concept retrieval. Use when handling complex queries spanning multiple topics, implementing multi-hop retrieval, or improving coverage for compound questions.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill query-decomposition --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.0.0
Declared author: SkillForge
Path: skills/ai-llm/query-decomposition/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Query Decomposition Break complex queries into independent concepts for parallel retrieval and fusion. ## Overview - Complex queries spanning multiple topics or concepts - Multi-hop questions requiring chained reasoning - Queries where single retrieval misses relevant documents - Improving recall for compound questions Break complex queries into independent concepts for parallel retrieval and fusion. ## The Problem Complex queries span multiple topics that may not co-occur in single documents: ``` Query: "How do chunking strategies affect reranking in RAG?" → Single search may miss docs about chunking OR reranking → Poor coverage across all concepts ``` ## The Solution Decompose into independent concepts, retrieve separately, then fuse: ``` Query: "How do chunking strategies affect reranking in RAG?" → Concepts: ["chunking strategies", "reranking methods", "RAG pipeline"] → Search each concept independently → Fuse results with Reciprocal Rank Fusion (RRF) → Full coverage across all topics ``` ## Implementation ### 1. Heuristic Detection (Fast Path) ```python MULTI_CONCEPT_INDICATORS = [ " vs ", " versus ", " compared to ", " or ", " and ", " with ", " affect ", " impact ", "diffe

What's inside
Steps it walks through
  1. Overview
  2. The Problem
  3. The Solution
  4. Implementation
  5. 1. Heuristic Detection (Fast Path)
  6. 2. LLM Decomposition
  7. 3. Parallel Retrieval + RRF Fusion
  8. Complete Service
  9. Combining with HyDE
  10. When to Decompose
  11. Performance Tips
  12. Related Skills
  13. Key Decisions
  14. References
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the query-decomposition skill do?

Query decomposition for multi-concept retrieval. Use when handling complex queries spanning multiple topics, implementing multi-hop retrieval, or improving coverage for compound questions.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill query-decomposition --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going