add-extension
Scaffold a new Shell extension with hexagonal layers and TDD
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Scaffold a new Shell extension with hexagonal layers and TDD
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Scaffold a REST API endpoint with hexagonal layers and integration tests
Scaffold a React component with Vitest tests (TDD-first)
Scaffold a new Shell extension with hexagonal layers and TDD
Add a sub-feature within an existing Shell extension
Scaffold a SQL migration with RLS policy, rollback plan, and test seed data
Scaffold a Tauri IPC command with full round-trip (Rust handler, TS types, React hook, tests)
| name | add-extension |
| description | Scaffold a new Shell extension with hexagonal layers and TDD |
| user_invocable | true |
Scaffold a new Alder Shell extension with hexagonal architecture layers and test-driven development.
Ask the user (or extract from $ARGUMENTS) for:
| Field | Required | Default | Description |
|---|---|---|---|
| name | yes | — | Extension name (kebab-case, e.g. settings) |
| scope | no | v1 | Release scope: v1 or v2 |
| description | yes | — | One-line description |
| contributions | no | — | ActivityBar icon, panels, routes, commands |
Create the hexagonal layer structure:
src/features/<name>/
├── domain/types.ts # Pure types — no React, no framework deps
├── domain/types.test.ts # Domain type tests (written FIRST)
├── application/ # Hooks, Zustand stores, orchestration
├── adapters/ # API clients, Tauri invoke wrappers
├── ui/ # React components
└── extension.tsx # Shell extension registration
Create empty directories for application/, adapters/, and ui/ with
.gitkeep files so they are tracked.
Create src/features/<name>/domain/types.test.ts:
import { describe, it, expect } from 'vitest';
// Import types once they exist — test file is written first
describe('<Name> domain types', () => {
it('should define <Name> type with required fields', () => {
// Assert the type shape — fields, optionality, constraints
});
});
The test must compile and FAIL (RED) before proceeding.
Create src/features/<name>/domain/types.ts:
pnpm test
All tests must pass before proceeding.
Create src/features/<name>/extension.tsx:
import type { Extension } from '@paulbreuler/shell';
export const <camelName>Extension: Extension = {
id: 'grove.<name>',
activate(ctx) {
// Register contributions: ActivityBar, panels, routes, commands
},
deactivate() {
// Cleanup subscriptions, stores, side effects
},
};
Follow the naming convention:
<camelName>Extension (e.g., settingsExtension)grove.<name> (e.g., grove.settings)NOTE: Extension bootstrapping is not yet implemented in App.tsx. When creating the first extension, you will need to add the extension registration mechanism. Until then, document the extension in this file and wire it when the Shell integration is built out.
Once extension bootstrapping exists in src/App.tsx:
import { <camelName>Extension } from './features/<name>/extension';pnpm check # TypeScript + ESLint — must pass
pnpm test # All tests — must pass
Before marking complete, verify:
src/features/<name>/domain/types.ts exists with pure typessrc/features/<name>/domain/types.test.ts exists and passessrc/features/<name>/extension.tsx exists with correct id and structuresrc/App.tsx bootstrap array (or documented for future wiring)--grove-* design tokens onlyapplication/, adapters/, ui/ directories exist (with .gitkeep)pnpm check passespnpm test passes--grove-* design tokens, never raw CSS valuesgrove.<name> to avoid collisionsapplication/, not domain/extension.tsx — no prior examples exist in the codebase