← 返回 Skills 市场
生成导入模板数据
作者
huahuaweiwei
· GitHub ↗
· v1.0.0
· MIT-0
77
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install generate-import-template-data
功能描述
Generate import-ready data from user-provided Excel or CSV import templates based on the customer's described business scenario. Use when Codex receives an u...
使用说明 (SKILL.md)
Generate Import Template Data
Generate data that can be pasted into or saved as the user's import template while preserving the template's actual column names, order, sheet choice, and business meaning.
Workflow
- Inspect the uploaded template before generating any data.
For
.xlsx,.xlsm,.csv, or.tsv, runscripts/inspect_template.pyto identify candidate sheets, header rows, and sample structure. - Identify the true import target.
Prefer the sheet that contains business headers over instruction sheets such as
填表说明,字段说明,模板说明,数据字典, or示例. - Extract the scenario requirements from the user request. Capture the business entity, row count, edge cases, required statuses, date ranges, amounts, codes, and whether the user wants realistic data, extreme test data, or minimum valid data.
- Map the scenario to columns conservatively. Use explicit template names and nearby notes. If a field meaning is ambiguous, state the assumption instead of fabricating hidden business logic.
- Generate import-ready rows. Keep the exact column order. Do not add extra columns. Respect apparent code formats, identifier lengths, enum-like values, and date formats already shown by the template.
- Validate before returning. Re-check that every generated row aligns with the header set, obvious formatting expectations, and any instruction-sheet constraints visible in the workbook.
Generation Rules
- Preserve the original header text exactly.
- Preserve the target sheet name when returning workbook-oriented results.
- Prefer realistic data that matches the user's described customer scene instead of generic placeholders.
- If the template includes examples, mimic their format but do not duplicate values blindly.
- If the workbook contains instruction sheets, read them before generating data.
- If the user requests "template data" without row count, default to 10 rows unless the template clearly implies a smaller fixed sample.
- If the request is for a single scenario, keep all rows internally consistent with that scenario.
- If the request is for testing coverage, include a balanced set of normal rows plus a small number of boundary rows only when the user asked for them.
- Do not invent mandatory codes, dictionaries, or foreign keys when the template suggests an external source is required. In that case, either ask for the missing mapping or clearly label the assumption.
Output Style
- Prefer returning a Markdown table only for very small outputs.
- Prefer fenced
csvblocks for tabular data the user can copy directly. - When working with a spreadsheet file in the workspace, write the generated rows into a new output file instead of overwriting the original template unless the user asked for in-place filling.
- Briefly state the chosen sheet, detected headers, row count, and any assumptions that materially affect import success.
Template Inspection
Run:
python scripts/inspect_template.py --input \x3Ctemplate-file>
Optional flags:
--sheet \x3Cname>to inspect one Excel sheet--jsonto print compact machine-readable output
Use the script output to confirm:
- candidate import sheet
- detected header row
- exact header names
- sample rows or preview cells
Ambiguity Handling
- If the scenario is missing, ask only for the minimum business details needed to generate rows that are not meaningless.
- If multiple sheets look importable, say which one you chose and why.
- If a field cannot be inferred safely, keep the assumption explicit in the final answer.
- If the template appears to require strict validation rules, read references/generation-guidelines.md and tighten the output accordingly.
References
- Read references/generation-guidelines.md for scenario-to-field mapping guidance and common output checks.
- Run
scripts/inspect_template.pybefore generating data from a new template structure.
安全使用建议
This skill appears coherent and focused on generating import/sample rows from uploaded spreadsheet templates. Before installing: ensure the agent environment has the required Python packages (openpyxl and xlrd) if you expect the inspect script to be runnable; be aware the skill will need access to any template files you upload (do not upload sensitive production data unless you trust the skill and runtime); and note that there is no automated install step for dependencies, so you may need to provision them yourself. If you want the agent to run the inspect script automatically, confirm those runtime dependencies are available or add an install step that pins trusted package versions.
功能分析
Type: OpenClaw Skill
Name: generate-import-template-data
Version: 1.0.0
The skill bundle is designed to inspect Excel and CSV templates to generate mock import data. The primary script, `scripts/inspect_template.py`, uses standard libraries (openpyxl, xlrd) to parse spreadsheet structures without any network access, shell execution, or data exfiltration logic. The instructions in `SKILL.md` and `references/generation-guidelines.md` are strictly aligned with the stated purpose of data generation and do not contain any prompt-injection attempts to subvert the agent's behavior.
能力评估
Purpose & Capability
Name/description match behavior: the skill inspects spreadsheets and produces sample/import rows. The included inspection script and guidance are appropriate for this purpose.
Instruction Scope
SKILL.md confines actions to inspecting the uploaded template, asking for missing business context, and generating rows; it does not instruct reading unrelated files, environment variables, or sending data to external endpoints.
Install Mechanism
This is an instruction-only skill (no install spec). The provided script imports openpyxl and xlrd but the skill does not declare how to ensure those Python packages exist in the runtime. This is a practical/dependency gap, not a security violation.
Credentials
No environment variables, credentials, or config paths are requested. The skill only needs access to user-provided template files, which is appropriate for its purpose.
Persistence & Privilege
always is false and the skill does not request elevated persistence or modify other skills/config; agent autonomous invocation is allowed by default but not excessive here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install generate-import-template-data - 安装完成后,直接呼叫该 Skill 的名称或使用
/generate-import-template-data触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release for the generate-import-template-data skill:
- Supports generating import-ready data based on user-uploaded Excel or CSV templates and described business scenarios.
- Inspects templates to identify target sheets, headers, and structure before generation.
- Preserves exact column order, header names, and expected data formats according to the template.
- Handles business scenario details, edge cases, and test data requirements as specified by the user.
- Outputs data in copy-paste-friendly formats (Markdown table for small outputs, fenced CSV for larger sets).
- Clearly states sheet choice, header detection, row count, and any necessary assumptions in the output.
元数据
常见问题
生成导入模板数据 是什么?
Generate import-ready data from user-provided Excel or CSV import templates based on the customer's described business scenario. Use when Codex receives an u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 77 次。
如何安装 生成导入模板数据?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install generate-import-template-data」即可一键安装,无需额外配置。
生成导入模板数据 是免费的吗?
是的,生成导入模板数据 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
生成导入模板数据 支持哪些平台?
生成导入模板数据 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 生成导入模板数据?
由 huahuaweiwei(@huahuaweiwei)开发并维护,当前版本 v1.0.0。
推荐 Skills