← 返回 Skills 市场
binkes

Chanjing Text To Digital Person

作者 BinKes · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ✓ 安全检测通过
215
总下载
0
收藏
1
当前安装
7
版本数
在 OpenClaw 中安装
/install chanjing-text-to-digital-person
功能描述
Use Chanjing text-to-digital-person APIs for AI portraits, talking videos, optional LoRA training, polling, and explicit downloads when requested.
使用说明 (SKILL.md)

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 \x3C路径>/\x3C脚本名>.py 调用(与仓库内其它蝉镜 skill 约定一致)。

文件名(仓库内) 说明
_auth.py credentials.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.py LoRA 任务详情
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
安全使用建议
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.
功能分析
Type: OpenClaw Skill Name: chanjing-text-to-digital-person Version: 1.0.6 The skill bundle provides a legitimate interface for the Chanjing Text-to-Digital-Person API, allowing users to generate AI portraits and videos. It manages credentials locally in `~/.chanjing/credentials.json` and communicates exclusively with documented endpoints (`open-api.chanjing.cc`). While `_auth.py` contains logic to execute a script from a sibling directory (`chanjing-credentials-guard`), this behavior is explicitly documented as a dependency for credential management. The code uses standard libraries (`urllib`, `subprocess`) for its stated purposes, and no evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chanjing-text-to-digital-person
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chanjing-text-to-digital-person 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
**Summary:** This release formalizes environment variables and credential handling, adds a machine-readable manifest, and aligns documentation to the manifest model. - Added manifest.yaml for machine-readable skill metadata and environment declarations. - Deprecated SKILL.md-specific credential/environment documentation in favor of single-source manifest.yaml. - Updated environment variable names to CHANJING_OPENAPI_CREDENTIALS_DIR and CHANJING_OPENAPI_BASE_URL (legacy names still accepted for backward compatibility). - Clarified in documentation that all credential, permission, and agentPolicy details are defined in manifest.yaml. - No changes to core script logic; scripts/_auth.py and scripts/_task_api.py are unchanged in function. - ffmpeg/ffprobe requirements remain unchanged (not required).
v1.0.5
- Added top-level skill metadata: author, binaries, env, category, and tags. - Clarified core features, runtime dependencies, and usage commands in a concise "功能说明" section. - Provided explicit environment variable documentation and standard usage instructions. - Consolidated and streamlined introductory content for easier understanding and onboarding. - No functional or API-related changes; documentation only.
v1.0.4
chanjing-text-to-digital-person 1.0.4 - Added full set of CLI scripts for all task types: create, get, poll, and download for photo, motion, and LoRA (11 new files, e.g., create_lora_task.py, poll_motion_task.py, etc.). - Expanded and clarified documentation to formally declare credentials file handling, out-of-band config paths, registry metadata, and security policy—now aligns registry and runtime behavior. - Standardized script interface: all scripts now accept explicit parameters and consistent output conventions. - Usage examples and API coverage sections updated for all available tasks and flows. - Registry metadata in SKILL.md now explicitly lists paths, sensitive fields, and credential persistence settings. - No fundamental workflow changes—improvements are in packaging, documentation, and script completeness.
v1.0.3
- Internal changes were made to scripts/_auth.py. - No changes to user-facing features or behavior. - Documentation and usage remain the same.
v1.0.2
- Added a metadata block to SKILL.md for improved discoverability and registry format. - Updated and clarified the "Preconditions" section to require use of chanjing-credentials-guard for AK/SK and Token validation before running the skill. - Expanded credential and security notes, with "安全与凭据(登记摘要)" outlining details on configuration file, API base, and token handling. - Minor refinements to descriptions and script table to align with new credential guard and documentation conventions. - General documentation improvements for clarity and compliance with updated best practices.
v1.0.1
- Improved skill isolation: authentication and config now fully handled internally, not dependent on external guard scripts. - SKILL.md updated to clarify use of CHANJING_CONFIG_DIR and CHANJING_API_BASE environment variables. - Added documentation for new scripts: chanjing-config and chanjing-get-token. - Removed requirement to run chanjing-credentials-guard before using this skill. - Minor enhancements to local credentials and token refresh logic.
v1.0.0
- Initial release of chanjing-text-to-digital-person skill. - Provides scripts to generate digital human portraits, convert them into talking videos, optionally run LoRA training, and manage tasks. - Supports polling task status for photo, video, and LoRA tasks. - Implements explicit asset downloads only when requested by the user. - Integrates with chanjing-credentials-guard for authentication.
元数据
Slug chanjing-text-to-digital-person
版本 1.0.6
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 7
常见问题

Chanjing Text To Digital Person 是什么?

Use Chanjing text-to-digital-person APIs for AI portraits, talking videos, optional LoRA training, polling, and explicit downloads when requested. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 215 次。

如何安装 Chanjing Text To Digital Person?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chanjing-text-to-digital-person」即可一键安装,无需额外配置。

Chanjing Text To Digital Person 是免费的吗?

是的,Chanjing Text To Digital Person 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chanjing Text To Digital Person 支持哪些平台?

Chanjing Text To Digital Person 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chanjing Text To Digital Person?

由 BinKes(@binkes)开发并维护,当前版本 v1.0.6。

💬 留言讨论