music-edit-to-length

music-edit-to-length is a skill for Claude Code, Codex from BlackBeltTechnology/pi-agent-dashboard. It costs 84 tokens per session (1,328 once invoked), scanned A, original, MIT.

A music-editing tool that shortens or reshapes a track to a target duration while keeping cuts aligned with the beat. It produces a WAV file, an edit description, and a beat timing grid for video work.

In plain words
What is it for?
Use it to make a song fit a specified length, preview an edit, and provide timing data to a picture-editing workflow.
Why use it?
It avoids awkward, off-beat cuts and audible clicks when fitting music to a video or fixed time limit. It compares possible joins and uses compatible musical sections.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to make a song fit a specified length, preview an edit, and provide timing data to a picture-editing workflow.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill music-edit-to-length
Clone the repo
git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for music-edit-to-length

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length/github.svg)](https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length)
Your own site
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for music-edit-to-length

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/music-edit-to-length.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,328 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01328
Opus 5.5 $0.00034 $0.00531
Sonnet 5.5 $0.00017 $0.00266
Haiku 4.5 $0.00008 $0.00133

Measured 19d ago against content hash fc162f8babd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

music-edit-to-length scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/edit_music.py, scripts/score_joins.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/music-production/.pi/skills/music-edit-to-length/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

music-edit-to-length

Input: a music-map/1 from music-analysis (run it first). Output: <out>.wav, <out>_edit.json and, with --preview, <out>.m4a for listening. The edit file feeds beat-sync-video and the picture edit.

Scripts run in the quick-tier venv (.venv-music, see music-analysis step 0); PKG=<this skill dir>/../../...

Procedure

  1. Analyse — music-analysis → track_map.json. Read the sections, classes and drop candidates; confirm the drop by ear.
  2. Identify blocks — mark the sections and genre/energy blocks (e.g. tech-house groove bars 1–32, trance breakdown/build 33–65, groove again 66–105). Joins may only connect material from the same block family.
  3. Score joins —
    .venv-music/bin/python "$PKG/.pi/skills/music-edit-to-length/scripts/score_joins.py" track_map.json \
        --candidates auto --target-duration 90 --anchor-bar 66
    .venv-music/bin/python "$PKG/.pi/skills/music-edit-to-length/scripts/score_joins.py" track_map.json --from-bar 12 --to-bar 17
    
    A join plays through the end of bar A and continues at bar B. Per factor: chroma and timbre similarity of the outgoing bars A−1..A against B's run-up in the source (B−2..B−1 — a match means the music arrives where B expects it), level jump, section_boundary, class_change. score = 0.4·chroma + 0.4·timbre − 0.02·|jump dB| − 0.5·[groove/drop ↔ breakdown/build] + 0.1·[section boundary]. Prefer ≥ 0.75 with no class change. The score is advisory: automatic classes cannot always tell a genre boundary (a trance build and a tech-house groove both have drums and bass) — your block marking in step 2 decides.
  4. Render —
    .venv-music/bin/python "$PKG/.pi/skills/music-edit-to-length/scripts/edit_music.py" track.wav music/track_edit90 \
        1:13 17:25 25:33 66:82 102:197.0 --preview
    
    The map defaults to <audio stem>_map.json next to the audio; pass --map music/track_map.json when it lives elsewhere (e.g. after analyze_music.py --out-dir). Segments are 1-based start_bar:end where end is an exclusive bar, END, or seconds with a decimal point. Joins are 30 ms equal-power crossfades.
  5. Click check — every join reports click_ok; the script warns on stderr when a join's sample step exceeds 1.1× the source at the same bar. Pick another join or keep the crossfade (--no-xfade is diagnostic only).
  6. Preview — the .m4a is written next to the wav.
  7. Listen before lock — ask the user to listen to the .m4a before the picture edit is locked to downbeats_video. Do not sync video to an unapproved edit.
  8. Iterate — keep every rejected version with a _vN suffix (track_edit90_v1.wav + _v1_edit.json) and write a one-line note of the rejection reason next to it (README/AGENTS row), e.g. "v2 rejected: jumps from tech-house groove into the trance build at 0:31".

Read the full file on GitHub · 84 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 84 lines · 84 tokens per session scan A fc162f8babd3

Subscribe to this mod's changes

music-edit-to-length is a skill published in the GitHub repository BlackBeltTechnology/pi-agent-dashboard (319 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 1,328 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.