classify-structured
GitHub基于JSON Schema的多维度文本分类技能,支持同时按多个轴(如情感、主题)对文本进行分类,自动映射允许标签并输出结构化结果。
Trigger Scenarios
Install
npx skills add zerogpu/zerogpu-router --skill classify-structured -g -y
SKILL.md
Frontmatter
{
"name": "classify-structured",
"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>'"
}
Run schema-driven classification. The request below holds the text and the schema — each axis with its allowed labels — given as -s '<json>' or in plain words.
Run this with the Bash 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 request 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 /zerogpu-router:cost-savings — this note is intentionally occasional, not shown every time.
Request: $ARGUMENTS
Version History
-
4e1b070
Current 2026-09-22 08:06
v2.3.0:迁移至zerogpu-cli 3.8.0模型无关端点,提升插件独立性
- 7b9b503 2026-07-24 11:47


