SuperAPI AI Directory

jianying-editor

Design & creation

View repository

Updated 10-27 16:20

About this skill

JianYing Editor Skill

Use this skill when the user wants to automate video editing, generate drafts, or manipulate media assets in JianYing Pro.

Agent execution playbook: docs/agent-playbook.md Minimal command SOP: docs/minimal-command-sop.md Draft inspector CLI: python <SKILL_ROOT>/scripts/draft_inspector.py list --limit 20 python <SKILL_ROOT>/scripts/draft_inspector.py summary --name "DraftName" python <SKILL_ROOT>/scripts/draft_inspector.py show --name "DraftName" --kind content --json For generic editing requests, always follow the "Quick Edit Runtime Template" and "Acceptance Checklist" in that playbook.

🚨 CRITICAL DEVELOPER RULES

  1. Script Location:It is forbidden to create editing scripts inside the Skill's internal directory. All editing logic implementation code (.py scripts) must be stored in the user's current project'sroot directory(or a subdirectory, such as scripts/), to keep the Skill library clean and portable.
  2. Soundtrack Selection:
    • For simple demos, use the default music. For actual projects, you should prioritize searching for and recommending data/cloud_music_library.csv relevant tracks, or filter by keywords based on the video theme (such as "tech", "warm").
    • Ask the user: "I found a few cloud music tracks that match the theme, want to try them? (e.g.,Illuminate - tech vibe)".

Rules

Read the individual rule files for specific tasks and constraints:

🎯 Agent Quick Routing

  • Cloud video + cloud music:rules/media.md + rules/audio-voice.md -> examples/cloud_video_music_tts_demo.py
  • Narration and subtitle alignment:rules/text.md + rules/audio-voice.md -> examples/cloud_video_music_tts_demo.py
  • Screen recording and smart zoom:rules/recording.md -> tools/recording/recorder.py (Windows) / tools/recording/macos_recorder.py (macOS)
  • Batch export/headless export:rules/core.md + rules/cli.md -> examples/robust_auto_export.py
  • Film and TV commentary generation:rules/generative.md -> scripts/movie_commentary_builder.py

📖 Classic Examples

Refer to these for complete workflows:

🧠 Prompts & Integrated Tools

Use these templates and scripts for complex tasks:

  • Asset Search: Find filters, transitions, and animations by Chinese/English name:
    python <SKILL_ROOT>/scripts/asset_search.py "复古" -c filters
    
  • Movie Commentary Builder: Generate 60s commentary videos from a storyboard JSON:
    python <SKILL_ROOT>/scripts/movie_commentary_builder.py --video "video.mp4" --json "storyboard.json"
    
  • Sync Native Assets: Import your favorited/played BGM from JianYing App to the Skill:
    python <SKILL_ROOT>/scripts/sync_jy_assets.py
    
  • README to Tutorial: Convert a project's README.md into a full installation tutorial video script:
    • Read prompt: prompts/readme_to_tutorial.md
    • Inject content into {{README_CONTENT}} variable
  • Screen Recorder & Smart Zoom: Record your screen and auto-apply zoom keyframes:
    python <SKILL_ROOT>/tools/recording/recorder.py
    # Or apply zoom to existing video:
    python <SKILL_ROOT>/scripts/jy_wrapper.py apply-zoom --name "Project" --video "v.mp4" --json "e.json"
    
  • Auto Exporter: Headless export of a draft to MP4/SRT:
    python <SKILL_ROOT>/scripts/auto_exporter.py "DraftName" "output.mp4" --res 1080 --fps 60
    # For SRT only:
    python <SKILL_ROOT>/scripts/jy_wrapper.py export-srt --name "DraftName"
    
  • Template Clone & Replacer: Safely clone the template and batch replace materials (to prevent damaging the original template):
    # 克隆模板生成新项目
    python <SKILL_ROOT>/scripts/jy_wrapper.py clone --template "酒店模板" --name "客户A_副本"
    
  • API Validator: Run a quick diagnostic of your environment:
    python <SKILL_ROOT>/scripts/api_validator.py
    

🚀 Quick Start Example

import os
import sys

# 1. 环境初始化 (必须同步到脚本开头)
current_dir = os.path.dirname(os.path.abspath(__file__))
env_root = os.getenv("JY_SKILL_ROOT", "").strip()
# 探测 Skill 路径 (支持 Antigravity, Trae, Claude 等)
skill_root = next((p for p in [
    env_root,
    os.path.join(current_dir, ".agent", "skills", "jianying-editor"),
    os.path.join(current_dir, ".trae", "skills", "jianying-editor"),
    os.path.join(current_dir, ".claude", "skills", "jianying-editor"),
    os.path.join(current_dir, "skills", "jianying-editor"),
    os.path.abspath(".agent/skills/jianying-editor"),
    os.path.abspath(".trae/skills/jianying-editor"),
    os.path.abspath(".claude/skills/jianying-editor"),
    os.path.dirname(current_dir) # 如果在 examples/ 目录下
] if p and os.path.exists(os.path.join(p, "scripts", "jy_wrapper.py"))), None)

if not skill_root: raise ImportError("Could not find jianying-editor skill root.")
sys.path.insert(0, os.path.join(skill_root, "scripts"))
from jy_wrapper import JyProject

if __name__ == "__main__":
    project = JyProject("My Video Project")
    assets_dir = os.path.join(skill_root, "assets")

    # 2. 导入视频与配乐
    project.add_media_safe(os.path.join(assets_dir, "video.mp4"), "0s")
    project.add_media_safe(os.path.join(assets_dir, "audio.mp3"), "0s", track_name="Audio")

    # 3. 添加带动画的标题
    project.add_text_simple("剪映自动化开启", start_time="1s", duration="3s", anim_in="复古打字机")

    project.save()

🛠️ Initialization & Project Rules

When initializing JyProject , be sure to set the resolution according to the aspect ratio of the main video material.The default value is landscape (1920x1080)。

🚨 Script Storage Location Rules

It is forbidden to create your business editing scripts under the Skill installation directory。

  • Correct approach: Place your editing Python scripts in the project's root directory.
  • Reason: The Skill directory should only contain the toolkit source code, to facilitate subsequent git pull upgrades. Mixing in business code will cause version management chaos.