Writing .hu Files¶
.hu (Human) files are plain-text prompt templates. They define instructions for an LLM in natural language, with parameter placeholders for dynamic content.
Syntax¶
A .hu file is plain text with single-brace parameter placeholders:
You are an expert code reviewer.
Review the following code for correctness, security, and performance issues.
Code to review:
{code}
Focus areas:
{focus_areas}
Rules¶
- Plain text only — no markdown (no
**bold**,# headers,`backticks`, or HTML) - Single braces for parameters:
{param_name}(double braces{{text}}become literal text with {text} value when sent to the LLM) - No output format descriptions — Lamia enforces output schemas and .hu files should be return type agnostic to be reusable.
- Keep them concise — shorter prompts perform better
Calling .hu Files¶
From a .lm file:
This calls review_code.hu, substitutes the parameters, sends it to the LLM, and parses the response as ReviewResult.
IDE Features for .hu Files¶
- Syntax highlighting — parameters
{name}are highlighted distinctly - Go to definition —
Ctrl+Click/Cmd+Clickon a.hufilename in.lmcode jumps to the file - Hover info — hover over a
.hucall to see the template contents and parameters - Completions — parameter names suggested when calling
.hufiles
Navigation¶
To quickly navigate between .lm and .hu files:
- In a
.lmfile,Ctrl+Click/Cmd+Clickon any.hucall to jump to it - Use
Ctrl+Shift+O/Cmd+Shift+Ofor document symbols — lists all functions and.hucalls - Use
Ctrl+P/Cmd+Pand type.huto find prompt files by name
For the full .hu syntax reference, see the Lamia Language Docs — .hu Syntax.