| name | hugin-scaffold |
| description | Generate starter files for a new Hugin agent Use when this capability is needed. |
| metadata | {"author":"gimlelabs"} |
Hugin Agent Scaffold Generator
Generate starter files for a new Hugin agent by reading templates from this plugin and customizing them.
Arguments
Parse the user's arguments to extract:
- agent_name: Name for the agent (required, snake_case)
- type: One of
minimal, tool, or pipeline (default: minimal)
Example invocations:
/hugin-agent-creator:hugin-scaffold my_agent - Creates minimal agent
/hugin-agent-creator:hugin-scaffold data_processor tool - Creates agent with custom tool
/hugin-agent-creator:hugin-scaffold report_generator pipeline - Creates multi-stage pipeline
Implementation Steps
Step 1: Parse Arguments
Extract agent_name and type from user input. Validate agent_name is snake_case.
Step 2: Create Directory Structure
Use Bash to create the directories:
mkdir -p [agent_name]/configs [agent_name]/tasks [agent_name]/templates
mkdir -p [agent_name]/tools
Step 3: Read and Customize Templates
IMPORTANT: Read the actual template files from this plugin, then customize them.
For ALL types, read these templates:
-
Read templates/minimal-config.yaml from this plugin
- Replace
my_agent with [agent_name]
- Replace
my_system with [agent_name]_system
- For 'tool' type: add the custom tool to the tools list
- Write to
[agent_name]/configs/[agent_name].yaml
-
Read templates/minimal-task.yaml from this plugin
- Replace
my_task with [agent_name]_task
- Write to
[agent_name]/tasks/[agent_name]_task.yaml
-
Read templates/minimal-template.yaml from this plugin
- Replace
my_system with [agent_name]_system
- Write to
[agent_name]/templates/[agent_name]_system.yaml
For 'tool' type, also read:
-
Read templates/tool-definition.yaml from this plugin
- Replace
my_tool with [agent_name]_tool
- Write to
[agent_name]/tools/[agent_name]_tool.yaml
-
Read templates/tool-implementation.py from this plugin
- Replace
my_tool with [agent_name]_tool
- Write to
[agent_name]/tools/[agent_name]_tool.py
For 'pipeline' type:
Instead of the single task, create 3 stage tasks:
-
Read templates/minimal-task.yaml as base, then create:
tasks/stage_1_extract.yaml:
name: stage_1_extract
description: Extract data from input (Stage 1)
parameters:
raw_input:
type: string
description: Raw input data
required: false
default: "Sample input data"
task_sequence:
- stage_2_transform
- stage_3_output
pass_result_as: extracted_data
prompt: |
STAGE 1: EXTRACT
Raw Input: {{ raw_input.value }}
Your task:
1. Parse the raw input
2. Extract key information
3. Use finish with your structured extraction
Step 4: Print Success Message
After creating all files, print:
Created [agent_name] agent ([type] type)
Directory: ./[agent_name]/
Files created:
- configs/[agent_name].yaml
- tasks/[task_name].yaml
- templates/[agent_name]_system.yaml
[If tool type:]
- tools/[agent_name]_tool.yaml
- tools/[agent_name]_tool.py
Run your agent:
uv run hugin run --task [task_name] --task-path ./[agent_name]
Next steps:
1. Edit configs/[agent_name].yaml to customize the agent
2. Edit tasks/[task_name].yaml to define your task logic
3. Edit templates/[agent_name]_system.yaml for the system prompt
[If tool type:]
4. Implement your tool in tools/[agent_name]_tool.py
[If pipeline type:]
4. Customize each stage task in tasks/
For more guidance: /hugin-agent-creator:hugin-guide
Template File Locations
All templates are in this plugin's templates/ directory:
templates/minimal-config.yaml
templates/minimal-task.yaml
templates/minimal-template.yaml
templates/tool-definition.yaml
templates/tool-implementation.py
Always read these files rather than hardcoding their content. This ensures scaffolded agents use the latest template versions.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.