# Claude Code
> What a Claude Code session materialises, the init flag that makes it the hall's provider, and how /ivar-discovery runs there.
Source: https://ivar.run/docs/providers/claude-code

import { File, Files, Folder } from 'fumadocs-ui/components/files';

Setup is harness-agnostic — see the [quickstart](/docs/quickstart) for creating
a hall and opening your first session. This page covers what is specific to
Claude Code once you're there.

## What lands in `.claude/`

A Claude Code session materialises a `.claude/` directory at the view
directory's root, alongside the promoted repos:

<Files>
  <Folder name=".claude" defaultOpen>
    <Folder name="commands" defaultOpen>
      <File name="ivar-discovery.md" />
      <File name="ivar-plan.md" />
    </Folder>
    <Folder name="skills" />
    <Folder name="hooks" defaultOpen>
      <File name="ivar-execution-guard.sh" />
    </Folder>
    <File name="settings.json" />
  </Folder>
  <File name="CLAUDE.md" />
</Files>

`.claude/commands/` holds only `ivar-*.md` — the glob is deliberately narrow so
a user's own commands in that directory stay untouched and committable.
`.claude/skills/` carries the hall's skills, both hall-level and repo-namespaced
(`api--openapi-contract`, `web--openapi-contract`). `CLAUDE.md` is the
provider-native instructions file Claude Code reads at startup.

The read-only guard for repos you haven't promoted is enforced by
`.claude/hooks/ivar-execution-guard.sh`, registered as a `PreToolUse` hook in
`.claude/settings.json`. It's a real hook plus a real cleared write bit — not a
prompt asking the agent to behave.

## Add it to an existing hall

The [quickstart](/docs/quickstart) covers `ivar init`. If the hall already
exists with a different provider, add Claude Code alongside it:

```sh
ivar provider add claude-code
```

## Where `/ivar-discovery` comes from

It is a slash command materialised from `.claude/commands/ivar-discovery.md`,
so you type it in the Claude Code chat rather than in a shell.
