# Query Builder

> Build and validate search query families — operator-aware variants tuned per intent (discovery, exact, technical, verification, contradiction…). Use whenever a topic needs more than one good query.

- Skill: `samraddhashrivastavatech/query-builder` (Agent Skill)
- Install (CLI): `npx skillmds@latest add samraddhashrivastavatech/query-builder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/samraddhashrivastavatech/query-builder/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: SAMRADDHASHRIVASTAVATECH (https://skillmd.com/u/samraddhashrivastavatech)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/samraddhashrivastavatech/query-builder

---


# Query builder

Design query families so a topic is covered from several angles, then validate
the queries before execution.

## When to use

- A single query is unlikely to surface the full picture.
- You know the intent (find exact text, technical docs, contradictions,
  historical record) but not the best phrasing.
- You want site/filetype-constrained variants of a topic.

## Tools used

- `build_search_query` — produce a family (`n` variants) from a `topic`, with an
  optional `family` intent, `target` type, `site`, and `filetype`.
- `validate_search_query` — check a query for balanced quotes/operators and
  structural validity before burning a search call.

## Query families

`discovery` · `exact` · `technical` · `implementation` · `source_specific` ·
`verification` · `contradiction` · `historical` · `current` · `alternative`

## Workflow

1. Fix the topic; pick the family(ies) that match the research intent.
2. `build_search_query` → review variants, keep the strong ones.
3. `validate_search_query` each survivor; drop invalid forms.
4. Hand validated queries to `web-search` / `search-operators`.

## Input schema

```json
{ "topic": "str", "family": "str", "n": "int", "target": "str", "site": "str", "filetype": "str" }
```

## Output schema

```json
{ "queries": "list[str]" }
```

## Security

Queries are neutral; what they retrieve is not. Route retrieved content through
`source-analysis` before weighing it.

## Related skills

`search-operators`, `query-expansion`, `query-refinement`, `web-search`
