workspace
БесплатноБез исполняемых скриптовНе проверенDynamic multi-repo and monorepo awareness for Claude Code. Analyze workspace topology, track API contracts, and maintain cross-repo context.
от alinaqi★ 713 звёзд на GitHubОб этом скилле
Workspace Analysis Skill
Dynamic multi-repo and monorepo awareness for Claude Code. Analyze workspace topology, track API contracts, and maintain cross-repo context.
The Problem
When you have separate frontend/backend repos (or monorepo with multiple apps), Claude Code operates in isolation. It doesn't know:
- API contracts between modules/repos
- Shared types and interfaces
- Full system architecture
- Cross-repo dependencies
- What changed in other parts of the system
This leads to:
- Duplicate type definitions
- API contract mismatches
- Breaking changes not caught until runtime
- Claude reimplementing things that exist elsewhere
Solution: Dynamic Workspace Analysis
Instead of static manifests that get stale, Claude dynamically analyzes the workspace and generates context artifacts that stay fresh through hooks.
┌─────────────────────────────────────────────────────────────────┐
│ WORKSPACE ANALYSIS SYSTEM │
├─────────────────────────────────────────────────────────────────┤
│ │
│ /analyze-workspace (Full Analysis - ~2 min) │
│ ├── Topology discovery (monorepo vs multi-repo) │
│ ├── Dependency graph (who calls whom) │
│ ├── Contract extraction (OpenAPI, GraphQL, types) │
│ └── Key file identification (what to load when) │
│ │
│ /sync-contracts (Incremental - ~15 sec) │
│ ├── Check contract source files for changes │
│ ├── Update CONTRACTS.md with diffs │
│ └── Validate consistency │
│ │
│ Hooks (Automatic) │
│ ├── Session start: Staleness advisory (~5 sec) │
│ ├── Post-commit: Auto-sync if contracts changed (~15 sec) │
│ └── Pre-push: Validation gate (~10 sec) │
│ │
└─────────────────────────────────────────────────────────────────┘
Workspace Classification
Detection Patterns
| Type | Indicators | File Access |
|---|---|---|
| Monorepo | pnpm-workspace.yaml, nx.json, turbo.json, lerna.json | Direct (same tree) |
| Multi-repo | Sibling directories with separate .git | Via symlinks or paths |
| Hybrid | Monorepo + external repo dependencies | Mixed |
| Single | One app, no workspace config | N/A (use existing-repo) |
Monorepo Detection
# Check for monorepo indicators
ls package.json pnpm-workspace.yaml lerna.json nx.json turbo.json 2>/dev/null
ls apps/ packages/ services/ libs/ modules/ 2>/dev/null
Multi-Repo Detection
# Check sibling directories for related repos
ls -la ../*.git 2>/dev/null
cat ../*/.git/config 2>/dev/null | grep "url"
# Look for naming patterns
ls .. | grep -E "(frontend|backend|api|web|shared|common)"
Polyglot Detection
# Find all package manifests
find . -maxdepth 4 -name "package.json" -o -name "pyproject.toml" \
-o -name "go.mod" -o -name "Cargo.toml" -o -name "pom.xml" \
-o -name "build.gradle" -o -name "Gemfile"
Analysis Protocol
Phase 1: Topology Discovery (~30 seconds)
Determine workspace structure:
## Discovery Checklist
1. [ ] Identify workspace root
2. [ ] Classify workspace type (monorepo/multi-repo/hybrid/single)
3. [ ] List all modules/apps/packages
4. [ ] Detect tech stack per module
5. [ ] Identify entry points per module
Module Detection Pattern:
workspace-root/
├── apps/ → Application modules
│ ├── web/ → Frontend app
│ └── api/ → Backend app
├── packages/ → Shared packages
│ ├── ui/ → Component library
│ ├── types/ → Shared types
│ └── db/ → Database layer
├── services/ → Microservices
└── libs/ → Internal libraries
Phase 2: Dependency Graph (~60 seconds)
For each module, map:
1. Internal Dependencies
# TypeScript/JavaScript
grep -r "from ['\"]@" --include="*.ts" --include="*.tsx" | head -50
grep -r "workspace:" package.json
# Python
grep -r "from \." --include="*.py" | head -50
2. API Relationships
# Find API calls
grep -rE "fetch|axios|httpx|requests\." --include="*.ts" --include="*.py" | \
grep -E "/api|localhost|127\.0\.0\.1" | head -30
3. Database Connections
# Find DB access patterns
grep -rE "prisma|drizzle|sqlalchemy|sequelize|typeorm" --include="*.ts" --include="*.py"
Phase 3: Contract Extraction (~45 seconds)
Identify and parse API contracts:
| Contract Type | Detection | Extraction |
|---|---|---|
| OpenAPI | o |
Установить workspace в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл workspace?
Dynamic multi-repo and monorepo awareness for Claude Code. Analyze workspace topology, track API contracts, and maintain cross-repo context.
Как установить скилл workspace?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл workspace запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic