Build a translator for text, links, and local files
They used Claude Code to make a translation agent that accepts pasted text, a web address, or a file and returns Chinese translations.
- What they did
- They built the tool in small passes, letting Claude Code create one working layer at a time: first a basic interface, then support for Doubao 1.6, then tools for fetching web pages and reading files, and finally a UI that showed tool status. A CLAUDE.md file instructed the agent to check and repair its own output, and they kept pasting current SDK examples into each round of prompting. When version 0.3 misbehaved, they reverted it and rewrote the prompt before trying again.
- How it went
- The finished agent could take a blog URL, load the homepage, identify the first two posts, and translate both into Chinese. It used three fetch calls. The author also said their page fetching is still rough and breaks on most sites.
- Tips
- Build in small steps and verify each layer before adding the next. If the agent will touch web pages or files, use a model that is already good at tool use and pause for approval before any saving or other irreversible action.
Try it yourself with Claude Code
Help me build a small translation agent in [framework or app]. It should accept either pasted text, a web URL, or a local file path, then translate the content into [target language]. If the input is a URL, fetch the page and extract the main text; if it is a file, read it; if it is plain text, translate it directly. Keep headings and basic structure where possible, write the translated result to [output file or destination], and stop to ask me before any action that would overwrite, save, submit, delete, or send anything. Start by implementing the simplest version, test it with [sample URL/text/file], show me the output, then wait for my approval before making the next change. After each step, tell me exactly how to run it locally.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Plan a monthly social calendar from live research
A Claude Code skill studies a brand, competitors, and audience chatter, then drafts 20 posts and 4 reels in an Excel calendar.
Set up a chapter-by-chapter drafting workflow
A writer used Claude Code to plan and draft a novel in stages, generating 10 chapters and about 32,000 words in 17 minutes.
Use agents to keep a long novel organized
An author used Claude Code to plan, draft, and maintain continuity for a 700,000-character apocalypse novel.
Convert a full math program into a single-year path
Claude condensed a two-year math sequence into one year and assembled the lessons, tests, activities, and schedule.
Draft a novel from a bible and chapter outline
Christopher Penn used Claude Code to turn a writer’s bible and blueprint into a full romance novel, chapter by chapter, with parallel agents doing the drafting and editing.
Generate Strudel music and prep it for live performance
A developer used Claude to draft Strudel code from a style description, then cleaned it up and reshaped it for live performance.