Live data from Hacker News

Anatomy of the .claude/ folder

blog.dailydoseofds.com

111–120 of 312 posts

Re: Anatomy of the .claude/ folder

#111

Earlier quoted context omitted.

Yes, but as soon as you start checking in and sharing access to a project with other developers these things become shared. Working out how to work on code on your own with agentic support is one thing. Working out how to work on it as a team where each developer is employing agentic tools is a whole different ballgame.

In my own group, agentic coding made sharing and collaboration go out the window because Claude will happily duplicate a bunch of code in a custom framework

I think the idea is that by creating these shared .claude files, you tell the agent how to develop for everyone and set shared standards for design patterns/architecture so that each user's agents aren't doing different things or duplicating effort.

Re: Anatomy of the .claude/ folder

#112
post #59

Earlier quoted context omitted.

I agree with most of this, with one important exception: you should have some form of sandboxing in place before running any local AI agent. The easiest way to do that is with .claude/settings.json[0]. This is important no matter how experienced you are, but arguable the most important when you don't know what you're doing. 0: or if you don't want to learn about that, you can use Claude Code Web

The default sandboxing works fine for me. It asks before running any command, and I can whitelist directories for reading and non-compound commands.

That's not a sandbox.

Re: Anatomy of the .claude/ folder

#113

Earlier quoted context omitted.

Do people really run claude and other clis like this outside a container??

How did you contain Claude Code? Did you virtualize it? I just set up a simple firejail script for it. Not completely sure if it's enough but it's at least something.

The official Claude Code repo is configured use a devcontainer config:

https://github.com/anthropics/claude-code

You can download the devcontainer CLI and use it to start a Docker container with a working Claude Code install, simple firewall, etc. out of the box. (I believe this is how the VSCode extension works: It uses this repo to bootstrap the devcontainer).

Basic instructions:

- Install the devcontainer CLI: `https://github.com/devcontainers/cli#install-script`

- Clone the Claude Code repo: `https://github.com/anthropics/claude-code`

- Navigate to the top-level repo directory and bring up the container: `devcontainer --workspace-folder . up`

- Start Claude in the container: `devcontainer exec --workspace-folder . bash -c "exec claude"`

P.S. It's all just Docker containers under the hood.

Re: Anatomy of the .claude/ folder

#114
post #94

Earlier quoted context omitted.

But why is it different? Why does it need to be? I don't write code the same as other devs so why would/should I use AI the same? Is this a hangover from when the tools were not as good?

> I don't write code the same as other devs Most people do, most people don’t have wildly different setups do they? I’d bet there’s a lot in common between how you write code and how your coworkers do.

I bet there's a lot more consistency now that AI can factor in how things are being done and be guided on top of that too.

Re: Anatomy of the .claude/ folder

#117
Feel little like this is generated and not based on experience. Claude.md should be short. Typescript strict mode isnt a gotcha, itll figure that out on its own easily, imo omit things like that. People put far too much stuff in claude, just a few lines and links to docs is all it needs. You can also @Agents.md and put everything there instead. Dont skills supercede commands? Subagents are good esp if you specify model, forked memory, linked skills, etc. Always ask what you can optimize after you see claude thrashing, then figure out how to encode that (or refactor your scripts or code choices).

Always separate plan from implementation and clear context between, its the build up of context that makes it bad ime.

Re: Anatomy of the .claude/ folder

#118

Feel little like this is generated and not based on experience. Claude.md should be short. Typescript strict mode isnt a gotcha, itll figure that out on its own easily, imo omit things like that. People put far too much stuff in claude, just a few lines and links to docs is all it needs. You can also @Agents.md and put everything there instead. Dont skills supercede commands? Subagents are good esp if you specify mod…

> Dont skills supercede commands?

Don't skills sit in context while custom slash commands are only manually invoked?

The difference isn't clear to me, especially since, upon googling it right now, I see that skills can also be invoked with a /slash.

Re: Anatomy of the .claude/ folder

#119
post #108
post #17

I’m seeing this more and more, where people build this artificial wall you supposedly need to climb to try agentic coding. That’s not the right way to start at all. You should start with a fresh .claude, empty AGENTS.md, zero skills and MCP and learn to operate the thing first.

I'd also go even further and say that you likely should never install ANY skill that you didn't create yourself (i mean, guided claude to create it for you works too), or "forked" an existing one and pulled only what you need. Everyone's workflow is different and nobody knows which workflow is the right one. If you turn your harness into a junk drawer of random skills that get auto updated, you introduce yet another…

I had an issue with playwright MCP where only one Claude Code instance could be using it at a time, so I switched to Claude's built-in /chrome MCP.

In practice, I also find it more useful that the Chrome MCP uses my current profile since I might want Claude to look at some page I'm already logged in to.

I'm not very sophisticated here though. I mainly use use browser MCP to get around the fact that 30% of servers block agent traffic like Apple's documentation.

Re: Anatomy of the .claude/ folder

#120
post #17

I’m seeing this more and more, where people build this artificial wall you supposedly need to climb to try agentic coding. That’s not the right way to start at all. You should start with a fresh .claude, empty AGENTS.md, zero skills and MCP and learn to operate the thing first.

It's not as bucolic as this when trying to get an org on board. We're currently very open to using Claude, but the unknowns are still the unknowns, so the guardrails the `.claude` folder provides gives us comfort when gaining familiarity with the tool.
Post reply on HN