# Claude Code Formatter

<!-- generated:start:overview -->
<!-- Auto-generated by `pnpm docs:formatters`. Do not edit manually. -->

| Property | Value |
|----------|-------|
| **Tier** | Custom |
| **Main output** | `CLAUDE.md` |
| **Dot directory** | `.claude/` |
| **Skills** | Yes (`.claude/skills/<name>/SKILL.md`) |
| **Agents** | Yes (`.claude/agents/<name>.md`) |
| **Commands** | Yes (`.claude/commands/<name>.md`) |
| **Local files** | Yes (`CLAUDE.local.md`) |

<!-- generated:end:overview -->

## Output Files

<!-- generated:start:output-files -->
<!-- Auto-generated by `pnpm docs:formatters`. Do not edit manually. -->

| File | Path | Purpose |
|------|------|---------|
| Main instructions | `CLAUDE.md` | Primary rule file |
| Lifecycle hooks | `.claude/settings.json` | Project hooks in `full` mode |
| Local overrides | `CLAUDE.local.md` | Private instructions (gitignored) |
| Skills | `.claude/skills/<name>/SKILL.md` | Reusable skill definitions in `full` mode |
| Commands | `.claude/commands/<name>.md` | Slash commands |
| Agents | `.claude/agents/<name>.md` | Agent configurations |
| MCP servers | `.mcp.json` | MCP server config in `full` mode |

<!-- generated:end:output-files -->

## Supported Features

<!-- generated:start:features -->
<!-- Auto-generated by `pnpm docs:formatters`. Do not edit manually. -->

| Feature | Supported |
|---------|-----------|
| Markdown Output | Yes |
| MDC Format | No |
| Code Blocks | Yes |
| Mermaid Diagrams | Yes |
| Single File Output | Yes |
| Multiple Rule Files | Yes |
| Workflow Files | Yes |
| Nested Directory Structure | No |
| YAML Frontmatter | Yes |
| Description in Frontmatter | No |
| Globs in Frontmatter | Yes |
| Activation Type | No |
| Glob Pattern Targeting | Yes |
| Always Apply Rules | Yes |
| Manual Activation | No |
| Auto/Model Activation | No |
| Structured Examples | Yes |
| Character Limit Validation | No |
| Content Section Splitting | Yes |
| Guard Dependencies | Yes |
| Context File Inclusion | Planned |
| @-Mentions | No |
| Tool Integration | Yes |
| Path-Specific Rules | Yes |
| Prompt Files | No |
| Slash Commands | Yes |
| Skills | Yes |
| Agent Instructions | Yes |
| Local Memory | Partial |
| Nested Memory | Planned |

<!-- generated:end:features -->

## Limitations & Quirks

- `CLAUDE.md` is gitignored by many project templates - you may need to `git add -f CLAUDE.md`
- `CLAUDE.local.md` is intentionally not committed to git (private developer overrides)
- Skills support frontmatter fields: `name`, `description`, plus newer fields like `model`, `allowedTools`, `disallowedTools`, `permissionMode`, `specModel`, `specReasoningEffort`
- A local SKILL.md keeps its own frontmatter, except `params`: parameters are filled in at compile time, so the generated skill does not carry them (Factory drops them too)
- Skill and agent bodies are normalized for Prettier (aligned tables, a blank line between a paragraph and a list), without changing their meaning: table cells, code spans, list nesting and tight lists stay as written
- Agent files support: `description`, `content`, `tools`, `disallowedTools`, `model`, `permissionMode`, `skills`, `maxTurns`, `memory`, `mcpServers`, `background`, `isolation`. Fields other targets own (`reasoningEffort`, `specModel`, `specReasoningEffort`, `sandboxMode`, `nicknameCandidates`, `handoffs`) are reported with `PS4003` and omitted
- Agent and skill `model` values keep floating aliases (`opus`, `sonnet`, `haiku`, `fable`) and `inherit` as written; pinned Claude releases become API ids such as `claude-sonnet-4-5-20250929`, and models from other providers are omitted with `PS4004` (see [Model Catalog](https://getpromptscript.dev/reference/models/index.md#target-model-names))
- Agent-level lifecycle hooks are not part of `@agents`; define them through `@hooks`
- The `@local` block content goes to `CLAUDE.local.md` with an import statement added to the main `CLAUDE.md`

## Settings

In `full` mode the target `settings` option writes project settings to
`.claude/settings.json`, next to the `@hooks` entries:

```yaml
targets:
  - claude:
      version: full
      settings:
        model: claude-sonnet-4-5
        permissions:
          allow:
            - 'Bash(npm run test:*)'
          deny:
            - 'Read(./.env)'
        env:
          NODE_ENV: development
        enabledPlugins:
          code-standards@acme-plugins: true
```

Supported keys are `model`, `permissions` (`allow`, `deny`, `ask`), `env` and
`enabledPlugins`. PromptScript merges them into an existing
`.claude/settings.json`. Keys it does not generate stay as they are. For object
keys only the generated sub-keys are replaced: your `permissions.defaultMode` or
own `env` variables survive, while a generated `permissions.allow` replaces the
old `allow` list. A key removed from the config is not removed from the file.

## Example Output

```
project-root/
├── CLAUDE.md                          # Main instructions
├── CLAUDE.local.md                    # Local overrides (gitignored)
└── .claude/
    ├── skills/
    │   └── my-skill/
    │       └── SKILL.md               # Skill with YAML frontmatter
    └── agents/
        └── reviewer.md                # Agent config with frontmatter
```

## Official Documentation

- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)
- [Claude Code Skills](https://docs.anthropic.com/en/docs/claude-code/skills)