
Ai Humanizer Zh
- 51 installs
- 45 repo stars
- Updated June 6, 2026
- allinherog-star/ai-skills
Rewrite AI-sounding Chinese drafts into natural, platform-ready copy before you publish on blogs, social, or community channels.
About
ai-humanizer-zh is an agent skill that helps solo builders and small teams rewrite Chinese content so it reads like a real person wrote it—not a generic LLM. You paste or upload draft text (or point at a public link), optionally describe the platform, audience, and tone, and the skill guides a polish pass that strips robotic phrasing and hollow marketing voice while preserving your headings and paragraph flow. It fits the Grow phase when you are about to post articles, newsletters, product updates, or community threads where readers spot AI-generated copy instantly. Because strong positioning and launch copy often need the same treatment, the skill is also useful during Validate and Launch when you are tightening landing pages or distribution posts. The workflow is editorial: no code, no APIs—just structured inputs so your agent applies consistent humanization rules instead of one-off chat rewrites.
- Context composer accepts pasted text, uploaded files, or reference URLs as source material
- Controls for target platform, review depth, audience, goal, brand requirements, and tone preference
- Focused on removing generic AI tone and marketing clichés while keeping structure (titles, paragraphs)
- Supports explicit rewrite goals: more conversational, professional, opinionated, or publication-ready Chinese
Ai Humanizer Zh by the numbers
- 51 all-time installs (skills.sh)
- Ranked #1,320 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/allinherog-star/ai-skills --skill ai-humanizer-zhAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 51 |
|---|---|
| repo stars | ★ 45 |
| Last updated | June 6, 2026 |
| Repository | allinherog-star/ai-skills ↗ |
What it does
Rewrite AI-sounding Chinese drafts into natural, platform-ready copy before you publish on blogs, social, or community channels.
Files
ai-humanizer-zh 中文润色去AI味 助手
概述
中文润色去AI味 助手用于回答「怎么去AI味」、中文改写、AI 写作痕迹、文案润色,适合市场营销、运营、内容创作者、产品在明确业务目标、内容材料或分析对象后调用。 它会结合待去 AI 味文本、粘贴需要改得更自然的中文内容,可以是 AI 生成文章、营销文案、社…等输入,整理关键上下文,并输出AI 写作痕迹诊断、自然化改写稿、问题片段说明,便于继续执行、复盘或交付。 能力定位补充:中文内容创作者、运营和营销团队常需要把 AI 生成草稿改成更自然、更像真实人类写作的发布稿,适合沉淀为平台上的文本诊断与改写 技能。
什么时候使用
适用场景
- 用户提出“怎么去AI味”这类问题,需要快速拆解目标、判断重点并形成可执行结果
- 市场营销、运营、内容创作者、产品需要围绕中文润色去AI味 助手生成AI 写作痕迹诊断、自然化改写稿、问题片段说明
- 用户已经准备了改写目标(例如更像真人、更口语、更专业、更有观点、更适合发布或降低营销腔。)、目标读者(说明读者是谁、他们熟悉什么、对内容最在意什么。)、公开文本链接(填写无需登录即可访问的文章、页面、笔记或文档链接。),希望整理成可执行的分析或优化结果
- 用户需要把中文润色去AI味 助手相关材料转成清晰结论、优先级和下一步动作
调用方式
通过导出的 Python runner 直接调用 AI Skills API:
命令示例
基础调用
python3 scripts/run.py --params '{}'带常用参数调用
python3 scripts/run.py --params '{"goal":"改写目标"}'参数说明
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
goal | string | 否 | - | 例如更像真人、更口语、更专业、更有观点、更适合发布或降低营销腔 |
audience | string | 否 | - | 说明读者是谁、他们熟悉什么、对内容最在意什么 |
materialUrl | string | 否 | - | 填写无需登录即可访问的文章、页面、笔记或文档链接;需要传可访问的完整 URL |
reviewDepth | string | 否 | 标准改写 | 选择只做快速去味、标准改写,还是深度重写并解释修改原因;可选值:快速去味、标准改写、深度重写 |
materialFile | string | 否 | - | 支持 docx、pdf、md、txt 等文本稿件,适合提交文章草稿、审稿版或长文材料 |
materialText | string | 否 | - | 粘贴需要改得更自然的中文内容,可以是 AI 生成文章、营销文案、社媒长文、课程稿或说明文 |
targetPlatform | string | 否 | 通用中文内容 | 选择文本最终要发布或交付的场景;可选值:通用中文内容、公众号文章、小红书笔记、官网博客、营销落地页、课程讲稿、知识库文档 |
tonePreference | string | 否 | - | 例如自然口语、专业克制、创作者第一人称、品牌官方但不生硬 |
brandRequirements | string | 否 | - | 补充必须保留的事实、品牌说法、禁用词、合规边界或不能改变的语气 |
完整机器可读参数结构见 references/form-schema.json。
参数取值参考
当前技能没有需要额外查表的分类参数。
支持的输入格式
当前技能直接接收 JSON 参数;如果参数里包含链接字段,请传完整、可访问的 URL。
示例请求
下面的示例参数可直接传给 scripts/run.py,runner 会把它们发送给 AI Skills API。
python3 scripts/run.py --params '{"goal":"改写目标"}'等价的 --params JSON:
{
"goal": "改写目标"
}返回结果示例
{
"success": true,
"data": {
"message": "示例结果请以技能真实返回结构为准。"
},
"meta": {
"executionTime": 842,
"cached": false
}
}交付内容
- AI 写作痕迹诊断、自然化改写稿、问题片段说明:围绕用户目标整理可直接阅读、复盘或交付的核心结果。
- 输入材料解读:结合改写目标(例如更像真人、更口语、更专业、更有观点、更适合发布或降低营销腔。)、目标读者(说明读者是谁、他们熟悉什么、对内容最在意什么。)、公开文本链接(填写无需登录即可访问的文章、页面、笔记或文档链接。)提炼关键上下文和判断依据。
- 下一步动作:给出优先级、执行建议或可继续加工的内容框架。
结果使用建议
- 先判断输出是否回答了用户关于「中文润色去AI味 助手」的核心问题。
- 再检查结果是否覆盖AI 写作痕迹诊断、自然化改写稿、问题片段说明,以及是否给出明确下一步动作。
- 如果输入材料较少,建议让用户补充目标、受众、限制条件或原始材料后再运行。
运行前准备
AISKILLS_BASE_URL:默认https://ai-skills.aiAISKILLS_API_KEY:必填,用于认证调用AISKILLS_TENANT_ID:默认default
interface:
display_name: "中文润色去AI味 助手"
short_description: "中文润色去AI味 助手"
default_prompt: "Use $ai-humanizer-zh to help with 中文润色去AI味 助手"
policy:
allow_implicit_invocation: true
{
"type": "object",
"required": [],
"x-layout": {
"mode": "contextComposer",
"rows": 4,
"placeholder": "粘贴需要去 AI 味的中文文本,最好保留标题、段落和想要发布的平台背景",
"primaryTabs": [
{
"id": "paste",
"icon": "FileText",
"field": "materialText",
"label": "粘贴待润色文本"
},
{
"id": "upload",
"icon": "Upload",
"field": "materialFile",
"label": "上传文本文件"
},
{
"id": "link",
"icon": "Link",
"field": "materialUrl",
"label": "填参考链接"
}
],
"primaryField": "materialText",
"advancedLabel": "补充表达要求",
"primaryControlFields": [
"targetPlatform",
"reviewDepth"
],
"advancedControlFields": [
"audience",
"goal",
"brandRequirements",
"tonePreference"
]
},
"properties": {
"goal": {
"type": "string",
"title": "改写目标",
"x-rows": 3,
"description": "例如更像真人、更口语、更专业、更有观点、更适合发布或降低营销腔。",
"x-component": "Textarea"
},
"audience": {
"type": "string",
"title": "目标读者",
"x-rows": 3,
"description": "说明读者是谁、他们熟悉什么、对内容最在意什么。",
"x-component": "Textarea"
},
"materialUrl": {
"type": "string",
"title": "公开文本链接",
"format": "uri",
"description": "填写无需登录即可访问的文章、页面、笔记或文档链接。"
},
"reviewDepth": {
"enum": [
"快速去味",
"标准改写",
"深度重写"
],
"type": "string",
"title": "处理深度",
"default": "标准改写",
"x-options": [
{
"icon": "Zap",
"color": "amber",
"group": "处理深度",
"label": "快速去味",
"value": "快速去味",
"description": "优先删掉最明显的 AI 腔、套话和机械连接词"
},
{
"icon": "ClipboardList",
"color": "blue",
"group": "处理深度",
"label": "标准改写",
"value": "标准改写",
"description": "给出诊断、自然改写稿和关键修改说明"
},
{
"icon": "FileText",
"color": "purple",
"group": "处理深度",
"label": "深度重写",
"value": "深度重写",
"description": "在保留事实基础上重排结构、节奏和作者声音"
}
],
"description": "选择只做快速去味、标准改写,还是深度重写并解释修改原因。"
},
"materialFile": {
"type": "string",
"title": "上传待改稿件",
"format": "binary",
"x-accept": ".docx,.pdf,.md,.txt",
"x-max-size": 20971520,
"description": "支持 docx、pdf、md、txt 等文本稿件,适合提交文章草稿、审稿版或长文材料。",
"x-component": "FileUpload"
},
"materialText": {
"type": "string",
"title": "待去 AI 味文本",
"x-rows": 14,
"description": "粘贴需要改得更自然的中文内容,可以是 AI 生成文章、营销文案、社媒长文、课程稿或说明文。",
"x-component": "Textarea"
},
"targetPlatform": {
"enum": [
"通用中文内容",
"公众号文章",
"小红书笔记",
"官网博客",
"营销落地页",
"课程讲稿",
"知识库文档"
],
"type": "string",
"title": "发布平台",
"default": "通用中文内容",
"x-options": [
{
"icon": "FileText",
"color": "blue",
"group": "发布平台",
"label": "通用中文内容",
"value": "通用中文内容",
"description": "不限定平台,按清楚、自然、可发布的中文表达处理"
},
{
"icon": "Newspaper",
"color": "green",
"group": "发布平台",
"label": "公众号文章",
"value": "公众号文章",
"description": "适合长文叙述、观点表达和段落节奏调整"
},
{
"icon": "MessageCircle",
"color": "pink",
"group": "发布平台",
"label": "小红书笔记",
"value": "小红书笔记",
"description": "适合更口语、更具体、更像真实经验分享的表达"
},
{
"icon": "Globe",
"color": "cyan",
"group": "发布平台",
"label": "官网博客",
"value": "官网博客",
"description": "适合保留专业信息,同时减少模板感和宣传腔"
},
{
"icon": "Megaphone",
"color": "orange",
"group": "发布平台",
"label": "营销落地页",
"value": "营销落地页",
"description": "适合压缩空话,突出具体卖点和可信表达"
},
{
"icon": "GraduationCap",
"color": "purple",
"group": "发布平台",
"label": "课程讲稿",
"value": "课程讲稿",
"description": "适合把书面 AI 腔改成更顺口、更像人讲出来的稿子"
},
{
"icon": "BookOpen",
"color": "amber",
"group": "发布平台",
"label": "知识库文档",
"value": "知识库文档",
"description": "适合保留准确性和结构,去掉机械连接词与套话"
}
],
"description": "选择文本最终要发布或交付的场景。"
},
"tonePreference": {
"type": "string",
"title": "语气偏好",
"description": "例如自然口语、专业克制、创作者第一人称、品牌官方但不生硬。"
},
"brandRequirements": {
"type": "string",
"title": "必须保留与避开",
"x-rows": 3,
"description": "补充必须保留的事实、品牌说法、禁用词、合规边界或不能改变的语气。",
"x-component": "Textarea"
}
},
"x-profile-context": true,
"x-required-any-of": [
{
"fields": [
"materialText",
"materialFile",
"materialUrl"
],
"message": "请粘贴待改文本、上传稿件,或填写公开文本链接"
}
]
}
{
"id": "ai-humanizer-zh",
"slug": "ai-humanizer-zh",
"question": "怎么去AI味?",
"skillName": "中文润色去AI味 助手",
"tags": [
"中文改写",
"AI 写作痕迹",
"文案润色",
"内容审稿",
"自然表达"
],
"profession": [
"marketing",
"operation",
"creator",
"product"
],
"industry": [
"media",
"ecommerce",
"education",
"software"
],
"hidden": false,
"auth": {
"type": "api-key",
"header": "X-API-Key",
"tenantHeader": "X-Tenant-Id"
},
"comingSoon": false,
"providerType": "llm",
"providerConfig": {
"trend": {
"sourceGap": "外部开源资料 需先安装到 技能目录 目录,再由平台 manifest/sync 归一化。",
"sourceIds": [
"https://github.com/op7418/humanizer-zh"
],
"sourceNotes": "recent_hot_search_signal: https://github.com/op7418/humanizer-zh/humanizer-zh"
},
"catalog": {
"icon": "FileText"
},
"managedBy": "worker-skill-local-sync",
"riskLevel": "none",
"bulkSupply": {
"wave": "external-hot-open-source-2026-05-17",
"batchId": "external-hot-open-source-2026-05-17",
"candidateId": "humanizer-zh",
"sourceShard": "external-open-source",
"coverageNotes": "中文内容创作者、运营和营销团队常需要把 AI 生成草稿改成更自然、更像真实人类写作的发布稿,适合沉淀为平台上的文本诊断与改写 技能目录。",
"primaryIndustry": "media",
"generatorVersion": "manual-curated-2026-05-17",
"primaryProfession": "marketing",
"taxonomySourceVersion": "external-open-source-skill-intake-v1"
},
"compliance": {
"riskTier": "R1",
"launchGate": "sample_required",
"riskDomains": [
"copy_cro"
],
"reviewStatus": "auto_screened",
"sourceLimits": "外部开源资料 只作为能力来源,平台输出必须以用户提交材料和公开可见信息为依据。",
"riskRationale": "中文内容创作者、运营和营销团队常需要把 AI 生成草稿改成更自然、更像真实人类写作的发布稿,适合沉淀为平台上的文本诊断与改写 技能目录。",
"allowedOutputs": [
"AI 写作痕迹诊断",
"自然化改写稿",
"问题片段说明",
"发布前检查清单"
],
"forbiddenOutputs": [
"不得输出未经核验的确定性专业结论",
"不得代替用户执行第三方平台操作"
],
"humanReviewRequired": false
},
"safetySha256": "678139ccff88385ca5e1351b3ec2d40a047af919d3293087c3174de41ae5b90d",
"safetyStatus": "allowed",
"asyncProvider": "skills2api-scheduler",
"workerSkillId": "ai-humanizer-zh",
"resultContract": "ResultEnvelope",
"externalOpenSource": {
"batchId": "external-hot-open-source-2026-05-17",
"license": "unknown_pending_verification",
"category": "copy_cro",
"sourceRef": "https://github.com/op7418/humanizer-zh",
"sourceUrl": "https://github.com/op7418/humanizer-zh",
"importedAt": "2026-05-17T07:05:09.961Z",
"candidateId": "humanizer-zh",
"sourceSignal": "recent_hot_search_signal",
"originalSkillId": "humanizer-zh"
},
"resultRequirements": {
"mustInclude": [
"summary",
"items",
"artifacts"
]
}
},
"invocationMode": "execute",
"invocation": {
"type": "execute",
"executePath": "/api/execute"
},
"formSchema": {
"type": "object",
"required": [],
"x-layout": {
"mode": "contextComposer",
"rows": 4,
"placeholder": "粘贴需要去 AI 味的中文文本,最好保留标题、段落和想要发布的平台背景",
"primaryTabs": [
{
"id": "paste",
"icon": "FileText",
"field": "materialText",
"label": "粘贴待润色文本"
},
{
"id": "upload",
"icon": "Upload",
"field": "materialFile",
"label": "上传文本文件"
},
{
"id": "link",
"icon": "Link",
"field": "materialUrl",
"label": "填参考链接"
}
],
"primaryField": "materialText",
"advancedLabel": "补充表达要求",
"primaryControlFields": [
"targetPlatform",
"reviewDepth"
],
"advancedControlFields": [
"audience",
"goal",
"brandRequirements",
"tonePreference"
]
},
"properties": {
"goal": {
"type": "string",
"title": "改写目标",
"x-rows": 3,
"description": "例如更像真人、更口语、更专业、更有观点、更适合发布或降低营销腔。",
"x-component": "Textarea"
},
"audience": {
"type": "string",
"title": "目标读者",
"x-rows": 3,
"description": "说明读者是谁、他们熟悉什么、对内容最在意什么。",
"x-component": "Textarea"
},
"materialUrl": {
"type": "string",
"title": "公开文本链接",
"format": "uri",
"description": "填写无需登录即可访问的文章、页面、笔记或文档链接。"
},
"reviewDepth": {
"enum": [
"快速去味",
"标准改写",
"深度重写"
],
"type": "string",
"title": "处理深度",
"default": "标准改写",
"x-options": [
{
"icon": "Zap",
"color": "amber",
"group": "处理深度",
"label": "快速去味",
"value": "快速去味",
"description": "优先删掉最明显的 AI 腔、套话和机械连接词"
},
{
"icon": "ClipboardList",
"color": "blue",
"group": "处理深度",
"label": "标准改写",
"value": "标准改写",
"description": "给出诊断、自然改写稿和关键修改说明"
},
{
"icon": "FileText",
"color": "purple",
"group": "处理深度",
"label": "深度重写",
"value": "深度重写",
"description": "在保留事实基础上重排结构、节奏和作者声音"
}
],
"description": "选择只做快速去味、标准改写,还是深度重写并解释修改原因。"
},
"materialFile": {
"type": "string",
"title": "上传待改稿件",
"format": "binary",
"x-accept": ".docx,.pdf,.md,.txt",
"x-max-size": 20971520,
"description": "支持 docx、pdf、md、txt 等文本稿件,适合提交文章草稿、审稿版或长文材料。",
"x-component": "FileUpload"
},
"materialText": {
"type": "string",
"title": "待去 AI 味文本",
"x-rows": 14,
"description": "粘贴需要改得更自然的中文内容,可以是 AI 生成文章、营销文案、社媒长文、课程稿或说明文。",
"x-component": "Textarea"
},
"targetPlatform": {
"enum": [
"通用中文内容",
"公众号文章",
"小红书笔记",
"官网博客",
"营销落地页",
"课程讲稿",
"知识库文档"
],
"type": "string",
"title": "发布平台",
"default": "通用中文内容",
"x-options": [
{
"icon": "FileText",
"color": "blue",
"group": "发布平台",
"label": "通用中文内容",
"value": "通用中文内容",
"description": "不限定平台,按清楚、自然、可发布的中文表达处理"
},
{
"icon": "Newspaper",
"color": "green",
"group": "发布平台",
"label": "公众号文章",
"value": "公众号文章",
"description": "适合长文叙述、观点表达和段落节奏调整"
},
{
"icon": "MessageCircle",
"color": "pink",
"group": "发布平台",
"label": "小红书笔记",
"value": "小红书笔记",
"description": "适合更口语、更具体、更像真实经验分享的表达"
},
{
"icon": "Globe",
"color": "cyan",
"group": "发布平台",
"label": "官网博客",
"value": "官网博客",
"description": "适合保留专业信息,同时减少模板感和宣传腔"
},
{
"icon": "Megaphone",
"color": "orange",
"group": "发布平台",
"label": "营销落地页",
"value": "营销落地页",
"description": "适合压缩空话,突出具体卖点和可信表达"
},
{
"icon": "GraduationCap",
"color": "purple",
"group": "发布平台",
"label": "课程讲稿",
"value": "课程讲稿",
"description": "适合把书面 AI 腔改成更顺口、更像人讲出来的稿子"
},
{
"icon": "BookOpen",
"color": "amber",
"group": "发布平台",
"label": "知识库文档",
"value": "知识库文档",
"description": "适合保留准确性和结构,去掉机械连接词与套话"
}
],
"description": "选择文本最终要发布或交付的场景。"
},
"tonePreference": {
"type": "string",
"title": "语气偏好",
"description": "例如自然口语、专业克制、创作者第一人称、品牌官方但不生硬。"
},
"brandRequirements": {
"type": "string",
"title": "必须保留与避开",
"x-rows": 3,
"description": "补充必须保留的事实、品牌说法、禁用词、合规边界或不能改变的语气。",
"x-component": "Textarea"
}
},
"x-profile-context": true,
"x-required-any-of": [
{
"fields": [
"materialText",
"materialFile",
"materialUrl"
],
"message": "请粘贴待改文本、上传稿件,或填写公开文本链接"
}
]
}
}
#!/usr/bin/env python3
import argparse
import json
import os
import ssl
import sys
import time
import urllib.error
import urllib.request
SKILL_ID = "ai-humanizer-zh"
EXECUTE_PATH = "/api/execute"
DEFAULT_BASE_URL = "https://ai-skills.ai"
RECHARGE_URL = "https://ai-skills.ai/user/billing"
def fail(message):
print(json.dumps({"success": False, "error": {"code": "RUNNER_ERROR", "message": message}}, ensure_ascii=False))
sys.exit(1)
def load_params(raw):
try:
return json.loads(raw or "{}")
except json.JSONDecodeError as exc:
fail(f"Invalid params JSON: {exc}")
def build_base_url():
return os.getenv("AISKILLS_BASE_URL", DEFAULT_BASE_URL).rstrip("/")
def build_headers():
api_key = os.getenv("AISKILLS_API_KEY", "").strip()
tenant_id = os.getenv("AISKILLS_TENANT_ID", "default").strip() or "default"
if not api_key:
fail("AISKILLS_API_KEY is required")
return {
"Content-Type": "application/json",
# Cloudflare blocks urllib's default Python user agent for this endpoint.
"User-Agent": "ai-skills-runner/1.0 (+https://ai-skills.ai)",
"Accept": "application/json",
"X-API-Key": api_key,
"X-Tenant-Id": tenant_id,
}
def build_ssl_context():
if os.getenv("SSL_CERT_FILE") or os.getenv("SSL_CERT_DIR"):
return ssl.create_default_context()
try:
import certifi
except ImportError:
return ssl.create_default_context()
return ssl.create_default_context(cafile=certifi.where())
SSL_CONTEXT = build_ssl_context()
def print_url_error(exc):
reason = getattr(exc, "reason", exc)
code = "SSL_CERTIFICATE_VERIFY_FAILED" if isinstance(reason, ssl.SSLCertVerificationError) else "NETWORK_ERROR"
message = str(reason)
if code == "SSL_CERTIFICATE_VERIFY_FAILED":
message = (
"HTTPS certificate verification failed. Install certifi or set SSL_CERT_FILE "
f"to a valid CA bundle, then retry: {reason}"
)
print(json.dumps({"success": False, "error": {"code": code, "message": message}}, ensure_ascii=False))
sys.exit(1)
def print_http_error(exc):
payload_text = exc.read().decode("utf-8")
try:
parsed = json.loads(payload_text)
except json.JSONDecodeError:
parsed = {"success": False, "error": {"code": f"HTTP_{exc.code}", "message": str(exc)}}
error = parsed.setdefault("error", {})
code = error.get("code") or f"HTTP_{exc.code}"
if exc.code == 402 or code == "BILLING_BALANCE_INSUFFICIENT":
error["code"] = "BILLING_BALANCE_INSUFFICIENT"
error["message"] = f"余额不足,请前往 {RECHARGE_URL} 充值后重试"
meta = parsed.setdefault("meta", {})
meta["rechargeUrl"] = RECHARGE_URL
print(json.dumps(parsed, ensure_ascii=False))
sys.exit(1)
def request_json(method, path, payload):
body = json.dumps(payload).encode("utf-8")
req = urllib.request.Request(
f"{build_base_url()}{path}",
data=body,
method=method,
headers=build_headers(),
)
try:
with urllib.request.urlopen(req, context=SSL_CONTEXT) as response:
return json.loads(response.read().decode("utf-8"))
except urllib.error.HTTPError as exc:
print_http_error(exc)
except urllib.error.URLError as exc:
print_url_error(exc)
def is_async_terminal(data):
status = data.get("status")
return status in {"completed", "failed", "needs_input", "cancelled"}
def poll_async_result(start_response, max_attempts, interval_seconds):
data = start_response.get("data") or {}
if data.get("mode") != "async":
return start_response
if is_async_terminal(data):
return start_response
execution_id = data.get("executionId") or data.get("turnId")
job_id = data.get("jobId")
if not execution_id and not job_id:
return start_response
for _ in range(max_attempts):
time.sleep(interval_seconds)
response = request_json("POST", EXECUTE_PATH, {
"skillId": SKILL_ID,
"params": {},
"execution": {
"action": "poll",
"executionId": execution_id,
"jobId": job_id,
},
})
data = response.get("data") or {}
if data.get("mode") == "async" and is_async_terminal(data):
return response
fail("Async skill execution did not reach a terminal state in time")
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--params", default="{}")
parser.add_argument("--poll-attempts", type=int, default=180)
parser.add_argument("--poll-interval", type=float, default=2.0)
args = parser.parse_args()
params = load_params(args.params)
response = request_json("POST", EXECUTE_PATH, {"skillId": SKILL_ID, "params": params})
print(json.dumps(poll_async_result(response, args.poll_attempts, args.poll_interval), ensure_ascii=False))
if __name__ == "__main__":
main()