Example 1: Using Briefing Template (compose an agent brief)
// Render a structured agent brief from data before launching general-purpose
import { renderTemplate } from '${CLAUDE_SKILL_DIR}/Tools/RenderTemplate.ts';
const prompt = renderTemplate('Primitives/Briefing.hbs', {
briefing: { type: 'research' },
agent: { id: 'EN-1', name: 'Skeptical Thinker', personality: {...} },
task: { description: 'Analyze security architecture', questions: [...] },
output_format: { type: 'markdown' }
});
Example 2: Using Structure Template (Workflow)
# Data: phased-analysis.yaml
phases:
- name: Discovery
purpose: Identify attack surface
steps:
- action: Map entry points
instructions: List all external interfaces...
- name: Analysis
purpose: Assess vulnerabilities
steps:
- action: Test boundaries
instructions: Probe each entry point...
bun run RenderTemplate.ts \
--template Primitives/Structure.hbs \
--data phased-analysis.yaml
Example 3: Render an Agent Brief from Data
// Render a structured agent brief, then launch general-purpose with it
const brief = renderTemplate('Primitives/Briefing.hbs', {
agent: { name: 'Skeptical Security Reviewer', role: 'auth bypass and input validation' },
task: { description: 'Review the auth flow', questions: [...] },
});
// Pass `brief` as the prompt to Agent(subagent_type="general-purpose")