Nick

How I use Claude Code

Give it access to my backend logs on local dev server

When I run Claude Code in my front end repo and add features, they of course sometimes trigger backend errors. While I developer on both repos locally, I run the backend repo in a docker container. Instead of copy and pasting the logs of my backend over to the Front end terminal running claude code I now give the FE Claude Code agent access to the BE logs printing in the container, via a tool/script so it has easy access to additional context for debugging development issues.

Using a command like docker-compose -f ../backend/docker-compose.yml logs -t --tail=100 app that will print the last 100 lines from the logger in my backend docker container, I can place it in a shell script or npm command via package.json. Then I update the CLAUDE.md file under the tools section with the script/command and a description of what it does and returns and when to use it. Now this tool is available in Claude Code's toolbox after a restart. When I test the UI locally during development, if it triggers and error in the BE, I can tell Claude Code to check the backend logs for additional context in debugging the issue that has arisen.

Give it access to my local postgres db

When testing locally and wanting to verify data on the db I typically open up a pg admin tool and write direct queries to the db, sometimes forgetting postgres' finicky syntax, single quotes vs double when?

Giving Claude Code direct acces makes it easy to just ask claude code what the data is for this specific entity or date

Theme: Giving claude code access to repetitive tasks and resources so that the process is abstracted away behind a simple text query, "Hey Claude Code, do this thing I usually do every hour and fetch this data while youre at it, thanks man"