pykx

pykx is a skill for Claude Code from KxSystems/kx-skills. It costs 55 tokens per session (2,158 once invoked), scanned A, original, Apache-2.0.

A guide to KDB-X Python, the Python interface for kdb+ and q, a database and language commonly used for time-series data.

In plain words
What is it for?
Use it for Python-to-q integration, table queries, database management, inter-process connections, and troubleshooting.
Why use it?
It helps avoid errors when converting data, writing queries, connecting to databases, or choosing between licensed and unlicensed modes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the pykx-knowledge plugin — 1 skill shipped together

Good fit Use it for Python-to-q integration, table queries, database management, inter-process connections, and troubleshooting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kxsystems/kx-skills/pykx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KxSystems/kx-skills --skill pykx
Clone the repo
git clone --depth 1 https://github.com/KxSystems/kx-skills

Made for: Claude Code.

Or install pykx-knowledge, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pykx

README.md
[![agentmods](https://agentmods.dev/badge/skills/kxsystems/kx-skills/pykx/github.svg)](https://agentmods.dev/skills/kxsystems/kx-skills/pykx)
Your own site
<a href="https://agentmods.dev/skills/kxsystems/kx-skills/pykx"><img src="https://agentmods.dev/badge/skills/kxsystems/kx-skills/pykx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pykx

Your own site · 80×15
<a href="https://agentmods.dev/skills/kxsystems/kx-skills/pykx"><img src="https://agentmods.dev/badge/skills/kxsystems/kx-skills/pykx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.02158
Opus 5 $0.00028 $0.01079
Sonnet 5 $0.00011 $0.00432
Haiku 4.5 $0.00006 $0.00216

Measured 10d ago against content hash 9e42c9912a7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

pykx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pykx-knowledge/skills/pykx/SKILL.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

KDB-X Python

KDB-X Python is the Python-first interface to kdb+ and q. import pykx as kx

For full Column methods, DB API, IPC details, type mapping: see reference.md

Critical Patterns (Common Mistakes)

Column API for WHERE: Use Operators, Not Strings

# CORRECT: kx.Column with Python operators
table.select(where=kx.Column('price') > 100)
table.select(where=(kx.Column('sym') == 'AAPL') & (kx.Column('price') > 150))

# WRONG — string-based where does NOT work
table.select(where='price > 100')         # WRONG!
table.select(where='sym = `AAPL')         # WRONG!

Combining WHERE Conditions: Use & | ~ (Not and/or/not)

# CORRECT: bitwise operators with parentheses
where=(kx.Column('sym') == 'AAPL') & (kx.Column('price') > 100)   # AND
where=(kx.Column('sym') == 'AAPL') | (kx.Column('sym') == 'GOOG') # OR
where=~(kx.Column('size') < 100)                                   # NOT

# WRONG — Python keywords don't work with Column objects
where=kx.Column('sym') == 'AAPL' and kx.Column('price') > 100     # WRONG!

RawQConnection: Async + Queue Then poll_send/poll_recv

# CORRECT: async construction, queue query, then poll_send/poll_recv
q = await kx.RawQConnection(host='localhost', port=5000)
q('select from trades')          # Queue the query (not sent yet)
q.poll_send()                    # Send queued queries
result = q.poll_recv()           # Receive response

# WRONG — poll_send does NOT take a query string
q.poll_send('select from trades')   # WRONG! poll_send takes amount, not query
# WRONG — RawQConnection requires async construction
with kx.RawQConnection(...) as q:   # WRONG! use await, not sync with

Creating pykx Objects

qlist = kx.toq([1, 2, 3])                      # LongVector (auto)
qlist = kx.toq([1, 2, 3], kx.FloatVector)      # Explicit type
qtable = kx.toq(df)                             # DataFrame -> Table
kx.random.random(10, 100.0)                     # 10 random floats 0-100

Read the full file on GitHub · 227 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 227 lines · 55 tokens per session scan A 9e42c9912a7c

Subscribe to this mod's changes

pykx is a skill published in the GitHub repository KxSystems/kx-skills (16 stars, last pushed 7d ago), licensed Apache-2.0. It adds 55 tokens to every session and 2,158 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

adding-personhog-rpc

Guide for adding a new RPC to personhog-replica and personhog-router. Covers eligibility checks, proto definition, code generation for Python and Node.js clients, Rust implementation (storage trait, postgres queries, service handler, router wiring), and index compatibility validation. Use when adding a new gRPC…

PostHog/posthog · 88 tokens

azure-cosmos-db-py

Build Azure Cosmos DB NoSQL services with Python/FastAPI following production-grade patterns. Use when implementing database client setup with dual auth (DefaultAzureCredential + emulator), service...

benjaminasterA/antigravity-awesome-skills · 42 tokens

azure-cosmos-py

Client library for Azure Cosmos DB NoSQL API — globally distributed, multi-model database.

benjaminasterA/antigravity-awesome-skills · 0 tokens

azure-data-tables-py

NoSQL key-value store for structured data (Azure Storage Tables or Cosmos DB Table API).

benjaminasterA/antigravity-awesome-skills · 0 tokens

neo4j-driver-python-skill

Neo4j Python Driver v6 — driver lifecycle, executequery, managed and explicit transactions, async (AsyncGraphDatabase), result handling, data type mapping, error handling, UNWIND batching, connection pool tuning, and causal consistency. Use when writing Python code that connects to Neo4j via GraphDatabase.driver…

neo4j-contrib/neo4j-skills · 186 tokens

alembic

Manage database migrations with Alembic. Use when a user asks to version database schemas, create migration scripts, handle schema changes in production, or manage SQLAlchemy model migrations.

TerminalSkills/skills · 39 tokens