Starting with Claude

From Genecats
Jump to navigationJump to search

You can install Claude code following the instructions at https://code.claude.com/docs/en/quickstart, but the short story is you're probably just going to want to run this:

   curl -fsSL https://claude.ai/install.sh | bash

After that, you should likely have the "claude" binary installed in ~/.local/bin.

When you run claude for the first time, the tool will ask how you want to connect to the Anthropic servers to access Claude models. Options include something along the lines of "Claude account with subscription" and "Anthropic Console account". You want the first one - account with subscription. If you select that, you'll be presented with a URL to visit and log in on. Copy that URL and send it to Max or Lou, asking them to provide you with the response token. They'll respond with a token - just paste that in and that should complete the process. These tokens expire reasonably quickly, so make sure to use it as soon as you get it (otherwise you'll have to start over and request a new token).

When you run claude in a directory for the first time, it will ask whether you want to give it access to read/modify files in that directory - your options are basically "yes" or "quit". So run it in places where you want to allow claude to edit files and have access to their contents (maybe don't store secret keys in that directory, for example). To start, you're probably just going to want to go into the root of your copy of the kent repository and run claude there, then give it permission to modify files.

Now you're able to start interacting with claude code.

Just pressing ? will show a reminder of some basic key combinations. Most commands for actually interacting with the claude code editor itself (as opposed the directory you're in) begin with /. For example, /init will help you set up your own CLAUDE.md file with instructions for it. /config opens up a number of configuration options. /model lets you select which model you're interacting with (the default is currently Opus 4.6, which is a very strong model. Given the complexity of the kent codebase, it's probably best to stick with that).

You can enter whatever free text you want and have a conversation with claude about the contents of the directory, or other things if you like. "Tell me a haiku about dandelions", or "Explain the basic layout of the hgGenome CGI" (that latter gets complicated quickly - it will read a number of source files into context before providing you with an answer).

If you start a query and decide that you want to interrupt claude (maybe because you don't like what it's doing, or because you thought of something new to add to the request), you can interrupt it by pressing the Esc key twice.

Some members of the team are currently experimenting with skills files, which are basically little packaged reminders of how to do specific tasks. You can ask other members of the team if they have a useful skills file to share to start (we're working on putting one under revision control for group use). But if you go through an extended discussion with claude about how to achieve some task (like how to fetch the discussion from a particular redmine ticket), you can then tell claude to save that into a skill for future use. The next time you ask it to fetch a redmine ticket discussion, it should then consult the skills file, see that it already has a description of how to go about it, and you won't have to explain the process again.