Skip to content

HiAPIAI/hiapi-seedance-2-5-video-skill

hiapi-seedance-2-5-video

Verified

Plan, generate, recover, download, and quality-check Seedance 2.5 videos through HiAPI. Use for Seedance 2.5 text-to-video, first/last-frame image-to-video, multimodal reference-to-video, or a complete brief-to-delivery video workflow.

FileKindSize
SKILL.mdskill md9.8 KB
agents/openai.yamlconfig361 B
assets/social-preview-seedance-2-5.pngbinary1.6 MB
references/api.mdmarkdown4.8 KB
references/output.mdmarkdown2.0 KB
references/upgrade-policy.mdmarkdown1.7 KB
references/workflow.mdmarkdown5.1 KB
scripts/check-config.mjsexecutablescript812 B
scripts/hiapi-seedance-2-video.mjsexecutablescript1.4 KB
scripts/install.mjsexecutablescript5.7 KB
scripts/lib/seedance-2-video.mjsscript39.0 KB

scripts/install.mjs

View on GitHub
#!/usr/bin/env node
// HiAPI Seedance 2.5 Video Skill installer.
// Run with: npx github:HiAPIAI/hiapi-seedance-2-5-video-skill -y
// Flags: -y / --yes, --target=<dir>, --codex, --claude, --skills-dir=<dir>
import { existsSync, mkdirSync, mkdtempSync, renameSync, rmSync } from 'node:fs';
import { homedir } from 'node:os';
import { join } from 'node:path';
import { spawnSync } from 'node:child_process';
import { stdin, stdout, exit, env, argv } from 'node:process';
import readline from 'node:readline/promises';

const SKILL_FOLDER = 'hiapi-seedance-2-5-video';
const REPO_URL = 'https://github.com/HiAPIAI/hiapi-seedance-2-5-video-skill.git';
const DISPLAY_NAME = 'HiAPI Seedance 2.5 Video Skill';
const MODEL_PAGE = 'https://docs.hiapi.ai/models/video/seedance-2-5/';
const API_KEY_PAGE = 'https://www.hiapi.ai/en/dashboard/api-keys?utm_source=skill&utm_medium=install&utm_campaign=hiapi-seedance-2-5-video';

const argList = argv.slice(2);
const yes = argList.includes('-y') || argList.includes('--yes') || !stdin.isTTY;

function flagValue(name) {
  const prefix = `--${name}=`;
  const hit = argList.find((a) => a.startsWith(prefix));
  return hit ? hit.slice(prefix.length).replace(/^~(?=$|\/)/, homedir()) : null;
}

const explicitTarget =
  flagValue('target') ?? flagValue('skills-dir') ?? null;
const forceCodex = argList.includes('--codex');
const forceClaude = argList.includes('--claude');

function detectCandidates() {
  const list = [];
  const codexHome = env.CODEX_HOME || join(homedir(), '.codex');
  if (existsSync(codexHome)) {
    list.push({ label: 'Codex', dir: join(codexHome, 'skills') });
  }
  const claudeHome = join(homedir(), '.claude');
  if (existsSync(claudeHome)) {
    list.push({ label: 'Claude Code', dir: join(claudeHome, 'skills') });
  }
  return list;
}

async function resolveTargets() {
  if (explicitTarget) {
    return [{ label: 'explicit', dir: explicitTarget }];
  }
  if (env.AGENT_SKILLS_DIR) {
    return [{ label: '$AGENT_SKILLS_DIR', dir: env.AGENT_SKILLS_DIR }];
  }
  const detected = detectCandidates();
  if (forceCodex) {
    const hit = detected.find((c) => c.label === 'Codex');
    return hit ? [hit] : [{ label: 'Codex', dir: join(env.CODEX_HOME || join(homedir(), '.codex'), 'skills') }];
  }
  if (forceClaude) {
    const hit = detected.find((c) => c.label === 'Claude Code');
    return hit ? [hit] : [{ label: 'Claude Code', dir: join(homedir(), '.claude', 'skills') }];
  }
  if (detected.length === 0) {
    console.error(`[${DISPLAY_NAME}] No agent skills directory detected.`);
    console.error('Pass one of:');
    console.error('  --codex                         install to ~/.codex/skills');
    console.error('  --claude                        install to ~/.claude/skills');
    console.error('  --target=/path/to/skills        install to a custom dir');
    console.error('  AGENT_SKILLS_DIR=/path npx ...  same via env var');
    exit(1);
  }
  if (detected.length === 1) return detected;
  if (yes) {
    console.log(
      `[${DISPLAY_NAME}] Multiple agents detected — installing to all: ${detected.map((c) => c.label).join(', ')}.`,
    );
    return detected;
  }
  console.log('Detected agent skill directories:');
  detected.forEach((c, i) => console.log(`  ${i + 1}) ${c.label} → ${c.dir}`));
  console.log('  a) all');
  const rl = readline.createInterface({ input: stdin, output: stdout });
  const ans = (await rl.question('Choose [1-N / a]: ')).trim().toLowerCase();
  rl.close();
  if (ans === 'a' || ans === 'all') return detected;
  const idx = Number.parseInt(ans, 10);
  if (Number.isFinite(idx) && idx >= 1 && idx <= detected.length) {
    return [detected[idx - 1]];
  }
  console.error('Invalid choice.');
  exit(1);
}

function ensureGit() {
  const result = spawnSync('git', ['--version'], { stdio: 'ignore' });
  if (result.status !== 0) {
    console.error(`[${DISPLAY_NAME}] git is required but not found on PATH.`);
    exit(1);
  }
}

function installTo(target) {
  mkdirSync(target.dir, { recursive: true });
  const destination = join(target.dir, SKILL_FOLDER);
  const stagingRoot = mkdtempSync(join(target.dir, `.${SKILL_FOLDER}-staging-`));
  const staged = join(stagingRoot, SKILL_FOLDER);
  const backup = `${destination}.previous`;
  let movedExisting = false;

  try {
    console.log(`[${DISPLAY_NAME}] Downloading verified replacement …`);
    const clone = spawnSync('git', ['clone', '--depth', '1', REPO_URL, staged], { stdio: 'inherit' });
    if (clone.status !== 0) throw new Error(`git clone exited with status ${clone.status}`);

    rmSync(backup, { recursive: true, force: true });
    if (existsSync(destination)) {
      renameSync(destination, backup);
      movedExisting = true;
    }
    renameSync(staged, destination);
    rmSync(backup, { recursive: true, force: true });
    console.log(`[${DISPLAY_NAME}] Installed to ${destination}.`);
  } catch (error) {
    if (movedExisting && !existsSync(destination) && existsSync(backup)) renameSync(backup, destination);
    throw error;
  } finally {
    rmSync(stagingRoot, { recursive: true, force: true });
  }
}

function reportApiKey() {
  if (env.HIAPI_API_KEY) {
    console.log(`[${DISPLAY_NAME}] HIAPI_API_KEY is set.`);
    return;
  }
  console.log('');
  console.log(`[${DISPLAY_NAME}] HIAPI_API_KEY is not set yet.`);
  console.log(`  Get a key: ${API_KEY_PAGE}`);
  console.log('  Then: export HIAPI_API_KEY="your_key_here"');
}

(async () => {
  ensureGit();
  const targets = await resolveTargets();
  for (const t of targets) installTo(t);
  reportApiKey();
  console.log('');
  console.log(`[${DISPLAY_NAME}] Done. Restart your agent if it caches skills.`);
  console.log(`Model page: ${MODEL_PAGE}`);
})().catch((err) => {
  console.error(`[${DISPLAY_NAME}] Failed:`, err?.message ?? err);
  exit(1);
});
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall