From claude-resources
Translates text, docs, comments, or UI strings between languages using GitHub Copilot CLI (free GPT-4.1 tier) with Claude Code review. Automatically falls back to Claude Code if Copilot is rate-limited.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:gco-translateThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Translation via GitHub Copilot CLI (`gco-pure.sh`), reviewed and finalized by Claude Code. Uses GPT-4.1 on the free Copilot tier.
Translation via GitHub Copilot CLI (gco-pure.sh), reviewed and finalized by Claude Code. Uses GPT-4.1 on the free Copilot tier.
GCO_PURE="$HOME/.claude/skills/gco/scripts/gco-pure.sh"
If the file does not exist or is not executable, report "gco-pure.sh not found. Ensure base/copilot-text-tools branch is merged." and fall back to Claude Code translation.
gco-pure.sh passes zero tool flags to Copilot — the model cannot read files or execute code. All file I/O is handled by Claude Code.
Check Copilot's current rate-limit state (informational only):
RATE_CHECK=$(node "$HOME/.claude/scripts/gco-rate-limit.js" check 2>&1)
gco-rate-limit.js check always exits 0. Output is either ok or degraded: … (Copilot in low-cost mode, still usable). Proceed regardless — this is informational context only.
Inline syntax: /gco-translate translate "hello" from en to ja
File syntax: /gco-translate translate path/to/source.md from en to ja
Translate the following text from <source-lang> to <target-lang>.
Context: <what the text is for — technical documentation, UI, blog, etc.>
Tone: <formal/casual/technical>
Rules:
- Preserve technical terms and code references as-is
- Maintain formatting (markdown, HTML tags, etc.)
- Preserve line breaks and paragraph structure
- Use natural phrasing in the target language
Text to translate:
---
<source text>
---
For file translation: Claude reads the source file content first. For content over ~100KB, write it to a temp file and pass as the second positional arg to gco-pure.sh.
GCO_PURE="$HOME/.claude/skills/gco/scripts/gco-pure.sh"
LOGDIR=$(node "$HOME/.claude/scripts/get-logdir.js")
mkdir -p "$LOGDIR"
DATETIME=$(date +%Y%m%d_%H%M%S)
DRAFT_LOG="$LOGDIR/${DATETIME}-gco-translate-draft.md"
STDERR_LOG="$LOGDIR/${DATETIME}-gco-translate-draft-stderr.log"
# Guard: ensure gco-pure.sh exists — if missing, skip to Step 5 (fallback)
if [ ! -x "$GCO_PURE" ]; then
echo "gco-pure.sh not found or not executable: $GCO_PURE" >&2
exit 1 # caller (Claude) catches this and proceeds to Step 5
fi
# Inline translation: pipe source text via stdin
printf '%s' "<source text>" \
| bash "$GCO_PURE" "<translation prompt>" \
> "$DRAFT_LOG" \
2>"$STDERR_LOG"
# File translation (preferred for files, avoids shell-escaping issues):
# bash "$GCO_PURE" "<translation prompt>" "<source-file-path>" \
# > "$DRAFT_LOG" \
# 2>"$STDERR_LOG"
gco-pure.sh handles its own 15-minute internal timeout. No outer timeout needed.
After Copilot completes, check output files:
node "$HOME/.claude/scripts/gco-rate-limit.js" check-output \
"$DRAFT_LOG" \
"$STDERR_LOG"
RATE_OUT_EXIT=$?
If RATE_OUT_EXIT is non-zero (rate limit pattern detected), proceed to Step 5: Fallback.
Then check if draft output is empty:
DRAFT_CONTENT=$(cat "$DRAFT_LOG" 2>/dev/null)
If DRAFT_CONTENT is empty or blank, proceed to Step 5: Fallback. Do not continue to Step 6 with an empty draft.
If gco-pure.sh is not found, Copilot times out, produces no output, or rate limit is detected:
For inline translation: output the final translation to stdout.
For file translation: Claude writes the output file directly. Copilot never touches the filesystem.
Present the translation to the user. For file translation, show the output file path. Include the draft log path for debugging.
gco-pure.sh has an internal 15-minute (900s) timeout — no outer wrapper neededgco-pure.sh runs with --available-tools (empty list) — zero tool access to Copilotgco-pure.sh "<prompt>" "<file-path>" form (second positional arg) instead of stdin to avoid shell-escaping issues$LOGDIR/${DATETIME}-gco-translate-draft.md for debugging even in fallback scenariosnpx claudepluginhub takazudo/claude-resources --plugin claude-resourcesTranslates text between languages using OpenAI Codex CLI with Claude Code reviewing and finalizing output. Falls back to Claude Code if Codex is unavailable.
Delegates tasks to GitHub Copilot CLI non-interactively with multi-model support (Claude, GPT, Gemini), permission controls, output sharing, and session resume. Useful for Copilot delegation requests, model comparisons, or programmatic runs.
Translates agent-almanac content (skills, agents, teams, guides) into a target locale while preserving code blocks, IDs, and technical structure. Use when localizing content for a new language, updating stale translations, or batch-translating a domain.