# 09-query-engine

The 09-query-engine prompt guides an architecture review of QueryEngine and a basic conversation test against the Anthropic API. Use it to trace requests, streaming events, and tool calls.

- prompt · `type=prompt` · Claude Code, ChatGPT · ★ 3444 repo stars
- Author: codeaashu
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/09-query-engine.md
- Updated: 2026-10-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/09-query-engine

## What it does

The task starts with `src/QueryEngine.ts`: map its classes and public methods, then follow a user message through the API call and tool loop. It also asks you to inspect `src/services/api/client.ts` and `src/services/api/claude.ts` to trace request parameters and streaming.

Next, review the dependencies and work around optional services where needed. The prompt calls for a standalone `scripts/test-query.ts` test, outside the REPL, that prints streamed text, handles tool calls, and records what remains broken. A working API check requires `ANTHROPIC_API_KEY`; without it, the test cannot make the requested Anthropic call.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/09-query-engine.md`

### ChatGPT

**How to use**
- Paste the text at the start of a chat or into project instructions

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/09-query-engine.md

## When to use it
- map the `QueryEngine` class and its public API
- trace requests from the engine to Anthropic
- inspect streaming events and tool execution
- create a minimal query test outside the REPL
- document working features and remaining blockers

## Example prompts
- Map the classes, methods, and message flow in `src/QueryEngine.ts`.
- Trace a request from `QueryEngine` through the Anthropic API wrapper and list its parameters.
- Create `scripts/test-query.ts` and check streamed output and tool calls.

## Similar
- [claude-sdk-integration-patterns](https://affpapa.org/en/nevibecode/skills/claude-sdk-integration-patterns.md) — skill · 437 installs
- [tanstack-query](https://affpapa.org/en/nevibecode/skills/tanstack-query.md) — skill · 10500 installs
- [weather-query](https://affpapa.org/en/nevibecode/skills/weather-query.md) — skill · 828 installs
- [streaming](https://affpapa.org/en/nevibecode/skills/streaming.md) — skill · 6700 installs
- [grpc-development](https://affpapa.org/en/nevibecode/skills/grpc-development.md) — skill · 802 installs
- [openrouter-analytics-query](https://affpapa.org/en/nevibecode/skills/openrouter-analytics-query.md) — skill · 355 installs

From the same set: [codeaashu/claude-code](https://affpapa.org/en/nevibecode/by/codeaashu/claude-code.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
