agentleFS
rahulcommercialrahulcommercial/claude-code-for-content-creators/skills/gameplay-clip-extractor/SKILL.md

gameplay-clip-extractor

Skill0 starsChanged 5 months agoMITView on GitHub

Finds highlight moments in long gameplay recordings (BGMI, FIFA, Valorant, COD) using audio peak detection, optional scoreboard OCR, and pacing heuristics. Outputs timestamps + suggested clip ranges. Trigger when user has raw gameplay footage and wants to extract highlights, kill clips, goals, or shareable moments.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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:

    Use the *inverse* — long non-silent stretches with sudden RMS jumps are candidates.

    line 25
  2. Distinctive:

    No long static frames (loading, respawn screen)

    line 62
  3. Distinctive:

    Don't auto-publish. Always present clips for human review.

    line 66
  4. Distinctive:

    Don't OCR the entire frame — that's slow and noisy.

    line 67
  5. Distinctive:

    Don't process clips you don't own the rights to.

    line 68

≈ “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

Gameplay Clip Extractor

Reduce a 1-hour gameplay capture to a list of 10-second clips worth posting.

When to use

  • User has raw .mp4/.mov gameplay footage (their own, no piracy).
  • User wants timestamps for highlights without scrubbing manually.
  • User wants the actual clipped files written to disk.

Detection signals (combine, don't pick one)

1. Audio peak detection (cheapest, works everywhere)

Gunfire, goal whistles, killstreak voice lines, crowd reactions — all show up as audio amplitude spikes.

ffmpeg -i raw.mp4 -af "silencedetect=noise=-30dB:d=0.5" -f null - 2>&1 \
  | grep silence_end

Use the inverse — long non-silent stretches with sudden RMS jumps are candidates.

Python (cleaner):

import librosa, numpy as np
y, sr = librosa.load("raw.mp4", sr=22050, mono=True)
rms = librosa.feature.rms(y=y, frame_length=2048, hop_length=512)[0]
peaks = np.where(rms > rms.mean() + 2 * rms.std())[0]
peak_times = librosa.frames_to_time(peaks, sr=sr, hop_length=512)

2. Scoreboard / kill-feed OCR (game-specific, higher accuracy)

  • BGMI / COD: top-right kill feed → run Tesseract on that ROI every 1s.
  • FIFA: scoreboard score-change → diff frames at fixed coords.
  • Cache last value; emit event only on change.

3. Pacing heuristic

Cluster nearby peaks (within 3s) into single moments. A real highlight is usually 1 spike, not a noise burst.

Output

[
  {"start": 142.3, "end": 152.8, "label": "kill burst (3 audio peaks)", "score": 0.82},
  {"start": 384.1, "end": 394.6, "label": "score change 1→2", "score": 0.95}
]

Then clip with FFmpeg:

ffmpeg -ss 142.3 -i raw.mp4 -t 10.5 -c copy clips/clip_001.mp4

Heuristics for "is this postable?"

  • ≥ 2 audio peaks in a 10s window
  • Clip ends on a resolved moment (kill confirmed, goal scored), not mid-action
  • No long static frames (loading, respawn screen)

What NOT to do

  • Don't auto-publish. Always present clips for human review.
  • Don't OCR the entire frame — that's slow and noisy. Define ROIs per game.
  • Don't process clips you don't own the rights to.

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.