llm-instruction-separation

Separate LLM instructions and model branching from Wolfram Language source code.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/transreal/claudecode --skill llm-instruction-separation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-instruction-separation
Source: https://github.com/transreal/claudecode/tree/main/Claude%20Directives/skills/llm-instruction-separation
Command: npx skills add https://github.com/transreal/claudecode --skill llm-instruction-separation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents hard-coded model identifiers and long LLM instruction templates from being embedded directly in Wolfram Language (.wl) sources, improving maintainability and routing correctness.

Core Features & Use Cases

  • Model capability separation: Ensures model “branches” (e.g., gpt-5, claude-opus-4.7) live only in the $ClaudeModelCapabilities table keys, not in code conditionals.
  • Prompt/template extraction: Moves LLM instruction text (e.g., $petriNetGuideExtras) into skill Markdown so .wl loads it via a dedicated reader.
  • Rules vs. skills discipline: Keeps cross-package operational conventions (quiet/check behavior, working directory guidance) in rules, while package-specific techniques stay in dedicated skills.
  • Migration guidance: Provides before/after patterns for cutting string constants out of .wl into skills, including safe directive-root resolution.

Quick Start

Ask your AI to scan your .wl package for hard-coded model names and long LLM instruction strings, then refactor the long instructions into a new skill named llm-instruction-separation and update the .wl code to load the skill body via iReadSkillBody.

Frequently Asked Questions about llm-instruction-separation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove hard-coded LLM model names and prompts from Wolfram Language source code?

To remove hard-coded LLM instructions from Wolfram Language source code, extract model branches into the $ClaudeModelCapabilities table keys and move prompt templates into skill Markdown, loading them via directive-root discovery.

What is the best way to manage LLM model routing conditionals in .wl packages?

Managing LLM model routing in .wl packages requires keeping model identifiers like gpt-5 or claude-opus-4.7 strictly in the $ClaudeModelCapabilities table keys, ensuring code conditionals contain no hard-coded model branches.

How do I migrate long LLM instruction strings out of existing .wl files?

Migrating long LLM instruction strings out of .wl files involves refactoring string constants into a new skill's Markdown body and updating the .wl package to load the text through a dedicated reader like iReadSkillBody.

Does separating prompt templates into Markdown work with Wolfram Language directive-root discovery?

Yes, separating prompt templates into Markdown works with Wolfram Language by loading skill bodies through directive-root discovery using ClaudeDirectives`ClaudeFindDirectiveRoots[] to ensure only Markdown content is read.

When should I keep operational conventions in rules versus dedicated skills for LLM packages?

Keep cross-package operational conventions like quiet or check behavior and working directory guidance in rules, while package-specific techniques and LLM instruction text stay in dedicated skills to reduce maintainability risk.

Why do hard-coded prompt templates in Wolfram Language cause maintainability issues?

Hard-coded prompt templates in Wolfram Language cause maintainability issues by embedding long LLM instruction text and provider branching directly in source strings, making routing updates and text edits risky and difficult.