Examples
Basic Mono Repo

Basic Mono Repo

Setting up a basic CLDPM mono repo from scratch.

Overview

This example walks through creating a complete CLDPM mono repo with multiple projects sharing common components.

Step 1: Initialize

cldpm init claude-projects
cd claude-projects

Resulting structure:

claude-projects/
├── cldpm.json
├── CLAUDE.md
├── .gitignore
├── shared/
│   ├── skills/
│   ├── agents/
│   ├── hooks/
│   └── rules/
└── projects/

Step 2: Create Shared Components

Create a code review skill

mkdir -p shared/skills/code-review

Create shared/skills/code-review/SKILL.md:

---
name: code-review
description: Thorough code review assistant
version: 1.0.0
---
 
# Code Review Skill
 
You are a code review assistant. When reviewing code:
 
## Review Checklist
 
1. **Correctness**: Does the code do what it's supposed to?
2. **Security**: Are there any security vulnerabilities?
3. **Performance**: Are there any performance issues?
4. **Readability**: Is the code easy to understand?
5. **Testing**: Is the code adequately tested?
 
## Output Format
 
Provide feedback in this format:
 
### Summary
Brief overview of the changes.
 
### Issues Found
- [CRITICAL/HIGH/MEDIUM/LOW] Description of issue
 
### Suggestions
- Improvement suggestions
 
### Approval
Approve / Request Changes / Needs Discussion

Create a logging skill

mkdir -p shared/skills/logging

Create shared/skills/logging/SKILL.md:

---
name: logging
description: Consistent logging patterns
---
 
# Logging Skill
 
Implement consistent logging across the codebase.
 
## Log Levels
 
- **ERROR**: System failures requiring immediate attention
- **WARN**: Potential issues that don't stop execution
- **INFO**: Important business events
- **DEBUG**: Detailed debugging information
 
## Format
 
Use structured logging with these fields:
- timestamp
- level
- message
- context (optional metadata)

Step 3: Create Projects

Web application project

cldpm create project web-app -d "Frontend web application"

API server project

cldpm create project api-server -d "Backend API server"

Step 4: Add Shared Components

# Add code-review to both projects
cldpm add skill:code-review --to web-app
cldpm add skill:code-review --to api-server
 
# Add logging to API server only
cldpm add skill:logging --to api-server

Step 5: Add Local Components

Create a project-specific skill for web-app:

mkdir -p projects/web-app/.claude/skills/ui-patterns

Create projects/web-app/.claude/skills/ui-patterns/SKILL.md:

---
name: ui-patterns
description: UI component patterns for web-app
---
 
# UI Patterns
 
Project-specific UI component guidelines.
 
## Component Structure
 
- Use functional components with hooks
- Follow atomic design principles
- Implement proper accessibility (ARIA)

Final Structure

claude-projects/
├── cldpm.json
├── CLAUDE.md
├── shared/
│   └── skills/
│       ├── code-review/
│       │   └── SKILL.md
│       └── logging/
│           └── SKILL.md
└── projects/
    ├── web-app/
    │   ├── project.json
    │   ├── CLAUDE.md
    │   └── .claude/
    │       └── skills/
    │           ├── code-review -> ../../../shared/skills/code-review
    │           ├── ui-patterns/  (local)
    │           │   └── SKILL.md
    │           └── .gitignore
    └── api-server/
        ├── project.json
        ├── CLAUDE.md
        └── .claude/
            └── skills/
                ├── code-review -> ../../../shared/skills/code-review
                ├── logging -> ../../../shared/skills/logging
                └── .gitignore

Verify Setup

# Check web-app
cldpm get web-app
 
# Output:
# web-app
# ├── Shared
# │   └── skills
# │       └── code-review
# └── Local
#     └── skills
#         └── ui-patterns
 
# Check api-server
cldpm get api-server
 
# Output:
# api-server
# ├── Shared
# │   └── skills
# │       ├── code-review
# │       └── logging
# └── Local
#     └── (none)

Git Workflow

# Initialize git
git init
git add .
git commit -m "Initial CLDPM mono repo setup"
 
# After clone (on another machine)
git clone <repo-url>
cd claude-projects
cldpm sync --all  # Regenerate symlinks