Template Constructor
End-to-end skill for building, validating, and deploying Machina agent-templates and connectors.
References
Procedural guides for each lifecycle stage:
| Reference |
Description |
| init.md |
Scaffold new template project from scratch |
| create.md |
Generate individual YAML components |
| validate.md |
Check YAML files against correct patterns |
| install.md |
Import templates via MCP (local or Git) |
| analyze.md |
Analyze template structure and dependencies |
| trace.md |
Trace agent execution chain with variable propagation |
| secrets.md |
Configure vault secrets for connectors |
| api.md |
MCP operations for all entities (CRUD, execute, search) |
| yaml-reference.md |
Complete YAML syntax and patterns |
| connectors.md |
All available connectors with docs |
| frontend-api.md |
Next.js frontend API integration |
Schemas
Authoritative field definitions for every Machina entity:
| Schema |
Entity |
| agent.md |
Agent definition |
| connector.md |
Connector (PyScript + REST API) |
| document.md |
Document task type |
| mapping.md |
Data transformation mapping |
| prompt.md |
Prompt definition + JSON Schema |
| setup.md |
_install.yml + _index.yml |
| skill.md |
SDK skill registration |
| workflow.md |
Workflow + task types |
Intent Routing
When the user triggers this skill, load the appropriate reference:
| User Says |
Reference |
| "init template", "scaffold template", "new template project" |
init.md |
| "create agent", "create workflow", "scaffold YAML" |
create.md |
| "validate", "check YAML", "verify template" |
validate.md |
| "install", "import", "deploy template" |
install.md |
| "analyze", "what's in this template", "overview" |
analyze.md |
| "trace", "execution chain", "variable flow", "debug agent" |
trace.md |
| "secrets", "credentials", "configure API key" |
secrets.md |
| "API", "MCP operations", "search agents", "execute workflow" |
api.md |
| "YAML syntax", "task types", "expression syntax", "foreach" |
yaml-reference.md |
| "connectors", "list connectors", "connector docs" |
connectors.md |
| "frontend", "Next.js", "API integration", "document search" |
frontend-api.md |
| "report bug", "found issue", "feedback", "suggest improvement" |
Show Feedback & Contributing section below |
For YAML field specifics, read the relevant schema from schemas/.
Workflow
Name: mkn-constructor-check-setup
Validates that the doc-structure document exists and returns its content.
| Input |
Default |
Description |
document_name |
doc-structure |
Document to check |
| Output |
Description |
doc-structure |
Document content |
check-status |
Workflow execution status |
Feedback & Contributing
Found a bug, unexpected behavior, or have an improvement idea while using this skill?
- Report issues: Open an issue with the label
skill:mkn-constructor
- Contribute fixes: Fork the repo, apply your fix, and open a PR against
main
- What to include: Describe what you expected vs. what happened. For schema/reference fixes, include before/after YAML examples.
When the user encounters an error, unexpected scaffold output, or expresses frustration with a skill behavior, proactively mention this section and suggest opening an issue.
Key Constraints
- Connector .py files: No helper functions outside command functions. Each function must be self-contained.
- Expression syntax: Always use
$.get('field') — never ${field} or $field
- Prompt files: Use
prompts: array (not prompt:) with instruction: (not messages:)
- Connector YAML: Use
filetype: (not type:) and filename: (not script:)
- Install order: connectors → documents → prompts → mappings → workflows → agents → skills
1---2name: machina-constructor3description: Template Constructor4---56# Template Constructor78End-to-end skill for building, validating, and deploying Machina agent-templates and connectors.910## References1112Procedural guides for each lifecycle stage:1314| Reference | Description |15|-----------|-------------|16| [init.md](references/init.md) | Scaffold new template project from scratch |17| [create.md](references/create.md) | Generate individual YAML components |18| [validate.md](references/validate.md) | Check YAML files against correct patterns |19| [install.md](references/install.md) | Import templates via MCP (local or Git) |20| [analyze.md](references/analyze.md) | Analyze template structure and dependencies |21| [trace.md](references/trace.md) | Trace agent execution chain with variable propagation |22| [secrets.md](references/secrets.md) | Configure vault secrets for connectors |23| [api.md](references/api.md) | MCP operations for all entities (CRUD, execute, search) |24| [yaml-reference.md](references/yaml-reference.md) | Complete YAML syntax and patterns |25| [connectors.md](references/connectors.md) | All available connectors with docs |26| [frontend-api.md](references/frontend-api.md) | Next.js frontend API integration |2728## Schemas2930Authoritative field definitions for every Machina entity:3132| Schema | Entity |33|--------|--------|34| [agent.md](schemas/agent.md) | Agent definition |35| [connector.md](schemas/connector.md) | Connector (PyScript + REST API) |36| [document.md](schemas/document.md) | Document task type |37| [mapping.md](schemas/mapping.md) | Data transformation mapping |38| [prompt.md](schemas/prompt.md) | Prompt definition + JSON Schema |39| [setup.md](schemas/setup.md) | `_install.yml` + `_index.yml` |40| [skill.md](schemas/skill.md) | SDK skill registration |41| [workflow.md](schemas/workflow.md) | Workflow + task types |4243## Intent Routing4445When the user triggers this skill, load the appropriate reference:4647| User Says | Reference |48|-----------|-----------|49| "init template", "scaffold template", "new template project" | [init.md](references/init.md) |50| "create agent", "create workflow", "scaffold YAML" | [create.md](references/create.md) |51| "validate", "check YAML", "verify template" | [validate.md](references/validate.md) |52| "install", "import", "deploy template" | [install.md](references/install.md) |53| "analyze", "what's in this template", "overview" | [analyze.md](references/analyze.md) |54| "trace", "execution chain", "variable flow", "debug agent" | [trace.md](references/trace.md) |55| "secrets", "credentials", "configure API key" | [secrets.md](references/secrets.md) |56| "API", "MCP operations", "search agents", "execute workflow" | [api.md](references/api.md) |57| "YAML syntax", "task types", "expression syntax", "foreach" | [yaml-reference.md](references/yaml-reference.md) |58| "connectors", "list connectors", "connector docs" | [connectors.md](references/connectors.md) |59| "frontend", "Next.js", "API integration", "document search" | [frontend-api.md](references/frontend-api.md) |60| "report bug", "found issue", "feedback", "suggest improvement" | Show **Feedback & Contributing** section below |6162For YAML field specifics, read the relevant schema from `schemas/`.6364## Workflow6566**Name**: `mkn-constructor-check-setup`6768Validates that the `doc-structure` document exists and returns its content.6970| Input | Default | Description |71|-------|---------|-------------|72| `document_name` | `doc-structure` | Document to check |7374| Output | Description |75|--------|-------------|76| `doc-structure` | Document content |77| `check-status` | Workflow execution status |7879## Feedback & Contributing8081Found a bug, unexpected behavior, or have an improvement idea while using this skill?8283- **Report issues**: [Open an issue](https://github.com/machina-sports/machina-templates/issues/new?labels=skill:mkn-constructor) with the label `skill:mkn-constructor`84- **Contribute fixes**: Fork the repo, apply your fix, and [open a PR](https://github.com/machina-sports/machina-templates/pulls) against `main`85- **What to include**: Describe what you expected vs. what happened. For schema/reference fixes, include before/after YAML examples.8687When the user encounters an error, unexpected scaffold output, or expresses frustration with a skill behavior, proactively mention this section and suggest opening an issue.8889## Key Constraints9091- **Connector .py files**: No helper functions outside command functions. Each function must be self-contained.92- **Expression syntax**: Always use `$.get('field')` — never `${field}` or `$field`93- **Prompt files**: Use `prompts:` array (not `prompt:`) with `instruction:` (not `messages:`)94- **Connector YAML**: Use `filetype:` (not `type:`) and `filename:` (not `script:`)95- **Install order**: connectors → documents → prompts → mappings → workflows → agents → skills969798<error_handling>99If any schema validation or template construction fails:100- Output an `<error>` block detailing the exact YAML syntax error or missing field.101- Suggest opening an issue using the links in the Feedback & Contributing section.102- DO NOT silently ignore schema violations.103</error_handling>