← Back to Skills Marketplace
sylvanxiao

Iflow Template Toolkit

by SylvanXiao · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
106
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install iflow-template-toolkit
Description
Dependency-free template engine with variable substitution, conditionals, loops, and multi-language support for iFlow skills.
README (SKILL.md)

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

Usage Guidance
This skill appears to implement exactly what it claims: a small dependency-free template engine and translator. Before installing, consider: (1) avoid rendering untrusted templates or passing absolute/system file paths as template names, since the engine will open files the runtime user can access; (2) translation loading (from_dir) reads JSON files from disk—only load trusted translations; (3) although the engine does not use eval or network calls, review the code if you plan to run it in sensitive environments. If you want to reduce risk, run the included tests locally and restrict what template paths the agent is allowed to access. If you are concerned about autonomous invocation, you can disable the skill or restrict its permissions in your agent settings.
Capability Analysis
Type: OpenClaw Skill Name: iflow-template-toolkit Version: 1.0.0 The toolkit provides template rendering and internationalization features but contains significant security vulnerabilities. Specifically, in `src/template_engine.py`, the `load_template` and `render_template` functions allow for arbitrary file reading/path traversal because they do not validate if the requested template path is restricted to a safe directory. Additionally, the `_get_value` method uses `getattr` to access object attributes based on template keys without sanitization, which could lead to Server-Side Template Injection (SSTI) and information disclosure if an attacker provides a malicious template.
Capability Assessment
Purpose & Capability
Name and description match the included code: template_engine.py and translator.py implement rendering, conditionals, loops, and JSON-backed translations. No unrelated binaries, env vars, or services are requested.
Instruction Scope
SKILL.md usage is scoped to rendering templates and initializing translations. The engine reads template files from disk (TemplateEngine.load_template) and translation JSONs (Translator.from_dir), which is expected for a template/i18n tool; however, rendering arbitrary user-supplied template names or giving absolute file paths could cause the engine to open any file the agent/user permits. The engine does not execute code or call eval(), and conditional parsing is limited to simple operators (==, !=, in, truthiness).
Install Mechanism
There is no install spec (instruction-only); the package contains source files but nothing is downloaded or executed automatically during install. This is low-risk from installation mechanics.
Credentials
No environment variables, credentials, or config paths are required. Declared requirements (Python 3.6+) are proportionate to the functionality.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills. disable-model-invocation is default (agent may invoke autonomously), which is normal and not by itself a red flag.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install iflow-template-toolkit
  3. After installation, invoke the skill by name or use /iflow-template-toolkit
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Template engine + i18n support
Metadata
Slug iflow-template-toolkit
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

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.

💬 Comments