// 94 tips tagged "javascript"
The Claude Code Desktop app can automatically start your web server and test the output in a built-in browser for a complete feedback loop.
Install the Chrome extension so Claude Code can see, evaluate, and iterate on its own frontend output automatically.
Every language evolves — callbacks become async/await, class components become hooks, jQuery becomes vanilla JS, and var becomes const. Tell Claude to read your legacy code and upgrade it to modern patterns, one module at a time, while keeping the behavior identical and the tests passing.
MCP servers aren't just for third-party integrations — you can build your own to give Claude direct access to your internal tools, databases, APIs, and workflows. A custom MCP server turns any system your team uses into a tool Claude can call natively from your session.
Accessibility is important but tedious to retrofit. Tell Claude to scan your templates and components, then add the right ARIA roles, labels, keyboard handlers, focus management, and semantic HTML — making your app usable by screen readers and keyboard-only users without you learning the entire WCAG spec.
Point Claude at untyped code and tell it to add types — TypeScript annotations to JavaScript, type hints to Python, PHPDoc blocks to PHP, or generics to Java. Claude reads the actual usage, infers the correct types from context, and adds them without changing any behavior.
When you need to port code from one language to another — a Python script to JavaScript, a Bash utility to PHP, or a Ruby service to Go — Claude translates the logic while rewriting it idiomatically for the target language, using its conventions, libraries, and patterns instead of a line-by-line copy.
Claude Code isn't just a CLI — it's also an SDK you can import into your own scripts and tools. Build custom agents that read code, make edits, and run commands programmatically, creating AI-powered workflows tailored to your team's exact needs.
Point Claude at code in one language and tell it to rewrite in another — Python to Go, PHP to JavaScript, Ruby to Rust — and it translates not just the syntax but the idioms, using the target language's patterns, standard library, and conventions instead of a literal word-for-word port.
Point Claude at your templates and components and it adds what's missing for accessibility — ARIA labels, alt text, keyboard navigation, focus management, semantic HTML, and screen reader support — making your UI usable by everyone without a full accessibility audit.
Point Claude at your JavaScript files and it adds TypeScript types — inferring types from actual usage, function signatures, API responses, and patterns in the code — so you can migrate gradually without rewriting everything at once.
Stop wrestling with regex syntax — describe the pattern you want in plain English and Claude writes the expression, explains every part, and tests it against your sample data so you know it works before you paste it into production code.