code-walk-thru
Use this when user wants you to walk through (code or text) files in a EDITOR to either explain how some code works, or to show the user what changes you made, etc. You would typically use this repeatedly to show the user your changes or code files one by one, sometimes with specific line-numbers. This way the user is easily able to follow along in their favorite EDITOR as you point at various files possibly at specific line numbers within those files.
When & Why to Use This Skill
The code-walk-thru skill bridges the gap between AI assistance and local development by allowing Claude to interact directly with your favorite code editors. It enables a guided, step-by-step walkthrough of source code or text files, specifically targeting file paths and line numbers in editors like VSCode, PyCharm, IntelliJ, Zed, and Vim. This tool is essential for developers who need clear, contextual explanations of code logic or a transparent review of AI-generated changes within their native environment, significantly improving the collaborative coding experience.
Use Cases
- Interactive Code Explanations: Seamlessly guide users through complex logic by opening specific files at precise line numbers in their IDE for better comprehension.
- Change Verification: Automatically show users the exact locations of code modifications or refactors for immediate, hands-on review.
- Developer Onboarding: Help new team members navigate large codebases by walking them through key architectural components and entry points step-by-step.
- Collaborative Debugging: Point out potential bug locations or stack trace origins directly in the user's editor to streamline the troubleshooting process.
| name | code-walk-thru |
|---|---|
| description | Use this when user wants you to walk through (code or text) files in a EDITOR to either explain how some code works, or to show the user what changes you made, etc. You would typically use this repeatedly to show the user your changes or code files one by one, sometimes with specific line-numbers. This way the user is easily able to follow along in their favorite EDITOR as you point at various files possibly at specific line numbers within those files. |
code-walk-thru
Instructions
Depending on which EDITOR the user says they are using, you will use a different "show-file" cli command that shows (in the EDITOR) a specific file, optionally at specific line-number, as in examples below. If no editor specified, you must ask the user which editor they are using.
IMPORTANT: you must walk thru the files ONE BY ONE, and you MUST wait for the user to say something before moving on to the next file, or to same file different line.
- VSCode:
code --goto <file_path>:<line_number>
- PyCharm:
pycharm --line <line_number> <file_path>
- IntelliJ:
intellij --line <line_number> <file_path>
- Zed:
zed path/to/file.md:43
- Vim/Neovim:
vim +42 blah.py
nvim +42 blah.py
If any of these fail tell the user to install the corresponding CLI tool for their editor.