Skip to content
Back to skills

Monorepo Guide

ASecurity

Reference for navigating the Lumen turborepo — workspace commands, where things live, cross-app imports. TRIGGER when user asks about project structure, where to put files, or how workspaces connect.

  • 11 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 20, 2026
ai-agentstypescriptgosqlnextjsnode

Works with

  • cli
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 20, 2026

npx -y skills add Sardor-M/lumen --skill monorepo-guide --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Monorepo Guide?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Monorepo Guide
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sardor-m-monorepo-guide/badge)](https://www.skillsdirectory.com/skills/sardor-m-monorepo-guide)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: monorepo-guide
description: Reference for navigating the Lumen turborepo — workspace commands, where things live, cross-app imports. TRIGGER when user asks about project structure, where to put files, or how workspaces connect.
---

# Lumen Monorepo Guide

Turborepo + pnpm workspaces. Three apps, shared root config.

## Structure

```
lumen/
├── apps/
│   ├── cli/         lumen-kb (published) / @lumen/cli (workspace alias) — CLI engine + MCP server
│   ├── web/         @lumen/web    — Next.js 15 dashboard + Better Auth
│   └── extension/   @lumen/extension — Browser extension (placeholder)
├── turbo.json       — Task pipeline (build, dev, lint, test)
├── pnpm-workspace.yaml
├── .npmrc           — node-linker=hoisted, shamefully-hoist=true
└── package.json     — Root workspace (turbo, prettier, husky)
```

## Common Commands

| What             | Command                                   |
| ---------------- | ----------------------------------------- |
| Build everything | `pnpm build`                              |
| Dev all apps     | `pnpm dev`                                |
| CLI only dev     | `pnpm --filter lumen-kb dev -- <command>` |
| Web only dev     | `pnpm --filter @lumen/web dev`            |
| Build CLI        | `pnpm --filter lumen-kb build`            |
| Lint all         | `pnpm lint`                               |
| Test CLI         | `pnpm --filter lumen-kb test`             |
| Add dep to CLI   | `pnpm --filter lumen-kb add <pkg>`        |
| Add dep to web   | `pnpm --filter @lumen/web add <pkg>`      |

## Cross-App Imports

`@lumen/web` depends on `@lumen/cli` via `"@lumen/cli": "workspace:*"`. This allows the web app to import engine functions directly:

```typescript
import { searchBm25 } from '@lumen/cli/src/search/bm25.js';
```

This is not wired up yet — currently the web app is UI-only. Phase 6 (Library) will make `@lumen/cli` properly exportable.

## Gotchas

- `node_modules` dirs are symlinks to `/tmp/lumen-*/node_modules` (iCloud workaround)
- After reboot or `pnpm install` failure, recreate symlinks — see CLAUDE.md
- `pnpm build` runs `turbo build` which builds CLI first (it's a dependency of web)
- `next build` crashes on Node 23 — use `next dev` or Node 22
- `better-sqlite3` native binary must be rebuilt after Node upgrades: `pnpm rebuild better-sqlite3`
- Global `lumen` binary is linked from `apps/cli/dist/cli.js` — re-link after moving: `cd apps/cli && npm link`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.