Authoring Dynamic Code Generation Skills

This chapter explains how a dcgskill should be structured if the goal is to match the current preparation rules of the Dynamic Code Generation subsystem.

Descriptor Surface

The source descriptor for this family is dcgskill.md. During preparation, the subsystem reads the descriptor through the generic skill document parser and then extracts a small set of sections: prompt guidance, argument description, and the LLM model value. The recognized aliases are deliberately narrow. Prompt supplies the behavioral guidance. Argument, Input, or Parameters can supply a descriptive explanation of the expected input. LLM Model, LLM-Model, or Model determine which model value is used for the text/code decision prompt.

The important limitation is that the argument section does not redefine the runtime argument key. The subsystem always treats the operative argument name as input. The descriptor may describe that input more precisely, but it does not rename it. If a caller passes structured arguments explicitly, the subsystem looks for args.input; otherwise it falls back to the raw prompt text.

The optional Help section is user-facing guidance for command menus and similar hosts. It should describe how to invoke the skill and what kind of input to provide, but it does not change the dynamic code generation decision path.

The LLM model field is scoped to the decision prompt for this subsystem. If it is omitted, the subsystem falls back to the configured code model. The field therefore chooses which model value is used for the text/code decision rather than defining a broader execution configuration.

Canonical Layout

The valid layout is descriptor-only. In this form, the subsystem prepares its dynamic decision executor and lets the LLM decide at runtime whether the request should be answered directly or through temporary code.

Descriptor-only layout

  • skills/
    • bigMultiply/
      • dcgskill.md

This layout is operational. The runtime does not load executable modules from the skill folder. Authoring should therefore focus on descriptor guidance quality and clear input expectations in dcgskill.md.

Minimal Descriptor Example

A minimal descriptor for the default dynamic path may look as follows.

# Big Integer Multiplier

## Prompt
Decide whether to answer directly or to generate JavaScript that computes an
exact result. Prefer code when exact arithmetic is safer than free-form text.

## Argument
Primary natural-language instruction or text payload.

## Help
Invoke this skill with the arithmetic expression or calculation request.
Example input: multiply 123456789 by 987654321

## LLM Model
code

This is enough for the subsystem to record prompt guidance, a human-readable argument description, and the resolved model value before executing the standard decision path.