Iflow Template Toolkit
/install iflow-template-toolkit
iFlow Template Toolkit
Description
A simple, dependency-free template and internationalization toolkit for iFlow skills. Provides template rendering with variable substitution, conditionals, and loops, plus multi-language support.
Installation
# Clone or copy to your skills directory
openclaw skills install iflow-template-toolkit
Usage
Template Engine
from iflow_template_toolkit import TemplateEngine, render_template
# Quick render from string
result = render_template("Hello {{name}}!", {"name": "World"})
# Output: "Hello World!"
# Using TemplateEngine class
engine = TemplateEngine("./templates")
result = engine.render_file("config.md", {
"project_name": "my-project",
"team_size": 5
})
Template Syntax
Variables:
Hello {{name}}!
Project: {{project_name}}
Conditionals:
{% if status == "active" %}
Status is active
{% elif status == "pending" %}
Status is pending
{% else %}
Status unknown
{% endif %}
Loops:
{% for item in items %}
- {{item}} ({{index1}})
{% endfor %}
Internationalization
from iflow_template_toolkit import Translator, t, init_translator
# Initialize with translations
init_translator({
'en': {'greeting': 'Hello', 'farewell': 'Goodbye'},
'zh': {'greeting': '你好', 'farewell': '再见'}
}, default_lang='en')
# Translate
t('greeting') # "Hello"
t('greeting', lang='zh') # "你好"
# With interpolation
t('welcome', name='John') # "Welcome, John!" (if translation is "Welcome, {name}!")
Features
| Feature | Description |
|---|---|
| Variable Substitution | {{variable}} syntax |
| Conditionals | {% if %}...{% elif %}...{% else %}...{% endif %} |
| Loops | {% for item in items %}...{% endfor %} |
| Comparison | ==, !=, in, not in operators |
| Loop Variables | index, index1, first, last |
| Multi-language | JSON-based translation files |
| Fallback | Falls back to default language |
Requirements
- Python 3.6+
- No external dependencies
File Structure
iflow-template-toolkit/
├── src/
│ ├── __init__.py
│ ├── template_engine.py
│ ├── i18n/
│ │ ├── __init__.py
│ │ ├── translator.py
│ │ └── langs/
│ │ ├── en.json
│ │ └── zh.json
│ └── templates/
├── tests/
├── SKILL.md
└── README.md
Version
1.0.0
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install iflow-template-toolkit - After installation, invoke the skill by name or use
/iflow-template-toolkit - Provide required inputs per the skill's parameter spec and get structured output
What is Iflow Template Toolkit?
Dependency-free template engine with variable substitution, conditionals, loops, and multi-language support for iFlow skills. It is an AI Agent Skill for Claude Code / OpenClaw, with 106 downloads so far.
How do I install Iflow Template Toolkit?
Run "/install iflow-template-toolkit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Iflow Template Toolkit free?
Yes, Iflow Template Toolkit is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Iflow Template Toolkit support?
Iflow Template Toolkit is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Iflow Template Toolkit?
It is built and maintained by SylvanXiao (@sylvanxiao); the current version is v1.0.0.