agentleFS
sandraschisandraschi/handbrakemcp/skills/handbrake-expert/SKILL.md

handbrake-expert

Skill2 starsChanged 10 days agoMITView on GitHub

Expert video transcoding with HandBrakeCLI — transcode, batch, monitor, optimize for devices, troubleshoot

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:

    Do NOT invoke the agentic workflow for something one tool call answers.

    line 14

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

HandBrake Expert Skill

Domain skill for the handbrake-mcp server. Two audiences: agents (tool-first workflows below) and humans (codec guidance at the bottom).

Agent routing

  • Single file or a defined list → transcode_video / batch_transcode directly. Do NOT invoke the agentic workflow for something one tool call answers.
  • Vague multi-step goal ("make my library iPad-ready") → handbrake_agentic_workflow(goal) for a sampled plan, then execute it.
  • Fleet maintenance, launcher, or packaging questions → repo docs (docs/, INSTALL.md), not these tools.

Tool catalog (real names — verified against mcp.list_tools())

OperationSignatureReturns
transcode_video(input_path, output_path, preset?, options?)TranscodeResponse(job_id, status, ...)
batch_transcode(jobs[{input_path, output_path, preset?, options?}], default_preset?)list[TranscodeResponse], one per job
get_job_status(job_id)JobStatusResponse(status, progress 0–100, ...)
cancel_job(job_id)bool
get_presets / get_loaded_models()list[str] preset names
get_provider_status / system_status / show_status_card()health dict / text / Prefab card
help / multilevel_help / advanced_help / tool_categories / search_tools(...)formatted help strings
handbrake_agentic_workflow(goal) + sampling ctxMarkdown plan
handbrake_optimize_library(source_dir, target_device) + sampling ctxdevice strategy
handbrake_shutdown()exits ~500 ms after responding

Workflows

Workflow 1 — transcode and track to completion

r = await transcode_video("/videos/in.mp4", "/videos/out.mkv", preset="Fast 1080p30")
# poll every 5–30 s until terminal
s = await get_job_status(r.job_id)   # queued → processing → completed

Workflow 2 — batch a folder, then report

jobs = [{"input_path": str(p), "output_path": str(p.with_suffix(".mkv"))} for p in Path("/watch").glob("*.mp4")]
results = await batch_transcode(jobs, default_preset="Fast 1080p30")
failed = [x for x in results if x.status == "failed"]
for x in results: await get_job_status(x.job_id)   # final states for the report

Workflow 3 — stuck or unwanted job

s = await get_job_status("job_12345")
if s.status in ("queued", "processing"): await cancel_job("job_12345")

Errors and recovery

  • transcode_video returns status="failed" with error (file missing, unwritable output dir, CLI unavailable) — no exception, check the field.
  • get_job_status returns status="not_found" for expired/unknown ids.
  • Starting encodes while host RAM is over the 85% service gate raises ValueError — free memory or wait; do NOT retry in a tight loop.
  • Integration tests skip transcode cases on a loaded host for the same reason (see tests/test_handbrake.py::skip_if_host_loaded).

Configuration

  • HandBrakeCLI must be on PATH (winget install HandBrake.HandBrake.CLI).
  • Server: stdio via handbrake_mcp.stdio_main; HTTP bridge handbrake_mcp.server:app on 127.0.0.1:10875 (/health, /api/shutdown).
  • Dashboard (web_sota/) on 10874. Canonical entry is server.py; main.py is the legacy/Docker entry.

Human guidance — codec selection (RTX 4090 / Goliath)

ScenarioCodecRationale
Archivalx265 HEVC 10-bitefficiency + compatibility
SpeedAV1 NVENCpeak 4090 throughput
Universal playbackx264plays everywhere
  • Audio: AAC for mobile, Auto Passthru for DTS/AC3 preservation.
  • Containers: MKV for library preservation, MP4 for web/older hardware.
  • Quality starting point: CRF-equivalent 24–28; verify on your own eyes.

Troubleshooting

  • Dashboard unreachable → backend on 10875? GET /health 200?
  • NVENC failure → NVIDIA drivers current? nvidia-smi on PATH?
  • Empty preset list → CLI missing (fallback list engages) — install HandBrakeCLI.
  • POST /api/shutdown is the orderly stop (fleet launcher calls it pre-restart).

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.

Reviews can't be read right now.

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.