원클릭으로
m4b-audiobook
Assemble m4b audiobook from audio files with chapters, metadata, and cover art.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Assemble m4b audiobook from audio files with chapters, metadata, and cover art.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run the full local cleanup pipeline — stale git worktrees, dead personal forks, Docker prune, Go caches, and Homebrew — in one pass, each stage report → confirm → execute, then a combined reclaimed-space summary. TRIGGER when the user wants a broad disk cleanup ("free up disk space", "почисти всё", "run the cleanup pipeline"). DO NOT trigger when the user clearly wants only one specific cleaner — invoke that skill instead.
Reclaim Docker disk by pruning unused images, containers, networks, build cache, optionally volumes, and the build cache of non-default buildx builders; on VM-backed daemons (Colima/Lima) also offers a guest fstrim so the host-side sparse disk image actually shrinks. Shows reclaimable size first, then prunes the user-chosen scope after approval. TRIGGER when the user wants to free Docker space ("docker prune", "почисти docker", "reclaim image cache"). DO NOT trigger for removing specific named containers/images.
Generate plain-text TLDR for PRs (for Slack, copied to clipboard). Each entry includes change scope (+N/-M lines, K files), a 1-5 star review-effort rating (time to review) and a 1-5 star outcome rating whose axis depends on the change — Pain relieved for fixes, Joy for features, Impact for internal work — so the reader can both budget time and prioritise before opening the PR.
Draft a GitHub PR review with inline comments. Opens with a readiness gate (stops on merge conflicts or red code-related CI with a fix-it note, no verdict), then runs the five-frame substance pass (problem real & root cause in-repo / approach optimal & worth its permanent cost / tradeoffs & scope / docs sync / code quality), cascades /branch-review, performs sequential Claude+Codex dual-model analysis on the PR diff, cross-validates every finding with explicit evidence, and presents the draft for approval. A value/design gate can block a PR even when the code is flawless — root cause upstream, permanent maintenance cost disproportionate to niche value, wrong layer, or scope over-reach. Publishing the review to GitHub is opt-in via `--publish`; without it the draft is the deliverable. Reviews open with an LGTM or NOT LGTM verdict (matching the /branch-review convention); the only no-verdict path is the readiness gate's fix-CI / fix-conflicts note. TRIGGER: invoke proactively whenever the user asks to review, a
Review current branch changes in isolation. Output starts with LGTM verdict — if no LGTM, the code is not ready to merge. IMPORTANT — always pass all flags you already know from context (target branch, project type, ticket, etc.). Do not rely on auto-detection when the answer is known. Pass --target to set which branch the changes are going INTO. Pass --ticket with a URL or ID to validate against requirements.
Reclaim Homebrew disk by removing old formula/cask versions, pruning the download cache, and uninstalling orphaned dependencies (brew autoremove). Shows a dry-run estimate first, then runs the user-chosen scope after approval. TRIGGER when the user wants to free Homebrew space ("brew cleanup", "почисти brew", "remove orphaned brew packages"). DO NOT trigger for uninstalling a specific named formula.
| name | m4b-audiobook |
| description | Assemble m4b audiobook from audio files with chapters, metadata, and cover art. |
| argument-hint | [directory] |
| allowed-tools | Bash, Read, Glob, Grep, Write, AskUserQuestion |
Assemble a single .m4b audiobook from a directory of audio files. Adds chapter markers, metadata, and cover art.
ffmpeg and ffprobe must be installeddirectory — path to the directory with audio files. If omitted, use the current working directory.List all audio files in the directory. Supported formats: .m4a, .mp3, .aac, .ogg, .opus, .flac, .wav.
Also look for a cover image: .jpg, .jpeg, .png files with names suggesting cover art (e.g., cover, folder, front, or any single image file present).
Analyze filenames to determine the correct playback order. Common patterns:
01 - Title.m4a, 1.1. Title.m4aChapter 1, Part 1, Глава 1, Часть 1Week 1. 1.1. Title, Неделя 1. 1.1. TitleSort rules:
Present the proposed order to the user. Ask for confirmation before proceeding.
Try to extract metadata from:
ffprobe output)Required metadata fields:
Audiobookrus, eng)Present proposed metadata to user. Ask for confirmation or corrections.
Run ffprobe on each file to determine:
If all files share the same codec and parameters: use -c:a copy (no re-encoding — fast and lossless).
If formats differ: re-encode to AAC-LC. Choose parameters:
64k for mono, 128k for stereo (or match source if higher)Create clean chapter titles from filenames:
01 - , 1.1. )Неделя 1. prefix for week-based books)Задани → Задания if context is clear)— instead of hyphen - in Russian text where appropriateCreate filelist.txt for ffmpeg concat demuxer:
file '/path/to/first file.m4a'
file '/path/to/second file.m4a'
Escape single quotes in filenames: replace ' with '\''.
Get exact duration of each file in milliseconds:
ffprobe -v quiet -show_entries format=duration -of csv=p=0 "file.m4a"
Generate chapters.txt in FFMETADATA1 format:
;FFMETADATA1
title=Book Title
artist=Author Name
album=Book Title
album_artist=Author Name
genre=Audiobook
date=2024
language=eng
[CHAPTER]
TIMEBASE=1/1000
START=0
END=473590
title=Chapter Title
[CHAPTER]
TIMEBASE=1/1000
START=473590
END=960000
title=Next Chapter
Each chapter START equals the previous chapter END. Calculate from cumulative durations.
Run ffmpeg:
ffmpeg -y \
-f concat -safe 0 -i filelist.txt \
-i chapters.txt \
-i cover.jpg \
-map 0:a -map 2:v \
-c:a copy \
-c:v copy \
-disposition:v:0 attached_pic \
-map_metadata 1 \
-map_chapters 1 \
-movflags +faststart \
"Author - Title.m4b"
Adjust flags:
-c:a copy with -c:a aac -b:a 128k (or appropriate bitrate)-i cover.jpg, -map 2:v, -c:v copy, -disposition:v:0 attached_picAuthor - Title.m4b (from metadata)After assembly, verify the output:
ffprobe -v quiet -show_format -show_chapters output.m4b
Confirm:
Report results to user: filename, size, duration, chapter count.
Remove temporary files (filelist.txt, chapters.txt).
ffmpeg is not installed: suggest brew install ffmpeg