{"slug": "claude-code-my-first-hands-on-experience", "title": "Claude Code: My First Hands-on Experience", "summary": "Claude Code, a terminal-resident LLM agent from Anthropic that executes code, runs tests, and manages git flow, performed a real-world bug fix on a legacy TypeScript project by autonomously searching, reading files, creating test cases, and verifying the fix. The tool requires Node.js LTS and proper file permissions, and while powerful for maintenance tasks like refactoring or updating deprecated APIs, it has constraints including token cost and slower execution compared to standard chat interfaces.", "body_md": "# Claude Code: My First Hands-on Experience\n\n[Claude](/en/tags/claude/)Code is essentially a terminal-resident LLM agent that doesn't just suggest code but actually executes it, runs tests, and manages your git flow. Unlike a standard chat interface where you copy-paste errors back and forth, this tool operates directly on your file system with a loop of \"plan → execute → verify.\"\n\n## Setting Up the Environment\n\nGetting this running requires a few specific prerequisites. You can't just install it via a standard package manager without the right environment. I found that using the latest Node.js LTS is mandatory to avoid dependency conflicts during the initial handshake.\n\nTo get started from scratch, run the following command in your terminal:\n\n```\nnpm install -g @anthropic-ai/claude-code\n```\n\nOnce installed, you need to authenticate. Run `claude`\n\nand it will trigger an OAuth flow. The critical part here is ensuring your CLI has the necessary permissions to read/write to your project directory, otherwise, the agent will hallucinate that it changed a file when it actually failed silently due to permission errors.\n\n## Real-World Workflow: Bug Fixing and Refactoring\n\nI tested this on a legacy TypeScript project with a messy set of utility functions. Instead of manually searching for the bug, I gave it a high-level objective: \"Find why the date formatter is offsetting by 24 hours in UTC-5 and fix it.\"\n\nThe agent didn't just guess. It performed the following sequence:\n\n1. Used `grep`\n\nto find all instances of `Date.utcOffset`\n\n.\n\n2. Read the specific file `src/utils/dateHelper.ts`\n\n.\n\n3. Created a temporary test file `test-fix.ts`\n\nto reproduce the bug.\n\n4. Ran the test using `npm test`\n\n, saw it fail, applied the fix, and ran it again until it passed.\n\nHere is an example of the kind of command-line interaction it handles internally:\n\n```\n# The agent executes this to verify its own fix\nnpm test src/utils/dateHelper.test.ts -- --grep \"UTC Offset\"\n```\n\n## Performance and Practical Constraints\n\nWhile the agent is powerful, there are a few technical nuances you need to be aware of regarding token usage and context windows.\n\n**Context Management:** Claude Code indexes your local files. If you have a massive`node_modules`\n\nfolder or a`.git`\n\ndirectory that isn't ignored, the agent can get bogged down. I highly recommend having a strict`.gitignore`\n\nbecause the tool respects it to prune the context.**Execution Speed:** The \"think\" loop takes a few seconds per step. It's not instantaneous.**Token Cost:** Since it reads multiple files to build a mental map of your architecture, a single complex task can consume a surprising amount of tokens compared to a simple prompt in a web UI.\n\n## Comparison: Claude Code vs. Cursor\n\nI've used both, and the difference is fundamental. Cursor is an IDE with AI integrated; Claude Code is an AI agent that uses the terminal.\n\n**Interface:** Cursor is GUI-based; Claude Code is CLI-based.**Agency:** Cursor is better for writing new blocks of code; Claude Code is significantly better for \"maintenance\" tasks (e.g., \"Update all deprecated API calls in the project to the new version\").**Integration:** Cursor manages the editor; Claude Code manages the shell, including running build scripts and managing git commits.\n\nFor anyone looking to automate the boring parts of a deployment or a large-scale refactor, this is a massive step up from standard prompt engineering. It turns the LLM into a junior developer who actually knows how to use a terminal.\n\n[Next Google Zero: The End of the Search Traffic Era →](/en/threads/2920/)", "url": "https://wpnews.pro/news/claude-code-my-first-hands-on-experience", "canonical_source": "https://promptcube3.com/en/threads/2933/", "published_at": "2026-07-24 22:04:20+00:00", "updated_at": "2026-07-24 22:06:31.164081+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "large-language-models", "generative-ai"], "entities": ["Anthropic", "Claude Code", "Cursor", "TypeScript", "Node.js"], "alternates": {"html": "https://wpnews.pro/news/claude-code-my-first-hands-on-experience", "markdown": "https://wpnews.pro/news/claude-code-my-first-hands-on-experience.md", "text": "https://wpnews.pro/news/claude-code-my-first-hands-on-experience.txt", "jsonld": "https://wpnews.pro/news/claude-code-my-first-hands-on-experience.jsonld"}}