{
  "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": {
    "downloadMode": "redirect",
    "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",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "config.example.toml",
      "plugin.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/q-kdb-code-review",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "q-kdb-code-review",
        "body": "AI-powered code review for Q/kdb+ — catch bugs, performance issues, and security vulnerabilities in the most terse language in quantitative finance."
      },
      {
        "title": "What it does",
        "body": "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.\n\nCatches:\n\nType errors in implicit casts (e.g., mixing longs and floats in comparisons)\nRank errors from wrong argument counts in function calls\nUnescaped signals in protected evaluation\nMemory-inefficient queries (selecting all columns when only some are needed)\nMissing peach parallelism opportunities for embarrassingly parallel operations\nUnsafe eval/value usage on user-supplied strings (Q injection)\nUnlocked tables during concurrent inserts\nMissing `g# grouped attributes on high-cardinality join columns\nN-squared joins that should be aj (asof joins) or wj (window joins)\nRace conditions in timer callbacks (.z.ts)\nUnprotected IPC handlers (.z.pg, .z.ps) and exposed .z.pw\n\nStrictness modes:\n\nModeWhat 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\n\nIntelligent 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.\n\nBYOK (Bring Your Own Keys): Your provider API keys, your billing. Astrai routes to the best model among your configured providers."
      },
      {
        "title": "Setup",
        "body": "Get a free API key at as-trai.com\nSet your API key:\nexport ASTRAI_API_KEY=\"your_key_here\"\n\n\nOptionally add provider keys for BYOK routing:\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nexport OPENAI_API_KEY=\"sk-...\"\n\n\nRun /review-q on any .q file"
      },
      {
        "title": "Usage",
        "body": "/review-q                          Review current Q file\n/review-q --strict                 Strict mode: bugs + performance + style\n/review-q --focus security         Security mode: eval injection, IPC, .z.pw\n/review-q --file tick.q            Review a specific file"
      },
      {
        "title": "Example output",
        "body": "Reviewing tick.q (strict mode)...\nModel: claude-opus-4-6 via Astrai\n\nFound 3 issues:\n\n[CRITICAL] Line 12: Missing `s# attribute on time column\n  `trade` table uses `aj` but `time` column lacks sorted attribute.\n  Without `s#`, asof join scans linearly — O(n) instead of O(log n).\n  Fix: trade: `trade upsert update `s#time from trade\n\n[WARNING] Line 34: Using `each` where vector operation suffices\n  {x*y} each' (price;qty) can be replaced with price*qty\n  Vector multiply is ~100x faster than each-both.\n\n[INFO] Line 45: Consider `peach` for independent symbol processing\n  Processing each symbol sequentially. Since operations are independent,\n  `peach` would utilize all cores.\n  Fix: results: func peach syms\n\nSummary: 1 critical, 1 warning, 1 info. Focus on the missing sorted\nattribute — it will cause aj performance to degrade from microseconds\nto milliseconds at scale."
      },
      {
        "title": "Environment Variables",
        "body": "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"
      },
      {
        "title": "External Endpoints",
        "body": "EndpointPurposeas-trai.com/v1/chat/completionsAstrai inference router — routes Q review requests to the optimal model"
      },
      {
        "title": "Security & Privacy",
        "body": "No code storage: Your Q code is sent to the selected AI provider for inference and is not stored by Astrai.\nBYOK: 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.\nTransport: All communication uses HTTPS/TLS.\nNo telemetry: The skill does not send analytics or telemetry data. Only the review request goes to Astrai.\nLocal processing: File reading and result formatting happen entirely on your machine."
      },
      {
        "title": "Why Q needs specialized review",
        "body": "Q is unlike any mainstream programming language:\n\nExtreme terseness: A single line of Q can express what takes 20 lines in Python. This density makes bugs nearly invisible during manual review.\nImplicit 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.\n1000x 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.\nAdverb 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.\nMost 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."
      },
      {
        "title": "Pricing",
        "body": "Uses Astrai's inference routing. Your costs depend on the models selected:\n\nPlanRateIncludesFree$01,000 requests/dayPro$49/mo50,000 requests/day, priority routingBusiness$199/moUnlimited requests, dedicated support\n\nWith BYOK, you pay your provider directly at their rates. Astrai's routing is included in the plan price."
      }
    ],
    "body": "q-kdb-code-review\n\nAI-powered code review for Q/kdb+ — catch bugs, performance issues, and security vulnerabilities in the most terse language in quantitative finance.\n\nWhat it does\n\nReviews Q/kdb+ code with deep understanding of Q idioms, performance patterns, and common pitfalls. Built for quant developers, kdb+ DBAs, and trading infrastructure teams.\n\nCatches:\n\nType errors in implicit casts (e.g., mixing longs and floats in comparisons)\nRank errors from wrong argument counts in function calls\nUnescaped signals in protected evaluation\nMemory-inefficient queries (selecting all columns when only some are needed)\nMissing peach parallelism opportunities for embarrassingly parallel operations\nUnsafe eval/value usage on user-supplied strings (Q injection)\nUnlocked tables during concurrent inserts\nMissing `g# grouped attributes on high-cardinality join columns\nN-squared joins that should be aj (asof joins) or wj (window joins)\nRace conditions in timer callbacks (.z.ts)\nUnprotected IPC handlers (.z.pg, .z.ps) and exposed .z.pw\n\nStrictness modes:\n\nMode\tWhat it checks\nstandard\tBugs, correctness, type errors, join semantics, null handling\nstrict\tEverything in standard + performance (attributes, peach, vector ops) + style\nsecurity\tEverything in standard + injection via string eval, unprotected IPC handlers, exposed .z.pw, port exposure\n\nIntelligent 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.\n\nBYOK (Bring Your Own Keys): Your provider API keys, your billing. Astrai routes to the best model among your configured providers.\n\nSetup\nGet a free API key at as-trai.com\nSet your API key:\nexport ASTRAI_API_KEY=\"your_key_here\"\n\nOptionally add provider keys for BYOK routing:\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nexport OPENAI_API_KEY=\"sk-...\"\n\nRun /review-q on any .q file\nUsage\n/review-q                          Review current Q file\n/review-q --strict                 Strict mode: bugs + performance + style\n/review-q --focus security         Security mode: eval injection, IPC, .z.pw\n/review-q --file tick.q            Review a specific file\n\nExample output\nReviewing tick.q (strict mode)...\nModel: claude-opus-4-6 via Astrai\n\nFound 3 issues:\n\n[CRITICAL] Line 12: Missing `s# attribute on time column\n  `trade` table uses `aj` but `time` column lacks sorted attribute.\n  Without `s#`, asof join scans linearly — O(n) instead of O(log n).\n  Fix: trade: `trade upsert update `s#time from trade\n\n[WARNING] Line 34: Using `each` where vector operation suffices\n  {x*y} each' (price;qty) can be replaced with price*qty\n  Vector multiply is ~100x faster than each-both.\n\n[INFO] Line 45: Consider `peach` for independent symbol processing\n  Processing each symbol sequentially. Since operations are independent,\n  `peach` would utilize all cores.\n  Fix: results: func peach syms\n\nSummary: 1 critical, 1 warning, 1 info. Focus on the missing sorted\nattribute — it will cause aj performance to degrade from microseconds\nto milliseconds at scale.\n\nEnvironment Variables\nVariable\tRequired\tDescription\nASTRAI_API_KEY\tYes\tAPI key from as-trai.com\nANTHROPIC_API_KEY\tNo\tBYOK: Anthropic provider key\nOPENAI_API_KEY\tNo\tBYOK: OpenAI provider key\nGOOGLE_API_KEY\tNo\tBYOK: Google AI provider key\nDEEPSEEK_API_KEY\tNo\tBYOK: DeepSeek provider key\nMISTRAL_API_KEY\tNo\tBYOK: Mistral provider key\nGROQ_API_KEY\tNo\tBYOK: Groq provider key\nTOGETHER_API_KEY\tNo\tBYOK: Together AI provider key\nFIREWORKS_API_KEY\tNo\tBYOK: Fireworks AI provider key\nCOHERE_API_KEY\tNo\tBYOK: Cohere provider key\nPERPLEXITY_API_KEY\tNo\tBYOK: Perplexity provider key\nREVIEW_STRICTNESS\tNo\tDefault strictness: standard, strict, or security\nExternal Endpoints\nEndpoint\tPurpose\nas-trai.com/v1/chat/completions\tAstrai inference router — routes Q review requests to the optimal model\nSecurity & Privacy\nNo code storage: Your Q code is sent to the selected AI provider for inference and is not stored by Astrai.\nBYOK: 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.\nTransport: All communication uses HTTPS/TLS.\nNo telemetry: The skill does not send analytics or telemetry data. Only the review request goes to Astrai.\nLocal processing: File reading and result formatting happen entirely on your machine.\nWhy Q needs specialized review\n\nQ is unlike any mainstream programming language:\n\nExtreme terseness: A single line of Q can express what takes 20 lines in Python. This density makes bugs nearly invisible during manual review.\nImplicit 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.\n1000x 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.\nAdverb 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.\nMost 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.\nPricing\n\nUses Astrai's inference routing. Your costs depend on the models selected:\n\nPlan\tRate\tIncludes\nFree\t$0\t1,000 requests/day\nPro\t$49/mo\t50,000 requests/day, priority routing\nBusiness\t$199/mo\tUnlimited requests, dedicated support\n\nWith BYOK, you pay your provider directly at their rates. Astrai's routing is included in the plan price."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/beee003/q-kdb-code-review",
    "publisherUrl": "https://clawhub.ai/beee003/q-kdb-code-review",
    "owner": "beee003",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}