Claude Code Configurations

Table of Contents

1. Introduction

This directory contains Claude Code configuration written in literate programming style using Org-mode. Configurations include slash commands, agent skills, MCP servers, and project settings.

1.1. What is Claude Code?

Claude Code is Anthropic's AI-powered coding assistant that extends Claude with tools for reading/writing files, running commands, and integrating with development workflows.

Key capabilities:

  • File operations (read, write, edit)
  • Code execution and shell commands
  • Git integration
  • Web search and fetching
  • MCP (Model Context Protocol) server integration
  • Extensible via slash commands and skills

1.2. How This Works

  • Tangling: Extract configurations to .claude/ directory using Org-mode's babel
  • Documentation: Each config includes detailed explanations of what it does and why
  • Modular: Separate files for different config types for easy navigation
  • Team-Shareable: Project configs can be version-controlled and shared

1.3. Literate Configuration Philosophy

Following the pattern established in the Emacs configurations, these Claude Code configs use literate programming:

  1. Documentation comes first - explain the "why" before the "what"
  2. Code blocks use :tangle directives to generate actual config files
  3. Examples and best practices inline with implementation
  4. Easy to understand, modify, and extend

2. Configuration Modules

2.1. Project Settings

Permissions, environment variables, model selection, hooks

Configure what tools Claude Code can use, set environment variables for your project, and control behavior through hooks.

2.2. Slash Commands

Custom prompt templates for repeated workflows

User-invoked commands accessed by typing / in Claude Code. Includes commit message generation and org-roam capture integration.

2.3. Agent Skills

Skills that Claude automatically activates based on context. Organized by domain:

Module Description
Core Skills General development patterns and practices
Emacs Skills Emacs integration, org-mode, LSP
JavaScript Skills TypeScript, React, Node.js patterns
Python Skills Python, FastAPI, Django patterns
Rails Skills Ruby on Rails development patterns
Documentation Skills Documentation completeness checking

2.4. MCP Servers

External tool integrations via Model Context Protocol

Connect Claude Code to external services and tools. Configured for Emacs integration and project-scoped filesystem access.

2.5. Custom Subagents

Specialized agents for specific tasks (future)

Placeholder for upcoming custom subagent functionality. Will be updated when the feature becomes available.

3. Quick Reference

Type Project Location User Location Format
Settings .claude/settings.json ~/.claude/settings.json JSON
Commands .claude/commands/*.md ~/.claude/commands/*.md Markdown
Skills .claude/skills/*/ ~/.claude/skills/*/ Markdown
MCP Servers .mcp.json ~/.claude.json JSON

Project-level configurations are version-controlled and shared with your team. User-level configurations are personal preferences stored in your home directory.

4. Usage

See README for detailed tangling instructions, editing guide, and troubleshooting.

4.1. Quick Start

  1. Review configs: Read through the org files to understand what each config does
  2. Customize paths: Edit MCP server paths in 04-mcp-servers.org if needed
  3. Tangle configs: Run ./tangle-claude.sh from project root
  4. Reload Claude Code: Restart or reload to pick up new configurations

4.2. Tangling Individual Files

From Emacs:

  • Open any org file
  • Run M-x org-babel-tangle or C-c C-v t

From command line:

emacs -Q --batch \
  --eval "(require 'org)" \
  --eval "(setq org-confirm-babel-evaluate nil)" \
  --eval "(find-file \"01-settings.org\")" \
  --eval "(org-babel-tangle)" \
  --kill

5. Project vs User Configuration

5.1. Project-Level (Version Controlled)

Use for configurations that should be shared with your team:

  • Permission policies for the project
  • MCP servers everyone uses
  • Common slash commands (/review, /commit-msg)
  • Team-wide skills
  • Project-specific settings

Files: .claude/settings.json, .claude/commands/, .claude/skills/, .mcp.json

5.2. User-Level (Personal)

Use for personal preferences not in version control:

  • Personal notification preferences
  • Local development tools
  • Experimental commands/skills
  • API keys and credentials
  • Personal MCP servers

Files: ~/.claude/settings.json, ~/.claude/commands/, ~/.claude/skills/

6. Integration

This configuration is part of a larger knowledge base. See main index for other configurations.

6.1. Related Configurations

6.2. Build Integration

These org files are automatically processed by the site's build system:

  • ./build.sh converts org files to HTML
  • Generated files appear in public/agents/claude-code/
  • Styling matches the rest of the site (GitHub Flavored Markdown theme)
  • Floating table of contents for easy navigation

7. Resources

7.3. Site Documentation

  • CLAUDE.md - Instructions for Claude when working in this repo