Codebase Context
homarr-labs/homarr
Navigate Homarr's monorepo architecture and reuse shared packages.
Dynamic multi-repo and monorepo awareness for Claude Code. An agent skill from alinaqi/maggy.
$ npx skills add alinaqi/maggy --skill workspace -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alinaqi/maggy workspace --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/workspace .claude/skills/workspace && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .claude/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alinaqi/maggy/tree/main/skills/workspaceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alinaqi/maggy --skill workspace -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alinaqi/maggy workspace --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/workspace .agents/skills/workspace && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .agents/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill workspace -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alinaqi/maggy workspace --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/workspace .cursor/skills/workspace && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .cursor/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alinaqi/maggy.git --path skills/workspace--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alinaqi/maggy --skill workspace -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alinaqi/maggy workspace --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/workspace .gemini/skills/workspace && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .gemini/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alinaqi/maggy workspaceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alinaqi/maggy --skill workspace -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/workspace .github/skills/workspace && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .github/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill workspace -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alinaqi/maggy workspace --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/workspace .opencode/skills/workspace && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "workspace" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/workspace into .opencode/skills/workspace/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "workspace", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
workspaceDynamic multi-repo and monorepo awareness for Claude Code. An agent skill from alinaqi/maggy.
Workspace is an agent skill from alinaqi/maggy. Dynamic multi-repo and monorepo awareness for Claude Code. Analyze workspace topology, track API contracts, and maintain cross-repo context.
Its SKILL.md is about 7.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Monorepo tooling, API design and Codebase knowledge for agents. It works with OpenAPI, tRPC and GraphQL. The repository describes itself as: What started as an opinionated Claude Code setup kit is now an autonomous AI engineering command center. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 72a456e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitclaudeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Workspace loads about 7.3k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 914 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from alinaqi/maggy at commit 72a456e, republished under its MIT licence (© alinaqi). 914 words, ~7,283 tokens.
.claude/skills/workspace/SKILL.md (or your agent's skills folder).Dynamic multi-repo and monorepo awareness for Claude Code. Analyze workspace topology, track API contracts, and maintain cross-repo context.
When you have separate frontend/backend repos (or monorepo with multiple apps), Claude Code operates in isolation. It doesn't know:
This leads to:
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) │
│ │
└─────────────────────────────────────────────────────────────────┘| 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) |
# 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# 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)"# 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"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 moduleModule 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 librariesFor 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 -502. API Relationships
# Find API calls
grep -rE "fetch|axios|httpx|requests\." --include="*.ts" --include="*.py" | \
grep -E "/api|localhost|127\.0\.0\.1" | head -303. Database Connections
# Find DB access patterns
grep -rE "prisma|drizzle|sqlalchemy|sequelize|typeorm" --include="*.ts" --include="*.py"Identify and parse API contracts:
| Contract Type | Detection | Extraction |
|---|---|---|
| OpenAPI | openapi.json, swagger.yaml, /docs endpoint | Parse paths, schemas |
| GraphQL | schema.graphql, *.gql, /graphql endpoint | Parse types, queries, mutations |
| tRPC | trpc router files, @trpc/* imports | Parse router definitions |
| Protobuf | *.proto files | Parse services, messages |
| TypeScript | Shared .d.ts, exported interfaces | Parse exported types |
| Pydantic | schemas/, models/ with BaseModel | Parse model definitions |
| Zod | schemas/ with z.object | Parse schema definitions |
Contract Source Priority:
Identify files Claude MUST know about for each context:
| Category | Detection Pattern | Token Priority |
|---|---|---|
| Route definitions | **/routes/**, **/api/**, @app.get, @router | HIGH |
| Type definitions | **/types/**, *.d.ts, schemas/, models/ | HIGH |
| Config | .env.example, config/, settings.py | MEDIUM |
| Entry points | main.ts, index.ts, app.py, server.py | MEDIUM |
| API clients | **/api/client*, **/lib/api* | HIGH |
| Database schema | schema/, migrations/, prisma/schema.prisma | MEDIUM |
| Tests | __tests__/, *_test.py, *.spec.ts | LOW (on-demand) |
All artifacts go in _project_specs/workspace/:
_project_specs/workspace/
├── TOPOLOGY.md # What modules exist, their roles
├── CONTRACTS.md # API specs, shared types (summarized)
├── DEPENDENCY_GRAPH.md # Who calls whom (visual + list)
├── KEY_FILES.md # What to load for each context
├── CROSS_REPO_INDEX.md # Capabilities across all modules
└── .contract-sources # Files to monitor for changes# Workspace Topology
Generated: 2026-01-20T14:32:00Z
Analyzer: maggy/workspace-analysis
Workspace Type: Monorepo (Turborepo)
## Overview
┌─────────────────────────────────────────────────┐ │ apps/web (Next.js) ←→ apps/api (FastAPI) │ │ ↓ ↓ │ │ packages/shared-types ← packages/db │ └─────────────────────────────────────────────────┘
## Modules
### apps/web
- **Path**: /apps/web
- **Tech**: Next.js 14, TypeScript, TailwindCSS
- **Role**: Customer-facing dashboard
- **Consumes**: apps/api (REST), packages/shared-types
- **Entry**: src/app/layout.tsx
- **Key files**:
- `src/lib/api/client.ts` - API client (187 lines)
- `src/types/` - Frontend-specific types (12 files)
- **Token estimate**: ~15K (full), ~4K (summarized)
### apps/api
- **Path**: /apps/api
- **Tech**: FastAPI, Python 3.12, SQLAlchemy
- **Role**: REST API, business logic
- **Exposes**: OpenAPI at /docs (47 endpoints)
- **Consumes**: packages/db
- **Entry**: app/main.py
- **Key files**:
- `app/routes/` - All endpoints (8 routers)
- `app/schemas/` - Pydantic models (23 files)
- `openapi.json` - Generated spec
- **Token estimate**: ~22K (full), ~6K (summarized)
### packages/shared-types
- **Path**: /packages/shared-types
- **Tech**: TypeScript
- **Role**: Shared type definitions
- **Consumed by**: apps/web, apps/api (codegen)
- **Key files**:
- `src/index.ts` - All exports (340 lines)
- **Token estimate**: ~3K
### packages/db
- **Path**: /packages/db
- **Tech**: Drizzle ORM, TypeScript
- **Role**: Database schema, migrations
- **Consumed by**: apps/api
- **Key files**:
- `schema/` - Table definitions (8 files)
- `migrations/` - Migration history (23 files)
- **Token estimate**: ~8K (full), ~2K (schema only)# API Contracts
Generated: 2026-01-20T14:32:00Z
Last sync: 2026-01-20T16:45:00Z
Sources: 3 files monitored
## REST API: apps/api → apps/web
### Endpoints Summary (47 total)
| Domain | Count | Key Endpoints |
|--------|-------|---------------|
| /api/auth | 5 | POST /login, POST /register, POST /refresh |
| /api/users | 6 | GET /me, PATCH /me, GET /:id |
| /api/campaigns | 8 | CRUD + POST /bulk, GET /analytics |
| /api/analytics | 12 | GET /dashboard, GET /timeseries, GET /funnel |
| /api/settings | 4 | GET /, PATCH /, GET /integrations |
### Key Types
```typescript
// Campaign domain (from apps/api/app/schemas/campaign.py)
interface Campaign {
id: string;
name: string;
status: 'draft' | 'active' | 'paused' | 'completed';
budget: number;
target_audience: TargetAudience;
created_at: string;
updated_at: string;
}
interface CampaignCreate {
name: string;
budget: number;
target_audience?: TargetAudience;
}
// Auth domain (from apps/api/app/schemas/auth.py)
interface User {
id: string;
email: string;
name: string;
role: 'user' | 'admin';
}
interface TokenPair {
access_token: string;
refresh_token: string;
expires_in: number;
}| Check | Status | Details |
|---|---|---|
| OpenAPI matches routes | ✅ | 47/47 endpoints documented |
| Types match schemas | ✅ | All Pydantic models exported |
| Frontend types current | ⚠️ | 2 types need regeneration |
| Category | Types | Used By |
|---|---|---|
| Domain models | Campaign, User, Analytics | web, api |
| API responses | ApiResponse<T>, PaginatedResponse<T> | web |
| Utilities | DateRange, FilterParams | web, api |
| Table | Key Columns | Relations |
|---|---|---|
| users | id, email, name, role | campaigns, sessions |
| campaigns | id, user_id, name, status | analytics, targets |
| analytics | id, campaign_id, date, metrics | campaigns |
### DEPENDENCY_GRAPH.md Format
```markdown
# Dependency Graph
Generated: 2026-01-20T14:32:00Z
## Visual Overview
┌─────────────────┐
│ packages/db │
│ (Drizzle ORM) │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐ │ apps/web │◄──│ apps/api │ │ (Next.js) │ │ (FastAPI) │ └────────┬────────┘ └────────┬────────┘ │ │ ▼ ▼ ┌─────────────────────────────────────────┐ │ packages/shared-types │ │ (TypeScript) │ └─────────────────────────────────────────┘
## Dependency Matrix
| Module | Depends On | Depended By |
|--------|------------|-------------|
| apps/web | shared-types, apps/api (runtime) | - |
| apps/api | shared-types (codegen), db | apps/web |
| packages/shared-types | - | apps/web, apps/api |
| packages/db | - | apps/api |
## Import Analysis
### apps/web imports:@repo/shared-types: 23 files apps/api (via fetch): 15 files
### apps/api imports:packages/db: 12 files packages/shared-types (codegen): 8 files
## API Call Graph
apps/web apps/api ───────── ──────── src/lib/api/client.ts ──────────► app/routes/auth.py └── login() POST /api/auth/login └── register() POST /api/auth/register
src/app/campaigns/page.tsx ─────► app/routes/campaigns.py └── getCampaigns() GET /api/campaigns └── createCampaign() POST /api/campaigns
# Key Files by Context
## Context: Frontend API Integration
**When**: Modifying API calls, response handling, or API types in frontend
Load these files (~8K tokens):apps/web/src/lib/api/client.ts # API client implementation apps/web/src/types/api.d.ts # Frontend API types apps/api/openapi.json # Full API spec (or summary) packages/shared-types/src/index.ts # Shared type definitions
## Context: Backend Endpoint Development
**When**: Adding/modifying API endpoints
Load these files (~12K tokens):apps/api/app/routes/ # Existing route patterns apps/api/app/schemas/ # Pydantic models (relevant domain) apps/api/app/dependencies/ # Auth, DB dependencies packages/db/schema/ # Relevant table definitions
## Context: Database Changes
**When**: Schema modifications, migrations, queries
Load these files (~6K tokens):packages/db/schema/ # All table definitions packages/db/migrations/ # Last 5 migrations apps/api/app/models/ # ORM model usage
## Context: Shared Types
**When**: Modifying interfaces used across modules
Load these files (~4K tokens):packages/shared-types/src/ # Type source files apps/web/src/types/api.d.ts # Consumer (frontend) apps/api/app/schemas/ # Source (backend)
## Context: Authentication
**When**: Auth flow, sessions, tokens
Load these files (~5K tokens):apps/api/app/routes/auth.py # Auth endpoints apps/api/app/dependencies/auth.py # Auth middleware apps/web/src/lib/auth/ # Frontend auth handling packages/shared-types/src/auth.ts # Auth types
## Load-on-Demand Triggers
| Claude detects... | Load additionally |
|-------------------|-------------------|
| "check the API contract" | Full OpenAPI spec |
| Import from another module | That module's exports |
| Database query pattern | Full schema definitions |
| Test failure in other module | That module's test files |
| "breaking change" | Both sides of the contract |# Cross-Repository Capability Index
Generated: 2026-01-20T14:32:00Z
## Capabilities by Domain
### Authentication
| Capability | Location | Module | Type |
|------------|----------|--------|------|
| Login user | POST /api/auth/login | apps/api | endpoint |
| Register user | POST /api/auth/register | apps/api | endpoint |
| Refresh token | POST /api/auth/refresh | apps/api | endpoint |
| Auth context | src/contexts/AuthContext.tsx | apps/web | component |
| Auth hook | src/hooks/useAuth.ts | apps/web | hook |
| User type | src/auth.ts | shared-types | type |
| Session type | src/auth.ts | shared-types | type |
### Campaigns
| Capability | Location | Module | Type |
|------------|----------|--------|------|
| List campaigns | GET /api/campaigns | apps/api | endpoint |
| Create campaign | POST /api/campaigns | apps/api | endpoint |
| Campaign CRUD | app/routes/campaigns.py | apps/api | router |
| Campaign form | src/components/CampaignForm.tsx | apps/web | component |
| Campaign type | src/campaign.ts | shared-types | type |
| campaigns table | schema/campaigns.ts | packages/db | table |
### Analytics
| Capability | Location | Module | Type |
|------------|----------|--------|------|
| Dashboard data | GET /api/analytics/dashboard | apps/api | endpoint |
| Timeseries | GET /api/analytics/timeseries | apps/api | endpoint |
| Analytics hook | src/hooks/useAnalytics.ts | apps/web | hook |
| Chart components | src/components/charts/ | apps/web | components |
## Search Index
Before implementing new functionality, search this index:
Q: "How do I get the current user?" A: Use useAuth() hook from apps/web/src/hooks/useAuth.ts Or GET /api/users/me endpoint from apps/api
Q: "Where are campaign types defined?" A: Source of truth: packages/shared-types/src/campaign.ts Backend schema: apps/api/app/schemas/campaign.py Frontend types: apps/web/src/types/api.d.ts (generated)
Q: "How do I add a new API endpoint?" A: Pattern in apps/api/app/routes/campaigns.py Register in apps/api/app/routes/init.py Add types to packages/shared-types Regenerate frontend types
┌─────────────────────────────────────────────────────────────────┐
│ TOKEN BUDGET ALLOCATION │
├─────────────────────────────────────────────────────────────────┤
│ Total context: ~200K tokens │
│ Reserve for output: ~50K tokens │
│ Working budget: ~150K tokens │
├─────────────────────────────────────────────────────────────────┤
│ P0 (Must have): 50K │ Current module (full) │
│ P1 (Should have): 40K │ Directly related modules (summary) │
│ P2 (Nice to have): 30K │ Contracts + shared types │
│ P3 (If room): 20K │ Decisions, todos, history │
│ Buffer: 10K │ Dynamic loading during session │
└─────────────────────────────────────────────────────────────────┘When loading cross-module context, summarize:
| Content Type | Full Load Threshold | Summarization Strategy |
|---|---|---|
| OpenAPI spec | < 50 endpoints | Endpoints + key types only |
| Type files | < 30 types | Exported types only |
| Route files | < 200 lines | Signatures + docstrings |
| Config files | < 50 lines | Keys only (no values/secrets) |
| Test files | Never full | Only on explicit request |
┌─────────────────────────────────────────────────────────────────┐
│ CONTEXT LOADING HIERARCHY │
├─────────────────────────────────────────────────────────────────┤
│ Level 1: Always loaded (~5K tokens) │
│ ├── TOPOLOGY.md (workspace structure) │
│ ├── CONTRACTS.md (API summary) │
│ └── CROSS_REPO_INDEX.md (capability search) │
│ │
│ Level 2: Loaded based on current file (~15K tokens) │
│ ├── KEY_FILES.md recommendations for current context │
│ ├── Related module summaries │
│ └── Relevant type definitions │
│ │
│ Level 3: On-demand expansion (variable) │
│ ├── Full OpenAPI spec (when "check API contract") │
│ ├── Full type files (when modifying interfaces) │
│ └── Other module's full files (when cross-repo change) │
└─────────────────────────────────────────────────────────────────┘For multi-repo workspaces (separate .git directories):
~/code/
├── myapp-frontend/ # git repo
├── myapp-backend/ # git repo
├── myapp-shared/ # git repo
└── .workspace/ # workspace config (optional)
└── myapp.yamlClaude accesses via relative paths: ../myapp-backend/
# In frontend repo
mkdir -p .workspace/repos
ln -s ../../myapp-backend .workspace/repos/backend
ln -s ../../myapp-shared .workspace/repos/shared# Add related repos as submodules (read-only)
git submodule add --depth 1 ../myapp-shared .workspace/shared## Multi-Repo Access Protocol
WHEN accessing files from another repo:
1. Use relative paths from workspace root
2. Read-only access (never modify other repos)
3. Cache contract files locally in _project_specs/workspace/cache/
4. Log cross-repo reads in decisions.md
BEFORE making cross-repo changes:
1. Document the change in BOTH repos' decisions.md
2. Create linked todos in BOTH repos
3. Implement in dependency order (shared → backend → frontend)When Claude detects changes that affect other modules:
┌─────────────────────────────────────────────────────────────────┐
│ ⚠️ CROSS-REPO CHANGE DETECTED │
├─────────────────────────────────────────────────────────────────┤
│ This change affects: apps/api │
│ Specifically: Endpoint POST /api/campaigns expects new field │
│ │
│ Impact Analysis: │
│ ├── apps/web/src/lib/api/client.ts - needs update │
│ ├── packages/shared-types/src/campaign.ts - needs new field │
│ └── apps/api/app/schemas/campaign.py - source of change │
│ │
│ Recommended Order: │
│ 1. Update packages/shared-types first (source of truth) │
│ 2. Update apps/api schema │
│ 3. Regenerate frontend types │
│ 4. Update apps/web API client │
│ 5. Run /sync-contracts │
│ │
│ [Proceed with guidance] [Load full context] [Cancel] │
└─────────────────────────────────────────────────────────────────┘| Change Type | Impacts | Action |
|---|---|---|
| New API endpoint | Frontend client, types | Add to both, sync contracts |
| Modified response | Frontend types, tests | Regenerate types, update tests |
| New required field | All consumers | Breaking change protocol |
| Renamed field | All consumers | Migration + deprecation |
| New shared type | Consumers on next use | Export from shared-types |
| Schema migration | API models, queries | Run migration, verify queries |
# .contract-sources file (auto-generated)
# Files that define contracts - monitored for changes
# OpenAPI specs
apps/api/openapi.json
apps/api/docs/openapi.yaml
# Type definitions
packages/shared-types/src/index.ts
packages/shared-types/src/api.ts
# Pydantic schemas
apps/api/app/schemas/*.py
# Database schema
packages/db/schema/*.ts| Tier | Trigger | Action | Time | Blocking |
|---|---|---|---|---|
| 1 | Session start | Staleness check | ~5s | No |
| 2 | Post-commit | Auto-sync if contracts changed | ~15s | No |
| 3 | Pre-push | Validation gate | ~10s | Yes (bypassable) |
| 4 | PR opened | CI validation | ~30s | Yes |
| 5 | Weekly cron | Full re-analysis | ~2min | No |
## Contract Status (shown in CONTRACTS.md header)
Last full analysis: 2026-01-18T10:00:00Z
Last sync: 2026-01-20T14:32:00Z
Staleness: 🟢 Fresh (synced 2 hours ago)
## Confidence Levels
🟢 Fresh - Synced within 24 hours, no source changes
🟡 Stale - Sources changed since last sync
🔴 Outdated - Over 7 days since last analysis
⚠️ Drift - Validation found inconsistenciesworkspace.md calls existing-repo.md analysis for each module:
## Module Analysis Delegation
For each module in workspace:
1. Run existing-repo analysis on that module
2. Extract: tech stack, conventions, guardrails status
3. Aggregate into TOPOLOGY.md
4. Don't duplicate - reference existing-repo output## Session State Integration
Workspace context files are part of session state:
- TOPOLOGY.md → structural context (rarely changes)
- CONTRACTS.md → API context (check freshness each session)
- KEY_FILES.md → loading guidance (static reference)
On session start:
1. Load _project_specs/workspace/*.md into context
2. Check contract freshness
3. Advise if sync needed## Cross-Repo Review Checks
When reviewing code that touches contracts:
1. Check if change affects other modules
2. Verify contract consistency
3. Flag if CONTRACTS.md needs update
4. Warn about breaking changes
Add to review output:
### 🔗 Cross-Repo Impact
- [ ] This change affects: apps/web (API client)
- [ ] Contract update needed: Yes
- [ ] Breaking change: NoFull workspace analysis - run on first setup or major changes.
See commands/analyze-workspace.md for full specification.
Lightweight incremental contract update - run frequently.
See commands/sync-contracts.md for full specification.
Quick status check:
📊 Workspace Status: myapp
Type: Monorepo (Turborepo)
Modules: 4 (2 apps, 2 packages)
Contracts: 🟢 Fresh (synced 2h ago)
Token estimate: 45K / 150K budget
Quick actions:
/sync-contracts - Update contracts
/analyze-workspace - Full refresh# .github/workflows/contracts.yml
name: Contract Validation
on:
pull_request:
paths:
- 'apps/api/**'
- 'packages/shared-types/**'
- 'packages/db/schema/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check contract freshness
run: |
CHANGED=$(git diff --name-only origin/main HEAD | \
grep -E "openapi|schema|types" || true)
if [ -n "$CHANGED" ]; then
echo "Contract sources changed:"
echo "$CHANGED"
if ! git diff --name-only origin/main HEAD | grep -q "CONTRACTS.md"; then
echo "::error::Contract sources changed but CONTRACTS.md not updated"
echo "Run /sync-contracts before merging"
exit 1
fi
fi
- name: Validate consistency
run: |
if [ -f "apps/api/openapi.json" ]; then
ENDPOINTS=$(jq -r '.paths | keys | length' apps/api/openapi.json)
DOCUMENTED=$(grep -c "^| /" _project_specs/workspace/CONTRACTS.md || echo 0)
if [ "$ENDPOINTS" != "$DOCUMENTED" ]; then
echo "::warning::Endpoint count mismatch"
fi
fi#!/bin/bash
# hooks/pre-commit-contracts
WORKSPACE_DIR="_project_specs/workspace"
[ ! -f "$WORKSPACE_DIR/.contract-sources" ] && exit 0
# Check if staged files include contract sources
STAGED=$(git diff --cached --name-only)
CONTRACT_SOURCES=$(cat "$WORKSPACE_DIR/.contract-sources")
for source in $CONTRACT_SOURCES; do
if echo "$STAGED" | grep -q "$source"; then
echo "📝 Contract source staged: $source"
echo "Remember to run /sync-contracts before pushing"
fi
done# Check for workspace indicators
ls -la package.json pnpm-workspace.yaml turbo.json nx.json 2>/dev/null
# If multi-repo, check sibling directories
ls -la ../
# Manual classification
/analyze-workspace --type monorepo
/analyze-workspace --type multi-repo --repos "../backend,../shared"# Check contract sources exist
cat _project_specs/workspace/.contract-sources
# Verify file access
for f in $(cat .contract-sources); do
ls -la "$f" 2>/dev/null || echo "Missing: $f"
done
# Force full refresh
/analyze-workspace --force# Check current estimates
/workspace-status
# Reduce context loading
# Edit KEY_FILES.md to prioritize
# Or work on one module at a time# Check paths are correct
ls ../backend/ # or wherever related repo is
# Set up symlinks if needed
mkdir -p .workspace/repos
ln -s ../../backend .workspace/repos/backend
# Or configure in workspace
/analyze-workspace --repo-path backend=../myapp-backend© alinaqi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/workspace of alinaqi/maggy.
Open the folder on GitHubat commit 72a456e
Workspace next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Workspace this skillalinaqi/maggy | 707 | — | ~7.3k | Automated safety check: Pass | MIT | |
| Codebase Contexthomarr-labs/homarr | 5k | — | ~679 | Automated safety check: Pass | Apache-2.0 | |
| Dependabot Alerts Updatelivesession/xyd | 114 | — | ~2k | Automated safety check: Pass | MIT | |
| API DesignerJeffallan/claude-skills | 12k | 1 repos | ~2k | Automated safety check: Pass | MIT | |
| Designing APIsCloudAI-X/claude-workflow-v2 | 1.4k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| API Designyonatangross/orchestkit | 290 | — | ~2.9k | Automated safety check: Pass | MIT |
homarr-labs/homarr
Navigate Homarr's monorepo architecture and reuse shared packages.
livesession/xyd
Automatically fetch and fix Dependabot security alerts by querying GitHub REST API for open alerts, identifying vulnerable packages, researching secure versions, and updating package.json files…
Jeffallan/claude-skills
Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.
CloudAI-X/claude-workflow-v2
Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation.
yonatangross/orchestkit
API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.
prime-radiant-inc/greenfield
Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.
alinaqi/maggy
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
alinaqi/maggy
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
alinaqi/maggy
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
alinaqi/maggy
Android Java development with MVVM, ViewBinding, and Espresso testing
alinaqi/maggy
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
alinaqi/maggy
AI-driven testing agent that auto-discovers, generates, executes, evaluates, and fixes tests for any project type
Categories
Dynamic multi-repo and monorepo awareness for Claude Code. An agent skill from alinaqi/maggy. Workspace is an agent skill from alinaqi/maggy. Dynamic multi-repo and monorepo awareness for Claude Code.
Workspace fits situations like: tasks that involve Monorepo tooling; tasks that involve API design; tasks that involve Codebase knowledge for agents.
Run `npx skills add alinaqi/maggy --skill workspace -a claude-code`. Or copy the skill folder (skills/workspace in alinaqi/maggy) into .claude/skills/workspace in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alinaqi/maggy --skill workspace -a codex`. Or copy the skill folder (skills/workspace in alinaqi/maggy) into .agents/skills/workspace in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alinaqi/maggy --skill workspace -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/workspace, .gemini/skills/workspace, .github/skills/workspace and .opencode/skills/workspace in your project.
Going by SKILL.md and its folder, Workspace needs the command-line tools its instructions call (git and claude). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Workspace is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 7.3k tokens (SKILL.md is roughly 29k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Workspace: Codebase Context (homarr-labs/homarr, 5k stars), Dependabot Alerts Update (livesession/xyd, 114 stars), API Designer (Jeffallan/claude-skills, 12k stars) and Designing APIs (CloudAI-X/claude-workflow-v2, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alinaqi (a GitHub user) maintains it in alinaqi/maggy, which has 707 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on September 24, 2026.
Source: alinaqi/maggy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.