Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-code-workspace

Turn Claude Code into an organization — a multi-user, multi-project development environment where AI agents work in parallel across isolated workspaces.

What is this?

A framework for managing Claude Code settings outside your projects. Instead of scattering CLAUDE.md, skills, and rules across every repo, you maintain one dedicated workspace that distributes settings via symlinks.

One repo → 14 users → 30+ skills → 12 projects → all running in parallel

Key Ideas

  • CLAUDE.md as org manual — 4-layer inheritance (global → repo → user → workspace)
  • Skills as SOPs — reusable task definitions with scripts (shipping, SEO, image gen, etc.)
  • Rules as policies — security, workflow constraints applied to every session
  • Hooks as checklists — auto-commit on edit, auto-pull on read, cost governance
  • Symlinks as distribution — one source of truth, shared everywhere

Quick Start

# 1. Clone
git clone https://github.com/noguchilin/claude-code-workspace.git
cd claude-code-workspace

# 2. Generate symlinks
node scripts/generate-links.js

# 3. Create your workspace
node scripts/setup-workspace.js <your-username>

# 4. Start Claude Code from your workspace
cd workspaces/<your-username>/general
claude

Directory Structure

claude-code-workspace/
├── CLAUDE.md                       # Root context (all sessions inherit)
├── links-manifest.json             # Declarative symlink definitions
│
├── _shared/
│   ├── rules/                      # Rule files (→ symlinked to .claude/rules/)
│   │   ├── env-local.md            # .env.local management
│   │   └── search-required.md      # Multi-source search policy
│   └── skills/                     # Skill definitions (→ symlinked to .claude/skills/)
│       ├── search/                 # Multi-engine search (Grok + Gemini + WebSearch)
│       ├── generate-image/         # AI image generation (GPT Image + Gemini)
│       ├── create-spec/            # Spec-driven development (requirements → design → tasks)
│       ├── brainstorming/          # Collaborative idea refinement
│       ├── systematic-debugging/   # 4-phase debugging framework
│       ├── check-status/           # Workspace health check
│       ├── transcribing-audio/     # Speech-to-text
│       ├── browser-view/           # Playwright MCP browser operations
│       ├── config-guide/           # Claude Code configuration guide
│       ├── workspace-setup/        # Workspace setup and conventions
│       ├── security-check/         # API key / secret security checklist
│       └── user-management/        # User roles and permissions
│
├── scripts/
│   ├── setup-workspace.js          # Create new user workspace
│   ├── generate-links.js           # Generate/verify all symlinks
│   ├── generate-mcp.js             # Generate .mcp.json per workspace
│   ├── add-project.js              # Add git project to a workspace
│   ├── validate-structure.js       # Validate workspace integrity
│   └── lib/
│       └── cross-link.js           # Cross-platform symlink (Mac/Win)
│
└── workspaces/
    ├── _template/                  # Template for new users
    │   └── general/
    │       ├── CLAUDE.md           # User workspace context
    │       └── .claude/
    │           └── settings.json   # Hooks config (auto-commit, auto-pull)
    └── {username}/                 # Each user's workspace
        ├── general/                # General workspace (main working dir)
        ├── projects/               # Git projects (worktree-based)
        └── _shared/                # User-specific shared config

How It Works

1. CLAUDE.md Inheritance

Claude Code reads CLAUDE.md recursively upward from the current directory. This creates natural layering:

~/.claude/CLAUDE.md          → Personal preferences (language, style)
claude-code-workspace/CLAUDE.md  → Org-wide context (structure, commands)
workspaces/alice/CLAUDE.md       → User-specific context
workspaces/alice/general/CLAUDE.md → Workspace-specific context

2. Rules (Auto-loaded)

Files in .claude/rules/ at the git root are loaded into every session automatically. We store rule files in _shared/rules/ and symlink them to .claude/rules/.

3. Skills (Per-workspace)

Files in .claude/skills/ at the cwd level are available as skills. Each user workspace symlinks the skills they need from _shared/skills/.

4. Hooks (Member Safety)

Members get auto-commit and auto-pull hooks by default:

{
  "hooks": {
    "PostToolUse": [{ "matcher": "Edit|Write|NotebookEdit", "hooks": [{ "command": "auto-commit.js" }] }],
    "PreToolUse": [{ "matcher": "Read|Glob|Grep", "hooks": [{ "command": "auto-pull.js" }] }]
  }
}

5. Symlink Manifest

All symlinks are declared in links-manifest.json and generated with one command:

node scripts/generate-links.js          # Generate all
node scripts/generate-links.js --dry-run # Verify only
node scripts/generate-links.js --user alice  # Specific user

Adding a New Skill

  1. Create _shared/skills/my-skill/SKILL.md
  2. Add symlink entry to links-manifest.json
  3. Run node scripts/generate-links.js

Skill structure:

_shared/skills/my-skill/
├── SKILL.md              # Skill definition (triggers, steps, examples)
└── scripts/              # Optional automation scripts
    └── run.sh

Adding a New User

node scripts/setup-workspace.js alice

This creates workspaces/alice/ from _template/, generates symlinks, and sets up MCP config.

Adding a Project

cd workspaces/alice
node ../../scripts/add-project.js https://github.com/org/repo.git main

Roles

Role Who Permissions
Owner Repo owner Full access, no auto-commit
Member Everyone else Standard skills, auto-commit enabled

Requirements

Optional

Design Philosophy

"Don't teach AI your job. Design the environment."

Instead of explaining your workflow every session, encode it into files:

Concept Human Equivalent Claude Code
Company manual Onboarding docs CLAUDE.md
SOPs Standard procedures skills/
Policies Company rules rules/
Checklists QA processes hooks

The result: any team member opens Claude Code and gets the same capabilities, the same quality, the same guardrails — without any setup beyond one command.

Article

For the full design story and rationale behind this framework, see the companion article:

Claude Codeを「組織」にした──14人で回す開発環境の全設計 (Coming soon on note.com)

License

MIT

About

Multi-user Claude Code workspace framework with shared skills, rules, and hooks

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages