
accelerate-python-resolvers
Make Chalk Python resolvers statically accelerable. Use when the user asks to accelerate resolvers, fix static-acceleration diagnostics, check why a resolver "can't be accelerated", or speed up Python feature pipelines in a Chalk project (a repo with chalk.yaml/chalk.yml).
- Installs
- 921
- Last 24h
- +54
- Trending rank
- #3194
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/chalk-ai/chalk-ai-plugins --skill accelerate-python-resolvers- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads accelerate-python-resolvers automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Accelerate Chalk Python resolvers
Chalk's static accelerator translates Python resolver functions into native columnar expressions via symbolic execution of the function's bytecode. Accelerated resolvers run orders of magnitude faster than interpreted Python. A resolver can only be accelerated when every operation it performs can be proven safe and is supported by the accelerator.
This skill drives a feedback loop against the Chalk static accelerator service: get diagnostics, rewrite the offending resolvers, repeat until clean.
The loop
-
From anywhere inside the Chalk project (the directory tree containing
chalk.yamlorchalk.yml), run:python "${CLAUDE_PLUGIN_ROOT}/bin/accelerator-diagnostics.py"Use the same Python environment the project uses (it must be able to
import chalk). If the project uses a venv, activate it first or invoke the venv'spythonexplicitly. -
Read the diagnostics. Each line is
file:line: severity: messageand the message explains exactly which operation blocked acceleration, e.g.:'int.__add__(int)' is only supported for non-null values; guard this 'option<int>' argument against None— a nullable input (annotatedint | None/Optional[int]on the feature class) flows into an operation that requires a non-null value.reference to possibly-unbound name 'uuid'— the resolver uses an import or helper the accelerator cannot capture (an unsupported library), or a local variable that is not assigned on every path.
-
Rewrite the resolver to remove the failure point (see recipes below). Preserve the resolver's signature, output feature, and Python semantics — the accelerated version must compute the same values the Python version would.
-
Re-run the script. Repeat until it prints
All resolvers are statically accelerable.and exits 0.
Rewrite recipes
Nullable input used where a non-null value is required
The most common diagnostic. A feature annotated int | None may be None at
runtime; operations like +, -, *, comparisons, and most method calls
require proven-non-null operands. Add an explicit guard so the symbolic
executor can narrow the type:
@online
def get_score(a: User.maybe_null_input) -> User.score:
if a is None:
return 0 # pick a semantically sensible default
return a + 2 # `a` is now provably non-null
Both if a is None: return <default> early-returns and
x = 0 if a is None else a conditional expressions work. If no sensible
default exists, ask the user what the None case should produce — do not
invent business logic silently.
Unsupported library or helper
The accelerator supports a fixed set of builtins and modules (including
math, statistics, re, hashlib, datetime, json, common str /
list / dict / set methods, numpy, pandas, and protobuf message
access). A reference to anything else (e.g. uuid, requests-adjacent
helpers, custom classes) fails with a "possibly-unbound name" or
"Unsupported" diagnostic.
Fixes, in order of preference:
- Re-express the logic with supported operations (e.g. replace
uuid.uuid5(...)with a supportedhashlibdigest if the user agrees the semantics are acceptable). - Inline small pure helpers into the resolver body, or make sure helpers are module-level functions the accelerator can capture.
- If the dependency is essential, leave the resolver un-accelerated and tell the user why; do not fake the behavior.
Possibly-unbound local variable
If a variable is only assigned inside a conditional or loop, assign a default before the conditional so every path binds it.
Configuration
CHALK_ACCELERATOR_HOST— accelerator service host. Defaults tohttps://accelerator.chalk.ai(the service Chalk runs on your behalf). Pass--host http://127.0.0.1:8780or set the env var to use a locally-running server.CHALK_ACCELERATOR_TOKEN— optional bearer token for the hosted service.
Notes
- The script exports the whole project (
python -m chalk.cli export), so syntax errors or import failures anywhere in the project fail the check before diagnostics run; fix those first (exit code 2). - Diagnostics cover every resolver in the project. If the user asked about one resolver, fix that one and leave unrelated diagnostics alone unless asked.
- A clean run means every resolver either accelerates fully or was explicitly marked never-accelerate by its author.
FAQ
What does the accelerate-python-resolvers skill do?
Make Chalk Python resolvers statically accelerable. Use when the user asks to accelerate resolvers, fix static-acceleration diagnostics, check why a resolver "can't be accelerated", or speed up Python feature pipelines in a Chalk project (a repo with chalk.yaml/chalk.yml).
How do I install accelerate-python-resolvers?
Run npx skills add https://github.com/chalk-ai/chalk-ai-plugins --skill accelerate-python-resolvers in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/accelerate-python-resolvers/ (personal) or .claude/skills/accelerate-python-resolvers/ (project).
Which AI agents can use accelerate-python-resolvers?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is accelerate-python-resolvers safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains accelerate-python-resolvers?
It is published by chalk-ai in chalk-ai/chalk-ai-plugins. It has 921 recorded installs.
More from chalk-ai/chalk-ai-plugins
benchmark-vllm-model
chalk-ai/chalk-ai-plugins
Benchmark throughput and cost-per-token of a model served on vLLM in Chalk's container infrastructure. Use when someone asks for $/token, $/request, tokens/sec, "how much would it cost to self-host this model", GPU sizing for an LLM, or wants to compare a self-hosted model's economics against a hosted API.
debug-plan-cache-misses
chalk-ai/chalk-ai-plugins
Find and debug Chalk query plan cache misses from engine logs. Use when a query is replanning on every request, an "ad-hoc query request missed the plan cache" warning shows up, latency spikes from repeated planning, or someone asks why two seemingly identical queries don't share a cached plan. Drives the chalk logs CLI search.
deploy-chalk-function
chalk-ai/chalk-ai-plugins
How to deploy a chalk function ("chalkcompute.function"). Useful for deploying a stand-alone python function in Chalk's container infrastructure. Use when someone wants to run a python function remotely on Chalk, deploy a chalkcompute function, or asks about the chalkcompute SDK.
chalk-hello
chalk-ai/chalk-ai-plugins
Print a friendly greeting from the Chalk plugin marketplace, used to verify plugin installation.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.