AGENT SKILL

revdiff-ru

Review a diff in revdiff with everything except the code translated into Russian, line numbering preserved 1:1 so annotations map back to the real files. One command does the translation; then /revdiff:revdiff opens the result.

License 许可
MIT
最近更新
2026-11-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
revdiff-ru
description
Review a diff in revdiff with everything except the code translated into Russian, line numbering preserved 1:1 so annotations map back to the real files. One command does the translation; then /revdiff:revdiff opens the result.
when_to_use
Trigger on: revdiff-ru, /revdiff-ru, "review this diff in Russian", "revdiff in Russian", "translate the diff and open revdiff".
allowed-tools
[ "Bash", "Skill" ]
argument-hint
optional: ref(s) or file path

02 资源文件 12

03 SKILL.md 正文

revdiff-ru

  1. Build the target as a unified diff: git diff [ref] > /tmp/revdiff-ru-orig.patch (gh pr diff N for a PR).
  2. Translate it with the bundled script — one call, nothing else to orchestrate:
    "${CLAUDE_SKILL_DIR}/revdiff-ru.py" translate /tmp/revdiff-ru-orig.patch \
        --out /tmp/revdiff-ru.patch
    
    It prints a verification line; "status": "ok" means the rebuilt patch has the same line count, the same hunk headers and the same prefix column as the original. Anything else, stop and show it. A plain file instead of a diff: add --plain-file.
  3. Run the revdiff skill (/revdiff:revdiff under Claude Code) on the patch with --stdin — that is what renders a real diff with hunk navigation. Do NOT use --only on a translated whole file: it shows current file contents, not the change. The launcher runs revdiff in an overlay that does not inherit stdin, so put a shim first on PATH: printf '#!/bin/sh\nexec %s "$@" < /tmp/revdiff-ru.patch\n' "$(command -v revdiff)" > /tmp/revdiff-shim/revdiff
  4. Apply annotations to the original files — file:line matches. Re-review → translate again from a fresh diff.

Why it is a script and not a subagent

The model never sees a diff prefix, a hunk header or a line number: the script hands it JSONL records of {"i": N, "t": "text"} and puts the structure back afterwards, so the translation cannot drift out of alignment and nothing has to be verified by re-reading. That removes the slow part. Measured on one 120-line batch:

how wall clock
claude -p, whole batch (what it does now) 54s
Task subagent (spawn, read, write, self-verify) 212s
same but --effort low 55s, and it dropped records
haiku instead of sonnet 273s
"return only the lines you translated" 213s — deciding per line costs more than translating every line

Batches run in parallel (--batch 60 --jobs 6), so a whole patch costs about one batch: 236 lines, 162 of them translatable, came back complete in 55s. Smaller batches do not help — the floor is process startup plus model latency.

04 同仓库更多 Skills

isachivka
isachivka/beware-of-skills

yt-dub

Give a YouTube video Yandex's Russian voice-over (the Yandex Browser / voice-over-translation one) at any length — including past Yandex's 4-hour limit — and mux it into the best video YouTube serves, with the original sound kept as a second track; optionally drop the result into Plex on SugarDaddy. Also when only the translated audio is wanted.

★ 0
isachivka
isachivka/beware-of-skills

codex-proxy

Run an OpenAI-compatible Chat Completions endpoint on localhost that spends the user's ChatGPT/Codex subscription instead of an API key — for apps that take a Base URL, API key and model id (dictation post-processing, editors, scripts). Install it as an always-on LaunchAgent, check its status, print the key, try a request, or debug a failing app.

★ 0
isachivka
isachivka/beware-of-skills

peer-chat

A prompt starting with "Chat from Codex:" is a peer message: answer it only through peer-chat.py, never in your own output. Also use when the user says "chat with codex", "talk to codex", "work with codex", "do this with codex", "build this with codex", "discuss this with codex" (the agent in the other pane of this agterm split). Not for a one-shot task handed off, and not for a read-only second opinion.

★ 0
isachivka
isachivka/beware-of-skills

memory-review

Use when an agent memory directory has grown large enough that nobody remembers what is in it, when memories look stale or contradictory, when the same fact seems to live in both memory and a CLAUDE.md, or when the user asks to review, prune, audit or clean up their memories. Also use before retiring a project whose memories should move somewhere else.

★ 0
isachivka
isachivka/beware-of-skills

decomment

Strip the noise comments an AI agent left behind on a branch — the ones that restate the code line by line or narrate the change as a story ("was X, now Y", "added a guard here"). Git holds the history and the code holds the present; only genuinely non-obvious comments survive.

★ 0
isachivka
isachivka/beware-of-skills

cleanup

Tidy up after yourself and close your own agterm session.

★ 0