Chanjing Text To Digital Person

v1.0.6

Use Chanjing text-to-digital-person APIs for AI portraits, talking videos, optional LoRA training, polling, and explicit downloads when requested.

0· 213·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for binkes/chanjing-text-to-digital-person.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Chanjing Text To Digital Person" (binkes/chanjing-text-to-digital-person) from ClawHub.
Skill page: https://clawhub.ai/binkes/chanjing-text-to-digital-person
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install chanjing-text-to-digital-person

ClawHub CLI

Package manager switcher

npx clawhub@latest install chanjing-text-to-digital-person
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included scripts and manifest: the package implements API calls for photo/motion/LoRA tasks against open-api.chanjing.cc, and the credential model (credentials.json with app_id/secret_key/access_token) is consistent with that purpose. Allowed hosts and allowed command (python3) in manifest align with functionality.
Instruction Scope
SKILL.md and scripts limit actions to reading/writing the declared credentials.json, calling the documented Chanjing endpoints, polling task status, and downloading output only when explicitly requested. The only out-of-skill behaviors are opening a browser or invoking a local credentials-guard script when credentials are missing—this behavior is documented in SKILL.md/manifest.
Install Mechanism
No install spec or remote downloads; the skill is delivered as scripts that run under python3. There are no third-party installers or archive extraction steps that would write or execute arbitrary code from external URLs.
Credentials
No unexpected environment variables or unrelated credentials are requested. The skill uses a local credentials.json (default ~/.chanjing/credentials.json) to store app_id/secret_key and persists access_token to disk — this persistence is declared in the manifest and is proportionate to the need to use the API.
Persistence & Privilege
The skill persists access_token/expire_in back to credentials.json (persistAccessTokenOnDisk: true), and will open a browser or call a local guard script if AK/SK are missing. alwaysSkill is false and the skill does not modify other skills or global agent settings per manifest.
Assessment
This skill appears to do what it says: call Chanjing APIs, poll tasks, and optionally download outputs. Before installing: (1) Confirm you trust the Chanjing service (open-api.chanjing.cc) because API requests and output URLs go there; (2) be aware credentials (app_id/secret_key) are stored in ~/.chanjing/credentials.json and the skill will persist access_token to that file — keep that file out of version control (manifest already notes doNotCommitToVcs); (3) when asked to download a URL, the downloader will fetch any URL you provide — only request downloads from trusted URLs; (4) the skill may open your browser or run a local credentials-guard script if credentials are missing, which is documented but worth confirming the guard script you have is the expected one; (5) avoid uploading/pointing to sensitive personal photos unless you accept the provider's privacy/usage terms. Overall the package is internally consistent and documented.

Like a lobster shell, security has layers — review code before you run it.

latestvk97djkjthfb7sx709zvzn08ac583qmd3
213downloads
0stars
7versions
Updated 1mo ago
v1.0.6
MIT-0

Chanjing Text To Digital Person

功能说明

文生图、图生说话视频、可选 LoRA 训练与轮询;用户明确要求时下载生成物。凭据与权限见 manifest.yaml。脚本依赖 ffmpeg/ffprobe。

运行依赖

  • python3 与同仓库 scripts/*.py(含 _auth.py_task_api.py
  • ffmpeg/ffprobe 门控

环境变量与机器可读声明

  • 环境变量键名与说明:manifest.yamlenvironment 段)及本文
  • 变量、凭据模型、合规 permissionsclientPermissionsagentPolicymanifest.yaml

使用命令

  • ClawHub(slug 以注册表为准):clawhub run chanjing-text-to-digital-person
  • 本仓库python skills/chanjing-text-to-digital-person/scripts/create_photo_task.py …(见 Standard Workflow

登记与审稿(单一事实来源)

路径、primaryEnv 省略、persistAccessTokenOnDisk、敏感字段、agentPolicy、可选 env 等:manifest.yaml 为准。实现上由 _auth.py_task_api.py 与各 CLI 脚本承担;本篇从 When to Use 起写流程。

When to Use This Skill

当用户要做这些事时使用本 Skill:

  • 根据人物提示词生成数字人形象图
  • 把生成的人物图转成会说话的短视频
  • 查询文生图 / 图生视频 / LoRA 任务状态
  • 在用户明确要求时,把生成图片或视频下载到本地

如果需求是“上传真人素材训练定制数字人”,优先使用 chanjing-customised-person
如果需求是“拿已有数字人做口播视频合成”,优先使用 chanjing-video-compose

Preconditions

执行本 Skill 前,必须先通过 chanjing-credentials-guard 完成 AK/SK 与 Token 校验。

本 Skill 与 guard 共用:

  • ~/.chanjing/credentials.json
  • https://open-api.chanjing.cc

无凭证时,脚本会自动打开蝉镜登录页(若同仓库存在则执行 chanjing-credentials-guard/scripts/open_login_page.py,否则 webbrowser.open),并提示本地执行 chanjing_config.py

审阅与安全(凭据)

Purpose / Credentials / Persistence 相关的逐项说明见 manifest.yaml(缺凭证时可能子进程调用 guard 的 open_login_page.py 等行为见 clientPermissions)。

Standard Workflow

主流程通常分两段,且都是异步任务:

  1. 调用 create_photo_task.py 创建文生图任务,得到 photo_unique_id
  2. 调用 poll_photo_task.py 轮询到成功,选一张 photo_path
  3. 调用 create_motion_task.py 创建图生视频任务,得到 motion_unique_id
  4. 调用 poll_motion_task.py 轮询到成功,得到最终 video_url
  5. 只有在用户明确要求保存到本地时,才调用 download_result.py

可选扩展:

  • 若用户想做 LoRA 训练,调用 create_lora_task.pypoll_lora_task.py
  • poll_lora_task.py 成功后会返回一条 photo_task_id,可继续用 poll_photo_task.py 拿图

Covered APIs

本 Skill 当前覆盖:

  • POST /open/v1/aigc/photo
  • GET /open/v1/aigc/photo/task
  • GET /open/v1/aigc/photo/task/page
  • POST /open/v1/aigc/motion
  • GET /open/v1/aigc/motion/task
  • POST /open/v1/aigc/lora/task/create
  • GET /open/v1/aigc/lora/task

Scripts

脚本目录:

  • skills/chanjing-text-to-digital-person/scripts/

本仓库随附文件(勿与仅含 _auth.py 的精简包混淆)

完整包内含 _auth.py_task_api.py(供任务脚本复用)及下列 .py CLI;请用 python3 <路径>/<脚本名>.py 调用(与仓库内其它蝉镜 skill 约定一致)。

文件名(仓库内)说明
_auth.pycredentials.json、刷新并 写回 access_token / expire_in;缺 AK/SK 时尝试 open_login_page.py
_task_api.py任务 API 共用逻辑(由各 CLI import)
create_photo_task.py创建文生图任务 → photo_unique_id
get_photo_task.py单个文生图任务详情
list_tasks.py任务列表(type=1 photo,type=2 motion)
poll_photo_task.py轮询文生图至完成 → 默认首张图 URL
create_motion_task.py创建图生视频 → motion_unique_id
get_motion_task.py单个图生视频任务详情
poll_motion_task.py轮询图生视频至完成 → 默认视频 URL
create_lora_task.py创建 LoRA 训练 → lora_id
get_lora_task.pyLoRA 任务详情
poll_lora_task.py轮询 LoRA 至完成 → 默认首条 photo_task_id
download_result.py仅在需要落盘时:下载到 outputs/text-to-digital-person/(或 --output

若环境中 缺少 上表任一入口或 _task_api.py,属于 分发/打包不完整

Usage Examples

示例 1:文生图后直接图生视频

PHOTO_TASK_ID=$(python3 skills/chanjing-text-to-digital-person/scripts/create_photo_task.py \
  --age "Young adult" \
  --gender Female \
  --number-of-images 1 \
  --industry "教育培训" \
  --background "现代直播间背景" \
  --detail "短发,亲和力强,职业装" \
  --talking-pose "上半身特写,站立讲解")

PHOTO_URL=$(python3 skills/chanjing-text-to-digital-person/scripts/poll_photo_task.py \
  --unique-id "$PHOTO_TASK_ID")

MOTION_TASK_ID=$(python3 skills/chanjing-text-to-digital-person/scripts/create_motion_task.py \
  --photo-unique-id "$PHOTO_TASK_ID" \
  --photo-path "$PHOTO_URL" \
  --emotion "自然播报,语气清晰自信" \
  --gesture)

python3 skills/chanjing-text-to-digital-person/scripts/poll_motion_task.py \
  --unique-id "$MOTION_TASK_ID"

示例 2:LoRA 训练

LORA_ID=$(python3 skills/chanjing-text-to-digital-person/scripts/create_lora_task.py \
  --name "演示LoRA" \
  --photo-url https://example.com/1.jpg \
  --photo-url https://example.com/2.jpg \
  --photo-url https://example.com/3.jpg \
  --photo-url https://example.com/4.jpg \
  --photo-url https://example.com/5.jpg)

python3 skills/chanjing-text-to-digital-person/scripts/poll_lora_task.py \
  --lora-id "$LORA_ID"

Download Rule

下载是显式动作,不是默认动作:

  • poll_photo_task.pypoll_motion_task.py 成功后应先返回远端 URL
  • 不要自动下载结果文件
  • 只有当用户明确表达“下载到本地”“保存到 outputs”“帮我落盘”时,才执行 download_result.py

Output Convention

默认本地输出目录:

  • outputs/text-to-digital-person/

Additional Resources

更多接口细节见:

  • skills/chanjing-text-to-digital-person/reference.md
  • skills/chanjing-text-to-digital-person/examples.md

Comments

Loading comments...