Claude Code Modular Configuration Framework
Token-efficient, context-specific configuration for learning developers.
Architecture
~/.claude/
├── CLAUDE.md ← BASE (minimal, ~30 lines)
├── .mcp.json ← MCP SERVERS (Chrome DevTools, Context7, Serena)
├── settings.json ← MARKETPLACES (5 configured)
├── env.sh ← API KEYS (user-specific)
├── contexts/ ← DOMAIN MODULES (load as needed)
│ ├── moodle-core.md Moodle coding standards
│ ├── moodle-ai.md Moodle AI subsystem (4.5+)
│ ├── moodle-admin.md Webservices, reporting
│ ├── pocketflow.md AI agent development
│ ├── accessibility.md EU accessibility (EN 301 549)
│ ├── frontend.md UI/chatbot patterns
│ └── dgx-h100.md DGX H100 GPU cluster
├── plugins/ ← CLAUDE CODE PLUGINS (skills + MCPs)
│ ├── moodle-dev-pro/ Moodle plugin development
│ ├── ai-app-dev/ AI application development
│ └── moodle-admin/ Admin & webservices
└── project-templates/ ← COPY FOR NEW PROJECTS
├── moodle-plugin/
├── moodle-ai-plugin/
├── pocketflow-chatbot/
├── moodle-admin-tool/
└── dgx-h100-app/
Quick Start (Automated)
One-line install on any server:
curl -sSL https://raw.githubusercontent.com/astoeffer/plugin-marketplace/master/setup-claude.sh | bash
Or manually:
git clone https://github.com/astoeffer/plugin-marketplace ~/.claude-marketplace
~/.claude-marketplace/setup-claude.sh
Quick Start (Manual)
1. Install Base Configuration
# Copy all base files
cp base/CLAUDE.md ~/.claude/CLAUDE.md
cp base/.mcp.json ~/.claude/.mcp.json
cp base/settings.json ~/.claude/settings.json
# Copy context modules
cp -r contexts ~/.claude/contexts
2. Configure for Project Type
Moodle Plugin:
# In ~/.claude/CLAUDE.md, uncomment:
@contexts/moodle-core.md
@contexts/accessibility.md
AI Chatbot:
@contexts/pocketflow.md
@contexts/frontend.md
@contexts/accessibility.md
Moodle AI Plugin:
@contexts/moodle-core.md
@contexts/moodle-ai.md
@contexts/accessibility.md
DGX H100 AI Application:
@contexts/pocketflow.md
@contexts/dgx-h100.md
@contexts/accessibility.md
3. Install Plugins
# In Claude Code:
/plugin install moodle-dev-pro@astoeffer
/plugin install ai-app-dev@astoeffer
/plugin install moodle-admin@astoeffer
4. Copy Base MCP Configuration
# Copy base .mcp.json for Chrome DevTools and core MCPs
cp base/.mcp.json ~/.claude/.mcp.json
5. Configure MCP API Keys
# Set environment variables for MCP servers
export CONTEXT7_API_KEY="ctx7sk-..."
export TAVILY_API_KEY="tvly-dev-..."
Token Efficiency
| Configuration | Tokens (est.) |
|---|
| Full CLAUDE.md | ~8,000 |
| Base only | ~500 |
| Base + 1 context | ~1,500 |
| Base + 2 contexts | ~2,500 |
Savings: 60-90% token reduction with modular approach.
Context Modules
| Module | Content | Use When |
|---|
moodle-core.md | PSR-12, Frankenstyle, APIs | Any Moodle plugin |
moodle-ai.md | AI subsystem, Providers | AI features (4.5+) |
moodle-admin.md | Webservices, reporting | Admin tools |
pocketflow.md | Node/Flow patterns | AI agents |
accessibility.md | WCAG, EN 301 549 | All UI work |
frontend.md | Chatbot, widgets | Frontend/UI |
dgx-h100.md | SLURM, Docker, GPUs | GPU cluster work |
Plugins
moodle-dev-pro
- Skills: moodle-standards, accessibility-audit, moodle-ai-integration
- MCPs: Context7, Serena
- For: Moodle plugin development
ai-app-dev
- Skills: pocketflow-patterns, chatbot-integration
- MCPs: Context7, Tavily, Serena
- For: AI application development (including DGX H100)
moodle-admin
- Skills: webservice-patterns, reporting-analytics
- MCPs: Context7, Serena
- For: Moodle admin tools
Project Templates
Copy to start new projects:
# Moodle plugin
cp -r project-templates/moodle-plugin/.claude /path/to/new-project/
# AI app on DGX H100
cp -r project-templates/dgx-h100-app/.claude /path/to/new-project/
Usage Flow
1. Start project
└── Copy appropriate template to .claude/CLAUDE.md
2. Claude Code loads
└── Base CLAUDE.md → @imports active contexts
3. Work on task
└── Plugin skills provide domain guidance
└── MCP servers enhance capabilities
4. As you grow
└── Modify contexts, add/remove @imports
For Marketplaces
To add plugins to your marketplace:
# Copy entire directory structure to marketplace repo
cp -r plugins contexts project-templates marketplace.json /path/to/astoeffer/plugin-marketplace/
# The marketplace.json contains full plugin registry
MCP Server Configuration
Base MCP Servers (always available)