# Send Q Kdb Code Review to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "q-kdb-code-review",
    "name": "Q Kdb Code Review",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/beee003/q-kdb-code-review",
    "canonicalUrl": "https://clawhub.ai/beee003/q-kdb-code-review",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/q-kdb-code-review",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=q-kdb-code-review",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "config.example.toml",
      "plugin.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "q-kdb-code-review",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T07:58:05.105Z",
      "expiresAt": "2026-05-10T07:58:05.105Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=q-kdb-code-review",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=q-kdb-code-review",
        "contentDisposition": "attachment; filename=\"q-kdb-code-review-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "q-kdb-code-review"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/q-kdb-code-review"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/q-kdb-code-review",
    "downloadUrl": "https://openagent3.xyz/downloads/q-kdb-code-review",
    "agentUrl": "https://openagent3.xyz/skills/q-kdb-code-review/agent",
    "manifestUrl": "https://openagent3.xyz/skills/q-kdb-code-review/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/q-kdb-code-review/agent.md"
  }
}
```
## Documentation

### q-kdb-code-review

AI-powered code review for Q/kdb+ — catch bugs, performance issues, and security vulnerabilities in the most terse language in quantitative finance.

### What it does

Reviews Q/kdb+ code with deep understanding of Q idioms, performance patterns, and common pitfalls. Built for quant developers, kdb+ DBAs, and trading infrastructure teams.

Catches:

Type errors in implicit casts (e.g., mixing longs and floats in comparisons)
Rank errors from wrong argument counts in function calls
Unescaped signals in protected evaluation
Memory-inefficient queries (selecting all columns when only some are needed)
Missing peach parallelism opportunities for embarrassingly parallel operations
Unsafe eval/value usage on user-supplied strings (Q injection)
Unlocked tables during concurrent inserts
Missing \`g# grouped attributes on high-cardinality join columns
N-squared joins that should be aj (asof joins) or wj (window joins)
Race conditions in timer callbacks (.z.ts)
Unprotected IPC handlers (.z.pg, .z.ps) and exposed .z.pw

Strictness modes:

ModeWhat it checksstandardBugs, correctness, type errors, join semantics, null handlingstrictEverything in standard + performance (attributes, peach, vector ops) + stylesecurityEverything in standard + injection via string eval, unprotected IPC handlers, exposed .z.pw, port exposure

Intelligent routing via Astrai: Complex algorithmic Q (custom signal generation, real-time CEP) routes to powerful models. Simple table operations (selects, inserts, schema definitions) route to cheaper, faster models. You get the best result at the lowest cost.

BYOK (Bring Your Own Keys): Your provider API keys, your billing. Astrai routes to the best model among your configured providers.

### Setup

Get a free API key at as-trai.com
Set your API key:
export ASTRAI_API_KEY="your_key_here"


Optionally add provider keys for BYOK routing:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."


Run /review-q on any .q file

### Usage

/review-q                          Review current Q file
/review-q --strict                 Strict mode: bugs + performance + style
/review-q --focus security         Security mode: eval injection, IPC, .z.pw
/review-q --file tick.q            Review a specific file

### Example output

Reviewing tick.q (strict mode)...
Model: claude-opus-4-6 via Astrai

Found 3 issues:

[CRITICAL] Line 12: Missing \`s# attribute on time column
  \`trade\` table uses \`aj\` but \`time\` column lacks sorted attribute.
  Without \`s#\`, asof join scans linearly — O(n) instead of O(log n).
  Fix: trade: \`trade upsert update \`s#time from trade

[WARNING] Line 34: Using \`each\` where vector operation suffices
  {x*y} each' (price;qty) can be replaced with price*qty
  Vector multiply is ~100x faster than each-both.

[INFO] Line 45: Consider \`peach\` for independent symbol processing
  Processing each symbol sequentially. Since operations are independent,
  \`peach\` would utilize all cores.
  Fix: results: func peach syms

Summary: 1 critical, 1 warning, 1 info. Focus on the missing sorted
attribute — it will cause aj performance to degrade from microseconds
to milliseconds at scale.

### Environment Variables

VariableRequiredDescriptionASTRAI_API_KEYYesAPI key from as-trai.comANTHROPIC_API_KEYNoBYOK: Anthropic provider keyOPENAI_API_KEYNoBYOK: OpenAI provider keyGOOGLE_API_KEYNoBYOK: Google AI provider keyDEEPSEEK_API_KEYNoBYOK: DeepSeek provider keyMISTRAL_API_KEYNoBYOK: Mistral provider keyGROQ_API_KEYNoBYOK: Groq provider keyTOGETHER_API_KEYNoBYOK: Together AI provider keyFIREWORKS_API_KEYNoBYOK: Fireworks AI provider keyCOHERE_API_KEYNoBYOK: Cohere provider keyPERPLEXITY_API_KEYNoBYOK: Perplexity provider keyREVIEW_STRICTNESSNoDefault strictness: standard, strict, or security

### External Endpoints

EndpointPurposeas-trai.com/v1/chat/completionsAstrai inference router — routes Q review requests to the optimal model

### Security & Privacy

No code storage: Your Q code is sent to the selected AI provider for inference and is not stored by Astrai.
BYOK: When you provide your own provider keys, requests go directly through Astrai's router to your provider account. Astrai does not store or log your provider keys beyond the request lifecycle.
Transport: All communication uses HTTPS/TLS.
No telemetry: The skill does not send analytics or telemetry data. Only the review request goes to Astrai.
Local processing: File reading and result formatting happen entirely on your machine.

### Why Q needs specialized review

Q is unlike any mainstream programming language:

Extreme terseness: A single line of Q can express what takes 20 lines in Python. This density makes bugs nearly invisible during manual review.
Implicit type coercion: Q silently coerces types in many operations. Comparing a long to a float, or joining on mismatched key types, can produce silently wrong results.
1000x performance gaps: The difference between idiomatic and naive Q is not 2x or 10x — it is often 1000x. Missing a sorted attribute on a time column turns an O(log n) asof join into O(n). Using each instead of vector operations adds interpreter overhead per element.
Adverb complexity: Q's adverbs (/, \\, ', /:, \\:, ':) modify function behavior in powerful but subtle ways. +/ is reduce-add, +\\ is scan-add, +' is each-both-add. Confusing these causes wrong results, not errors.
Most AI models struggle: Without Q-specific prompting, general-purpose AI models treat Q code as line noise. This skill provides detailed system prompts that teach the model Q semantics, kdb+ internals, and finance-domain patterns.

### Pricing

Uses Astrai's inference routing. Your costs depend on the models selected:

PlanRateIncludesFree$01,000 requests/dayPro$49/mo50,000 requests/day, priority routingBusiness$199/moUnlimited requests, dedicated support

With BYOK, you pay your provider directly at their rates. Astrai's routing is included in the plan price.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: beee003
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T07:58:05.105Z
- Expires at: 2026-05-10T07:58:05.105Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/q-kdb-code-review)
- [Send to Agent page](https://openagent3.xyz/skills/q-kdb-code-review/agent)
- [JSON manifest](https://openagent3.xyz/skills/q-kdb-code-review/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/q-kdb-code-review/agent.md)
- [Download page](https://openagent3.xyz/downloads/q-kdb-code-review)