code-mode

Instructions for generating and running GraphQL queries against a server’s defined data schema. GraphQL is a way to request specific data from an API; these instructions require checking the schema and policies before validation and execution.

In plain words
What is it for?
Finding the right data types and query patterns, validating a generated query, showing its approval explanation, and executing it after approval.
Why use it?
They provide a controlled process for complex data lookups, including an approval step before a query is run.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/paiml/rust-mcp-sdk/code-mode
Any agent
npx skills add paiml/rust-mcp-sdk --skill code-mode
Clone the repo
git clone --depth 1 https://github.com/paiml/rust-mcp-sdk

Made for: Claude Code, Codex.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00013 $0.00249
Opus 5 $0.00006 $0.00125
Sonnet 5 $0.00003 $0.00050
Haiku 4.5 $0.00001 $0.00025

Measured 2d ago against content hash 661238390392, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-mode 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 2d 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.

examples/skills/code-mode/SKILL.md · 31 lines

What it actually says

Code Mode

This server exposes validate_code and execute_code tools for running LLM-generated GraphQL queries with cryptographically signed approval tokens.

Before you generate a query

  1. Read skill://code-mode/references/schema.graphql for available types.
  2. Read skill://code-mode/references/examples.md for canonical patterns.
  3. Read skill://code-mode/references/policies.md for what's allowed.

Round-trip

  1. Generate a GraphQL query that satisfies the user's request.
  2. Call validate_code(code: "<your query>"). You'll get back an approval_token plus a human-readable explanation. Show the explanation to the user.
  3. After user approval, call execute_code(code, token). Any modification to code between validate and execute invalidates the token.

When NOT to use code mode

For simple lookups that match a curated tool (e.g. get_user_by_id), prefer that tool. Code mode is for the long tail of compositions that don't have dedicated tools.

Files

What ships with it

3 files 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. 2d ago First seen · 31 lines · 13 tokens per session scan A 661238390392

Subscribe to this mod's changes

code-mode is a skill published in the GitHub repository paiml/rust-mcp-sdk (53 stars, last pushed 2d ago), licensed MIT. It adds 13 tokens to every session and 249 once invoked, about $0.0001 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

wxjava-api-contributor

按 WxJava 的 Maven 多模块、Java 8、公共 API 兼容性和 TestNG 约定,为微信官方接口新增或维护 SDK 支持。适用于新增 Service API、请求响应 Bean、序列化、HTTP 实现、Starter 配置或回归测试时。.

binarywang/WxJava · 68 tokens

wxjava-module-selector

根据微信公众号、小程序、微信支付、企业微信、开放平台、视频号或微信小店、腾讯企点和微信智能对话等业务场景,为用户选择合适的 WxJava Maven 模块、BOM 和示例入口。适用于用户询问“该用哪个模块”、依赖坐标、产品边界或单/多账号 Starter 选择时。.

binarywang/WxJava · 86 tokens

wxjava-troubleshooter

排查 WxJava 在配置初始化、access token、签名验签、支付证书、回调通知、序列化、网络请求和多账号隔离方面的问题。适用于用户提供异常、日志、请求响应或“WxJava 为什么不能调用”的场景。.

binarywang/WxJava · 65 tokens

wxjava-upgrade-guide

规划 WxJava 的版本升级与迁移,检查 BOM、模块依赖、Java 版本、配置与公共 API 兼容性,并提供可回滚的验证步骤。适用于用户从旧版升级、切换依赖管理方式、处理兼容性告警或制定升级发布计划时。.

binarywang/WxJava · 72 tokens

azure-kusto-graph

Build and query Kusto graphs from natural language. Covers transient graphs (make-graph), persistent graph models/snapshots, pattern matching (graph-match), shortest paths, connected components, and graph-to-table export. Generates the edges-first thinking: define edges, define node lookups, union, make-graph. WHEN…

microsoft/skills · 131 tokens

azure-kusto-irql-graph

Apply IRQL graph functions to KQL or IRQL query results for Kusto Explorer visualization. Generates LiftToGraph mappings and composes GraphRenderView, GraphFoldByProperty, ExtractNode, EnrichNode, and EnrichGraph calls. Accepts a supplied query or limited basic natural-language source request; it is not a general…

microsoft/skills · 155 tokens