Skill
DSPy system prompt compiler
DSPy MIPROv2 adapter (Rivest pattern): compile a single LPPromptV2 Neo4j node's prompt_text against a rubric metric; emit winning instruction as ILP finding; per-node prompt-chain upgrade path
Primitives inside (10)
dspy-pypi-name-not-dspy-aigotcha-fixInstall DSPy as 'pip install dspy' — 'dspy-ai' is the older package name and today only an alias that installs dspy; confirm with an import check after install.
When: Setting up DSPy in any environment.
Corrected on 2026-10-23: the current DSPy release is 3.x, and dspy-ai is now an alias that installs dspy.
dspy-signature-instruction-injectiontool-sequenceCompile an EXISTING system prompt with DSPy (Maxime Rivest pattern): set it on a dspy.Predict(Signature) with module.signature = module.signature.with_instructions(prompt), run MIPROv2, and read the winner back from optimized.predictors()[0].signature.instructions.
When: Upgrading a hand-written stored system prompt (one node of a prompt chain) via automated instruction search while preserving the declared I/O contract.
Corrected on 2026-10-23: the steps now use signature.with_instructions. Corrected on 2026-11-01: requires_permission_to_run=False is needed only on dspy 2.5.1 to 2.6.27; 3.0.0 to 3.4.1 have no confirmation prompt.
extended-signature-attr-instabilitygotcha-fixdspy's old extended_signature.instructions path is absent in the checked dspy releases 2.6.0 through 3.4.1 (AttributeError reproduced on 2.6.27 and 3.4.1) — read the instruction from module.predictors()[0].signature.instructions instead.
When: Reading or setting the instruction text on a DSPy module across environments with different dspy versions.
Corrected on 2026-10-23: the steps now use predictors()[0].signature. Corrected on 2026-11-01: ChainOfThought defines extended_signature in every checked dspy release from 2.5.1 to 2.5.43 and in none from 2.6.0 to 3.4.1 (source check); the AttributeError was reproduced on 2.6.27 and 3.4.1.
illustrative-identifiers-swap-before-reusedisciplineA skill authored inside a specific project carries that project's identifiers as EXAMPLES — node labels, DB names, endpoints, policy names, model slugs — never as required values: the author lists them in an explicit 'Adapt to your project' block, and the reuser maps every listed identifier to the local equivalent BEFORE running anything, keeping the worked instance as provenance, not configuration; identifiers the skill marks as protocol-required constants are NOT swapped.
When: Applying a project-born skill (with worked instances that mention concrete labels/DBs/endpoints/models from its birth project) in a different project or environment; authoring such a skill for reuse.
ilp-finding-emit-scaffoldtool-sequenceEmit optimizer output as a structured review-panel finding file: original vs winning instruction, score, empty Q1-Q4 gate sections for reviewers, and a SUPERSEDES Cypher template that a human pastes ONLY after all gates accept.
When: Handing machine-generated prompt improvements to a human/multi-model review panel with an auditable adoption path.
metric-trace-arg-may-be-nonegotcha-fixA DSPy metric receives (example, prediction, trace) and trace is None when the metric is called outside compilation — guard any trace-dependent logic with `if trace is not None`.
When: Writing metric functions reused both inside optimizer.compile and for standalone evaluation.
num-threads-1-local-ollamacalibrationWhen a DSPy optimizer drives a local Ollama server, set num_threads=1 — local inference is slow and parallel optimizer threads overload the single server instead of speeding up the run.
When: Configuring MIPROv2/GEPA thread counts with a local model backend.
parameterized-cypher-http-pullquery-shapePull a graph node over Neo4j's HTTP tx endpoint with {"statement": cypher-using-$params, "parameters": {...}} — values pass as typed parameters, never string-interpolated into the Cypher, killing injection by construction.
When: Any script fetching/writing Neo4j data with user- or file-derived values (node ids, names).
small-trainset-use-light-auto-tiercalibrationWith a small trainset (under ~8 examples) MIPROv2 quality degrades — run auto='light', which requires fewer examples than 'medium' or 'heavy'.
When: Choosing the MIPROv2 auto tier for a compile run given the available trainset size.
suppress-interactive-cost-promptgotcha-fixIn dspy 2.5.1 to 2.6.27, MIPROv2.compile blocks on an interactive cost-confirmation prompt by default — pass requires_permission_to_run=False for unattended/overnight runs or the job hangs waiting for a keypress. dspy 3.0.0 to 3.4.1 have no prompt: leave the argument out.
When: Running DSPy compiles in cron jobs, TMUX panes, CI, or any non-interactive context.
Corrected on 2026-11-01: the confirmation prompt is in every dspy release from 2.5.1 to 2.6.27 and in none of the releases from 3.0.0 to 3.4.1 (all 82 read).
Get the whole skill
All 10 primitives of this skill as one package, with the order to apply them.
Buy only the primitives you need
Each primitive is 1 credit (≈ €0.10). Pick them from the list above — the button is next to each one.
Upgrade your own skill
Paste your skill; we pick the 5 primitives from the shelf that fit it best, as one bundle for 5 credits (≈ €0.50).
Upgrade my skillNeighbour skills
Skills whose primitives are closest to this one (bge-m3 similarity):