agentleFS
MilkyWay008MilkyWay008/Essential-Hermes-Skills/clip-editing/SKILL.md

clip-editing

Skill4 starsChanged 3 months agoMITView on GitHub

TRIGGER: user records screen-capture clips (MP4) and wants them trimmed, cut, merged, or annotated, or asks to review/verify a video clip. Uses the installed ffmpeg 8.1.1 (winget full build) to edit clips directly; extracts frames so the agent can visually verify results before delivery.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All scripts are Python 3 (stdlib only — subprocess + json), run from anywhere

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Clip Editing — ffmpeg-based video editing for screen-capture clips

When to Use

  • User records short screen-capture demo clips (e.g. product marketing clips) and wants:
    • junk removed from start/end (fumbling with files, cmd windows visible)
    • a middle segment cut out
    • two takes merged into one clip
    • a text overlay added (e.g. "E:\ → F:")
    • visual verification of a clip before publishing
  • Trigger phrases: "trim the clip", "cut out the middle", "merge the takes", "add text to the clip", "check the clip", "edit the clip"

Environment

  • ffmpeg 8.1.1 (winget full build) — verified working on Windows Server 2025 via gdigrab
  • ffprobe sits next to ffmpeg in the same bin directory
  • Path resolution order: FFMPEG_PATH/FFPROBE_PATH env vars → winget Packages path (derived from %LOCALAPPDATA%) → ffmpeg/ffprobe on PATH
  • All scripts are Python 3 (stdlib only — subprocess + json), run from anywhere

Quick Reference (scripts in scripts/)

ScriptPurposeExample
probe.pyGet duration / resolution / fps / sizepython scripts/probe.py in.mp4
frames.pyExtract frames for agent vision reviewpython scripts/frames.py in.mp4 outdir --fps 1
trim.pyRemove junk from start/end (accurate re-encode by default, --fast = stream copy)python scripts/trim.py in.mp4 out.mp4 --start 3 --duration 10
cut.pyRemove a middle segmentpython scripts/cut.py in.mp4 out.mp4 --remove 3-5
merge.pyMerge multiple clips in orderpython scripts/merge.py out.mp4 a.mp4 b.mp4
concat.pyLossless stream-copy concat via list file (fast join of same-codec clips; auto-falls back to re-encode on mismatch)python scripts/concat.py out.mp4 list.txt
overlay_text.pyAdd text overlay (bottom/top/center)python scripts/overlay_text.py in.mp4 out.mp4 --text "E:\ -> F:\" --pos bottom
speed.pySpeed up/down a clip (shortens/lengthens)python scripts/speed.py in.mp4 out.mp4 --factor 1.25

Procedure

  1. Probe first — probe.py gives duration/fps so you know how much junk to trim and the exact timestamps to cut.
  2. Extract frames — frames.py at 1-2fps so the agent can SEE the clip (via vision) and pick precise trim/cut points. Review the frames before deciding.
  3. Edit — trim / cut / merge / overlay as needed.
  4. Verify the OUTPUT — extract frames from the edited clip and visually confirm: clean start frame, correct content, no fumbling visible. Never deliver an unverified clip.
  5. Report — state the before/after duration and what was changed.

Pitfalls

  • -c copy trims snap to keyframes — screen captures have sparse keyframes, so stream-copy trims can be off by seconds. trim.py re-encodes by default for accuracy; --fast is only for quick drafts.
  • drawtext escaping — fontfile colons must be escaped (C\:/Windows/Fonts/segoeui.ttf), and the path must use forward slashes (backslashes get mangled by drawtext's escape parser). Text colons/percent/backslashes must be escaped in order: backslash → colon → percent → quote. overlay_text.py handles all of this internally — verified pixel-identical to a textfile= reference render (diff YAVG=0).
  • Fonts on Server 2025 — arial.ttf may not exist; the script falls back to segoeui.ttf (always present on Windows).
  • Merge needs matching codecs — clips from the same recorder are fine. merge.py re-encodes via the concat filter so minor mismatches still work.
  • concat.py vs merge.py — use concat.py when joining same-codec clips (stream copy, lossless, near-instant) via a concat list file; it auto-probes and falls back to re-encode if any clip differs in codec/resolution/pix_fmt/fps/timebase. concat.py is the right tool for joining multiple takes of marketing clips shot with identical settings; merge.py is the simpler video-only re-encode for arbitrary mismatched clips. Both route filenames with apostrophes to the re-encode path automatically.
  • Windows paths in bash — pass native C:\... paths; Python handles them. Quote paths containing spaces.
  • Always verify with frames.py after editing — the agent's vision check is the final gate.

Verification

  • probe.py on output shows the expected duration (e.g. 10s after trimming to 10s).
  • frames.py on output shows a clean first frame (no fumbling, no stray windows) and the correct content.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.