Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ontological-documentation

БесплатноЗапускает вложенные скриптыНе проверен

Create comprehensive ontological documentation for Grey Haven systems - extract domain concepts from TanStack Start and FastAPI codebases, model semantic…

greyhaven-aiот greyhaven-ai★ 31 звезда на GitHub15 установок в других каталогах

Об этом скилле

Grey Haven Ontological Documentation

Create comprehensive ontological documentation that captures fundamental concepts, relationships, and classification systems within Grey Haven codebases and systems.

When to Use This Skill

Use this skill when you need to:

  • Document the conceptual structure and domain model of Grey Haven applications
  • Extract and organize business concepts from TanStack Start or FastAPI codebases
  • Create visual representations of multi-tenant system architectures
  • Build semantic maps of entities, services, and their tenant-isolated interactions
  • Design or document domain models for new Grey Haven features
  • Analyze and communicate complex architectures to stakeholders
  • Create knowledge graphs for Grey Haven development teams
  • Onboard new developers to Grey Haven project structure

Core Capabilities

1. Concept Extraction from Grey Haven Codebases

TanStack Start (Frontend) Extraction:

  • Drizzle schema tables and relationships
  • React components and their hierarchies
  • TanStack Router route structure
  • Better-auth session and user models
  • Server functions and their dependencies
  • Multi-tenant data patterns (tenant_id isolation)

FastAPI (Backend) Extraction:

  • SQLModel entities and relationships
  • Repository pattern implementations
  • Service layer business logic
  • API endpoint hierarchies
  • Multi-tenant repository filters
  • Pydantic schemas and validation models

2. Grey Haven Architecture Patterns

Identify and Document:

  • Multi-Tenant Patterns: tenant_id isolation, RLS roles (admin/authenticated/anon)
  • Repository Pattern: BaseRepository with automatic tenant filtering
  • Service Layer: Business logic separation from endpoints
  • Database Conventions: snake_case fields, UUID primary keys, timestamps
  • Authentication: Better-auth integration with session management
  • Deployment: Cloudflare Workers architecture

3. Visual Documentation Formats

Mermaid Diagrams (for README files):

erDiagram
    USER ||--o{ ORGANIZATION : belongs_to
    USER {
        uuid id PK
        string email_address UK
        uuid tenant_id FK
        timestamp created_at
    }
    ORGANIZATION ||--o{ TEAM : contains
    ORGANIZATION {
        uuid id PK
        string name
        uuid tenant_id FK
        timestamp created_at
    }

System Architecture:

graph TB
    Client[TanStack Start Client]
    Server[Server Functions]
    Auth[Better-auth]
    DB[(PostgreSQL + RLS)]

    Client -->|Authenticated Requests| Server
    Client -->|Auth Flow| Auth
    Server -->|Query with tenant_id| DB
    Auth -->|Session Validation| DB

4. Domain Model Documentation Template

## Entity: User

### Definition
Represents an authenticated user in the Grey Haven system with multi-tenant isolation.

### Database Schema
- **Table**: users (snake_case)
- **Primary Key**: id (UUID)
- **Tenant Isolation**: tenant_id (UUID, indexed)
- **Unique Constraints**: email_address per tenant
- **Timestamps**: created_at, updated_at (automatic)

### Relationships
- **Belongs To**: Organization (via tenant_id)
- **Has Many**: Sessions (Better-auth)
- **Has Many**: TeamMemberships

### Business Rules
- Email must be unique within tenant
- Cannot access data from other tenants
- Session expires after 30 days of inactivity
- RLS enforces tenant_id filtering at database level

### TypeScript Type
```typescript
interface User {
  id: string;
  emailAddress: string;
  tenantId: string;
  createdAt: Date;
  updatedAt: Date;
}

Python Model

class User(SQLModel, table=True):
    __tablename__ = "users"
    id: UUID = Field(default_factory=uuid4, primary_key=True)
    email_address: str = Field(unique=True, index=True)
    tenant_id: UUID = Field(foreign_key="organizations.id", index=True)
    created_at: datetime = Field(default_factory=datetime.utcnow)
    updated_at: datetime = Field(default_factory=datetime.utcnow)

## Workflow

### Step 1: Discovery and Extraction

**For TanStack Start Projects:**
1. Analyze Drizzle schema files in `src/lib/server/schema/`
2. Map React component structure in `src/lib/components/`
3. Document TanStack Router routes in `src/routes/`
4. Extract server functions from `src/lib/server/functions/`
5. Identify tenant isolation patterns

**For FastAPI Projects:**
1. Analyze SQLModel models in `app/db/models/`
2. Map repository pattern in `app/db/repositories/`
3. Document service layer in `app/services/`
4. Extract API routes from `app/routers/`
5. Identify BaseRepository tenant filtering

### Step 2: Ontology Construction

**Categorize by Grey Haven Patterns:**

1. **Core Entities** (tables with tenant_id)
   - User, Organization, Team, etc.
   - Always include tenant_id
   - UUID primary keys
   - snake_case field names

2. **Service Boundaries**
   - Repository layer (data access)
   - Service layer (business logic)
   - Router layer (API endpoints)
   - Clear separation of concerns
Полный SKILL.md на GitHub

Установить ontological-documentation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Grep
Glob
TodoWrite

Вложенные файлы

README.mdchecklists/ontology-documentation-checklist.mdexamples/INDEX.mdexamples/ecommerce-ontology.mdreference/INDEX.mdreference/README.mdreference/concept_extraction_guide.mdreference/documentation_templates.mdreference/ontology_patterns.mdscripts/README.mdscripts/extract_concepts.pyscripts/generate_ontology_diagram.pytemplates/assets-README.mdtemplates/domain-ontology.md

FAQ

Что делает скилл ontological-documentation?

Create comprehensive ontological documentation for Grey Haven systems - extract domain concepts from TanStack Start and FastAPI codebases, model semantic relationships, generate visual representations of system architecture, and document business domains. Use when onboarding, documenting architecture, or analyzing legacy systems.

Как установить скилл ontological-documentation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ontological-documentation запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ontological-documentation с