delimit_generate_template
Generate a single file from a code template into an existing project, providing a framework-conformant skeleton with imports and exports. Ideal for adding components, pages, or API handlers without writing boilerplate.
Instructions
Write a single file from a code template into an existing project.
When to use: when an existing project needs one more piece — a component, a page, an API handler — and you want the framework-conformant skeleton (imports, exports, default structure) rather than hand-writing the boilerplate. Pair with delimit_test_generate to scaffold the matching test file. When NOT to use: to lay out a fresh project (use delimit_generate_scaffold), to design a UI component with tokens (delimit_design_generate_component), or to bulk-generate many files (call this once per file, or write a custom script).
Sibling contrast: delimit_generate_scaffold lays out a complete project tree; this writes a single file. Compared to delimit_design_generate_component, this is framework-only and does not consume design tokens. Compared to delimit_test_generate, this writes source, not tests.
Side effects: writes ONE file to disk under target/ via
backends.generate_bridge.template. target is sanitised via
_sanitize_path — paths escaping the workspace short-circuit
with an error. features is coerced from a comma string to a
list via _coerce_list_arg. No license gate, no ledger write, no
notification. If a file with the same name already exists, the
backend determines overwrite vs. error — call with care on
populated directories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_type | Yes | Template flavour, e.g. "component", "page", "api". Required. | |
| name | Yes | Name for the generated code (file stem). Required. | |
| framework | No | Target framework key, e.g. "react", "nextjs", "fastapi". | nextjs |
| features | No | Optional feature flags as a comma string or list. | |
| target | No | Output directory. Default "." (cwd). Sanitized to remain inside the workspace. | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||