codebase-explorer
Empathy Ledgerのコード構造やデータの流れ、データベースの構成要素、各サービス間の連携などを把握し、システム全体の理解を深める際に役立つ探索と理解を支援するSkill。
📜 元の英語説明(参考)
Explore and understand the Empathy Ledger codebase architecture, data flows, database schema, services, and how components connect. Use when you need to understand where things are, how data flows, or how different parts of the system relate to each other.
🇯🇵 日本人クリエイター向け解説
Empathy Ledgerのコード構造やデータの流れ、データベースの構成要素、各サービス間の連携などを把握し、システム全体の理解を深める際に役立つ探索と理解を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o codebase-explorer.zip https://jpskill.com/download/16988.zip && unzip -o codebase-explorer.zip && rm codebase-explorer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16988.zip -OutFile "$d\codebase-explorer.zip"; Expand-Archive "$d\codebase-explorer.zip" -DestinationPath $d -Force; ri "$d\codebase-explorer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
codebase-explorer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
codebase-explorerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Codebase Explorer Skill
Empathy Ledger のコードベースのアーキテクチャ、データフロー、およびシステムの関係を調査し、ドキュメント化します。
Instructions
このスキルが呼び出されたとき、ユーザーが以下を理解するのを助けてください。
- Database Schema - テーブル、リレーションシップ、マイグレーション
- Data Flow - Supabase → Services → API Routes → Components
- Service Layer - ビジネスロジックのパターン
- API Routes - エンドポイントとその目的
- Type Definitions - 各ドメインの型がどこにあるか
- Multi-Tenant Architecture - テナント分離がどのように機能するか
Quick Reference Files
Database & Types
| Domain | Types File | Key Tables |
|---|---|---|
| Users/Profiles | src/types/database/user-profile.ts |
profiles, profile_settings |
| Organizations | src/types/database/organization-tenant.ts |
organisations, organization_members, tenants |
| Projects | src/types/database/project-management.ts |
projects, project_participants |
| Stories/Content | src/types/database/content-media.ts |
stories, transcripts, media_assets |
| Distribution | src/types/database/story-ownership.ts |
story_distributions, consent_proofs |
| Cultural Safety | src/types/database/cultural-sensitivity.ts |
cultural_safety_moderation |
| Locations | src/types/database/location-events.ts |
locations, events |
| Analysis | src/types/database/analysis-support.ts |
transcript_analysis, themes, quotes |
Supabase Clients
| Client | File | Usage |
|---|---|---|
| Browser | src/lib/supabase/client.ts |
React components |
| Server SSR | src/lib/supabase/client-ssr.ts |
API routes, server components |
| Service Role | src/lib/supabase/service-role-client.ts |
Admin operations (bypasses RLS) |
Core Services (src/lib/services/)
| Service | Purpose |
|---|---|
| consent.service.ts | GDPR consent proof system |
| distribution.service.ts | Story distribution with policy enforcement |
| revocation.service.ts | Revoke distributed content |
| embed.service.ts | Embedded story tokens |
| organization.service.ts | Org management and metrics |
| audit.service.ts | Compliance logging |
| gdpr.service.ts | Data privacy operations |
| webhook.service.ts | Event distribution to partners |
API Routes (src/app/api/)
| Route | Purpose |
|---|---|
| /api/stories | Story CRUD |
| /api/stories/[id]/consent | Consent management |
| /api/stories/[id]/distributions | Distribution tracking |
| /api/stories/[id]/revoke | Revocation |
| /api/storytellers | Storyteller profiles |
| /api/projects | Project management |
| /api/projects/[id]/transcripts | Transcript access |
| /api/embed/stories/[id] | Embedded content |
| /api/admin/* | Admin operations |
Data Flow Pattern
User Action (React Component)
↓
fetch('/api/endpoint')
↓
API Route (src/app/api/*)
↓
Service Layer (src/lib/services/*)
↓
Supabase Client (RLS enforced)
↓
PostgreSQL (supabase/migrations/*)
Multi-Tenant Isolation
すべてのクエリはテナントでフィルタリングされます。
// In API route
const profile = await supabase.from('profiles').select('tenant_id').eq('id', user.id).single()
query = query.eq('tenant_id', profile.tenant_id)
Role Hierarchy (highest → lowest)
- elder (100) - Cultural authority
- cultural_keeper (90) - Knowledge preservation
- admin (70) - System management
- project_leader (60) - Project management
- storyteller (50) - Content creation
- community_member (40) - Participant
- guest (10) - Read-only
Common Exploration Commands
# Find all services
ls src/lib/services/
# Find API routes for a feature
ls src/app/api/stories/
# Check database types
cat src/types/database/index.ts
# View latest migration
ls -la supabase/migrations/ | tail -5
# Find where a table is used
grep -r "from('stories')" src/
# Find component for a feature
ls src/components/stories/
Output Format
調査するときは、以下を提供してください。
- クリック可能なリンク付きのファイル場所
- テーブル/サービス間のキーとなる関係
- パターンを示すコードスニペット
- ASCII または markdown テーブルを使用した図
When to Use This Skill
以下の場合に呼び出します。
- 「X はどこにありますか?」と尋ねられた場合
- 「X は Y とどのように接続されていますか?」と尋ねられた場合
- データ関係を理解する必要がある場合
- 適切なサービスまたは API ルートを探している場合
- データベーススキーマを理解する場合
- コンポーネントまたは型定義を見つける場合
Reference Documentation
完全なコード例を含む包括的なドキュメントについては、以下を参照してください。
- ARCHITECTURE_REFERENCE.md - 完全なシステムドキュメント
Trigger: ユーザーがコードベースの構造、データフロー、または「X は Y とどのように接続されていますか」について質問した場合
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Codebase Explorer Skill
Explore and document the Empathy Ledger codebase architecture, data flows, and system relationships.
Instructions
When this skill is invoked, help the user understand:
- Database Schema - Tables, relationships, migrations
- Data Flow - Supabase → Services → API Routes → Components
- Service Layer - Business logic patterns
- API Routes - Endpoints and their purposes
- Type Definitions - Where to find types for each domain
- Multi-Tenant Architecture - How tenant isolation works
Quick Reference Files
Database & Types
| Domain | Types File | Key Tables |
|---|---|---|
| Users/Profiles | src/types/database/user-profile.ts |
profiles, profile_settings |
| Organizations | src/types/database/organization-tenant.ts |
organisations, organization_members, tenants |
| Projects | src/types/database/project-management.ts |
projects, project_participants |
| Stories/Content | src/types/database/content-media.ts |
stories, transcripts, media_assets |
| Distribution | src/types/database/story-ownership.ts |
story_distributions, consent_proofs |
| Cultural Safety | src/types/database/cultural-sensitivity.ts |
cultural_safety_moderation |
| Locations | src/types/database/location-events.ts |
locations, events |
| Analysis | src/types/database/analysis-support.ts |
transcript_analysis, themes, quotes |
Supabase Clients
| Client | File | Usage |
|---|---|---|
| Browser | src/lib/supabase/client.ts |
React components |
| Server SSR | src/lib/supabase/client-ssr.ts |
API routes, server components |
| Service Role | src/lib/supabase/service-role-client.ts |
Admin operations (bypasses RLS) |
Core Services (src/lib/services/)
| Service | Purpose |
|---|---|
| consent.service.ts | GDPR consent proof system |
| distribution.service.ts | Story distribution with policy enforcement |
| revocation.service.ts | Revoke distributed content |
| embed.service.ts | Embedded story tokens |
| organization.service.ts | Org management and metrics |
| audit.service.ts | Compliance logging |
| gdpr.service.ts | Data privacy operations |
| webhook.service.ts | Event distribution to partners |
API Routes (src/app/api/)
| Route | Purpose |
|---|---|
| /api/stories | Story CRUD |
| /api/stories/[id]/consent | Consent management |
| /api/stories/[id]/distributions | Distribution tracking |
| /api/stories/[id]/revoke | Revocation |
| /api/storytellers | Storyteller profiles |
| /api/projects | Project management |
| /api/projects/[id]/transcripts | Transcript access |
| /api/embed/stories/[id] | Embedded content |
| /api/admin/* | Admin operations |
Data Flow Pattern
User Action (React Component)
↓
fetch('/api/endpoint')
↓
API Route (src/app/api/*)
↓
Service Layer (src/lib/services/*)
↓
Supabase Client (RLS enforced)
↓
PostgreSQL (supabase/migrations/*)
Multi-Tenant Isolation
Every query filters by tenant:
// In API route
const profile = await supabase.from('profiles').select('tenant_id').eq('id', user.id).single()
query = query.eq('tenant_id', profile.tenant_id)
Role Hierarchy (highest → lowest)
- elder (100) - Cultural authority
- cultural_keeper (90) - Knowledge preservation
- admin (70) - System management
- project_leader (60) - Project management
- storyteller (50) - Content creation
- community_member (40) - Participant
- guest (10) - Read-only
Common Exploration Commands
# Find all services
ls src/lib/services/
# Find API routes for a feature
ls src/app/api/stories/
# Check database types
cat src/types/database/index.ts
# View latest migration
ls -la supabase/migrations/ | tail -5
# Find where a table is used
grep -r "from('stories')" src/
# Find component for a feature
ls src/components/stories/
Output Format
When exploring, provide:
- File locations with clickable links
- Key relationships between tables/services
- Code snippets showing patterns
- Diagrams using ASCII or markdown tables
When to Use This Skill
Invoke when:
- Asking "where is X located?"
- Asking "how does X connect to Y?"
- Needing to understand data relationships
- Looking for the right service or API route
- Understanding the database schema
- Finding component or type definitions
Reference Documentation
For comprehensive documentation with full code examples, see:
- ARCHITECTURE_REFERENCE.md - Complete system documentation
Trigger: User asks about codebase structure, data flow, or "how does X connect to Y"