classify-structured
GitHub基于 JSON Schema 的多维度文本分类技能,支持同时按多个轴(如情感、主题)对文本进行分类。通过调用 ZeroGPU API 实现,需传入包含允许标签的 Schema 和待分类文本,返回每轴选定的标签结果。
Trigger Scenarios
Install
npx skills add zerogpu/zerogpu-router --skill classify-structured -g -y
SKILL.md
Frontmatter
{
"name": "classify-structured",
"metadata": {
"openclaw": {
"install": [
{
"bins": [
"zerogpu"
],
"kind": "node",
"package": "zerogpu-cli"
}
],
"requires": {
"bins": [
"zerogpu"
]
}
}
},
"description": "Multi-axis classification using a JSON schema mapping categories to allowed labels (gliner2-base-v1). Use when the user wants to classify text along several dimensions at once, e.g. \"classify by sentiment and topic\" with explicit label sets per axis.",
"allowed-tools": "Bash(zerogpu chat_completions *)",
"argument-hint": "<text> -s '<json schema>'"
}
Sends your input to ZeroGPU's hosted API for inference — this is not local processing. Don't pass secrets, credentials, or regulated data you aren't cleared to share with a third party. See the plugin README's "Data & privacy" section.
Run schema-driven classification. The user gives the text and the schema — each axis with its allowed labels — as -s '<json>' or in plain words.
Run this with the exec tool, putting the schema in --metadata and pasting the text into the heredoc verbatim — no escaping, the quoted heredoc handles every shell metacharacter, newline, quote, and paren:
zerogpu chat_completions -m gliner2-base-v1 --metadata '{"usecase":"classification","schema":{"sentiment":["positive","negative","neutral"],"topic":["support","billing","product"]}}' <<'ZGPU_END_OF_INPUT'
<the source text, verbatim>
ZGPU_END_OF_INPUT
"usecase":"classification"is required exactly as written; the API rejects the request without it.schemamaps each axis to its allowed labels. If the user gives axes without labels, pick sensible label sets and say which you used.--metadatais single-quoted JSON, so write any'inside a label as'\''.
Output is a JSON object whose classification holds one chosen label per axis.
Savings note: only if the command output literally contains a line starting with 💰 ZeroGPU savings, append that exact line, unchanged, as the last line of your reply. If no such line is present, say nothing about savings and do not mention or suggest the cost-savings skill — this note is intentionally occasional, not shown every time.
Version History
-
4e1b070
Current 2026-09-22 08:08
v4.4.0:改用zerogpu-cli模型无关端点,提升插件独立性;技能体改为exec指令格式。
-
cee9321
2026-08-02 21:15
更新依赖库并修复安全问题
- 7b9b503 2026-07-24 11:48


