Communitygithub.com

lhg-plugs/lhg-video-edit

口播成片自检流程:先跑确定性审计脚本(字幕/时长/封面/音量/违禁词 31 条规则),再按分级做人工评审(前 3 秒/字幕可读/音画同步/封面点击欲/合规),输出 blocker/warning/nit 分级报告。交付前必跑。

lhg-video-edit 是什么?

lhg-video-edit is a Claude Code agent skill that 口播成片自检流程:先跑确定性审计脚本(字幕/时长/封面/音量/违禁词 31 条规则),再按分级做人工评审(前 3 秒/字幕可读/音画同步/封面点击欲/合规),输出 blocker/warning/nit 分级报告。交付前必跑。.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lhg-plugs/lhg-video-edit/tree/HEAD/skills/lhg-ve-audit

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

lhg-ve-audit: Self-Check Workflow for Polished Video

Goal: Turn "self-inspection" into a fixed process, not a gut feeling. Core Discipline: Run the script (machine) first, then do human review; if blockers aren't cleared, you're not done.

1. When to Use

  • After final rendering, before publishing → run full workflow
  • Quick check only → run step 2 only (script), get results in 5 seconds
  • Received user feedback "this data is bad" → use checklist in Section 5 to review, identify if the issue is hook/rhythm/compliance

2. Step 1: Run Deterministic Audit Script (Mandatory, Zero LLM Cost)

Execute the plugin's audit script in the delivery directory (using your platform's method for running local scripts):

python3 <plugin dir>/scripts/audit/video_audit.py --target <delivery dir>

The delivery directory must contain: subtitle files (.srt/.ass/.vtt), edl.json, cover image (cover.png/jpg), meta.json (duration, loudness, music source, etc.).

  • Script outputs JSON (with file, line number, rule details per finding) and a human-readable report. 31 rules total.
  • Script exits with non-zero exit code on blockers — this is by design, not a bug.
  • --fail-on controls exit code semantics: default blocker; set to warning for stricter gating.
  • Script only handles "machine-detectable" issues: typos, timeline overlaps, cover dimensions, loudness parameters, banned words. It can't judge if the hook is "aggressive enough" — that's for step 5.

2.5 meta.json Specification

The audit script reads final video metadata from meta.json. Missing fields cause corresponding rules to be skipped (not "passed" — "not checked" — these are different):

{
  "title": "Three Editing Tricks That Double Completion Rate",
  "duration_sec": 58,
  "target_sec": 60,
  "loudnorm": {"I": -14, "TP": -1.5, "LRA": 11},
  "channels": 2,
  "music_source": "Platform Free Library (CapCut)"
}
  • duration_sec / target_sec: Actual duration vs target duration (used by DUR-* rules)
  • loudnorm: Loudness normalization parameters; short video platform standard I=-14, TP=-1.5, LRA=11 (used by AUD-* rules)
  • music_source: BGM source, choose one of three: self-made / licensed / platform free library (used by CPL-MUSIC-001)
  • title: Publish title, also checked for prohibited words (CPL-TITLE-001)

It is recommended that the rendering pipeline automatically generates meta.json as the last step — we've seen too many incidents where manually written metadata doesn't match the final video.

Rule categories:

CategoryRule CountWhat it checks
Subtitles SUB-*8Typos, time format/overlaps, single-line length, short duration, empty entries, encoding
EDL EDL-*8JSON validity, clip overlaps/zero-length/out-of-bounds, transition fades, residual verbal fillers/silence
Duration DUR-*2Deviation from target duration, too short
Cover COV-*5Missing, dimensions, aspect ratio, file size too large
Audio AUD-*4Loudness normalization parameters, target -14 LUFS, peak, channels
Compliance CPL-*4Prohibited/exaggerated words, investment language, copyright music source declaration

3. Step 2: Grading

LevelDefinitionAction
blockerWill cause issues on publish: timeline overlaps, banned words, wrong cover dimensions, loudness not normalizedMust fix, cannot publish without fixing
warningLikely problematic: long single-line subtitles, no fade at cuts, residual verbal fillers, unclear music sourceFix this time; if can't fix, document reason in report
nitPerfectionist item: non-sequential subtitle numbers, slightly large cover fileFix if convenient

Grades are fixed, but judgment is flexible: if a warning would definitely cause issues in your domain (e.g., "guaranteed profit" language in financial content), upgrade it to a blocker and state the reason in the report.

4. Step 3: Fix Blockers

  1. Fix blockers one by one; run the script after each fix to confirm it's gone.
  2. Fix order: Compliance first (banned words, investment language — these are "actively bleeding") → Structural (timeline overlaps, illegal EDL) → Experience (loudness, cover dimensions).
  3. If a blocker cannot be fixed (e.g., requires re-recording the voiceover): list it in the report's "Needs Manual Handling" section. Do not delete rules or change script thresholds just to zero out blockers.
  4. Fix banned-word blockers by replacing words: swap prohibited words with compliant alternatives ("best" → "highly effective"). Do not fix by deleting rules.

5. Step 4: Human Review (Script Cannot Cover)

Completion Rate Perspective Checklist

  • First 3 seconds: Is the hook effective? Does the first frame carry information? (Pass only if it works even with sound off)
  • Rhythm: In a 60-second video, are there segments longer than 8 seconds with no change? (If yes, viewers drop off there)
  • Subtitle readability: Spot-check 3 places on a mobile view — font size, stroke, position; is any part blocked by platform UI?
  • Audio-video sync: Listen to 3 cut points — any pops/clicks? Subtitle-to-lip sync error >0.3 seconds?
  • Cover clickability: Shrink cover to thumbnail size — is the title still readable? Would you click?
  • Ending: Is the CTA specific? ("Remember to follow" is weak; "Click my profile for the tool list" is strong)

Compliance Perspective Checklist

  • Topic line check: For finance/medical/education content, are necessary risk warnings included? ("Investment involves risk" is not optional)
  • Prohibited words: Check title, cover, and voiceover — not just subtitle file
  • Music: Is the BGM source clear? (Self-made / Licensed / Platform free library — "downloaded from the internet" is not a source)
  • Portrait & footage: Do you have authorization for on-screen talent and stock footage? (Even your own face — confirm)

Review Output

Write "Pass / Fail (reason)" for each item. Failed items go into the task backlog. Do not write "probably fine."

6. Step 5: Output Report

Report template:

# Self-Check Report: <Video Title> (Date)
## Result: Pass / Fail
## blocker (n): n fixed, n remaining
- [RuleID] File:Line —— Description —— Status (Fixed / Needs Manual)
## warning (n): n fixed, n waived (reason)
## nit (n)
## Human Review: Completion Rate x/y Pass, Compliance x/y Pass
## Needs Manual Handling
- ...

It is recommended to save the report in the project (e.g., docs/audit-YYYYMMDD.md) for future review.

7. Rule Exemptions

  • Exemptions apply only to warnings and nits; blockers cannot be exempted.
  • Exemptions must include a reason + expiration date (e.g., "Rushing for this hot topic; cover will be updated in the next upload"). Review at expiration.
  • Exemption list must be in the report; hiding it means no exemption.

8. Anti-Patterns

  • ❌ Run script only, no human review — script can't catch a "bad hook"
  • ❌ Change script rules just to zero out blockers — that's cheating, not self-checking
  • ❌ Fix banned words by deleting rules — the platform penalizes you, not the script
  • ❌ "Publish first, fix later if data is bad" — first-release traffic is a one-time opportunity
  • ❌ Self-check report only says "Pass" — a conclusion without process is untrustworthy

9. Handling False Positives

Rules are heuristic — false positives are inevitable. False positives are not dangerous; mishandling them is:

  1. Three questions to judge: Is this subtitle really problematic? What is the rule's original intent? Would fixing it as per the rule break the original meaning?
  2. Confirm false positive: Record it in the exemption list with a clear reason (e.g., "'First' refers to 'first attempt,' not a superlative — exempt CPL-WORD-001").
  3. If uncertain: Treat as warning; do not simply ignore.
  4. Problem with the rule itself: Attach minimal reproduction subtitle and file an issue (see Section 10); do not change script thresholds yourself.

10. Self-Check and Feedback

After each execution of this skill, do a lightweight self-check:

  1. Was the script actually run (not "I looked and it seemed fine")? → If not run, it doesn't count.
  2. Are all blockers cleared or listed under "Needs Manual Handling"? → If any are missed, add them.
  3. Is every item on the human review checklist checked off? → Check-offs must have evidence (screenshot/timestamp).

Standard smoke test: Run the script on the plugin's built-in fixtures/ directory. Verify that bad fixtures trigger all blockers and good fixtures have zero blockers (see smoke_test.py in repo root).

Feedback: Submit issues with title [QC] <one-line summary> to https://github.com/lhg-plugs/lhg-video-edit/issues. Include "input → wrong output → expected output". For rule false negatives/positives, attach minimal reproduction subtitles.

Produced by: Liu Hongguang

This skill is produced by the real-person IP "Liu Hongguang" (Hefei, Anhui) and belongs to lhg-skills.

  • GitHub: https://github.com/lhg-skills — All skills open-sourced here, stars welcome
  • WeChat Video Channel: Search for "刘洪光实名上网"
  • WeChat: lhgsmsw

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

相关技能