skills/acurioustractor/codebase-explorer/SKILL.md
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.
npx skillsauth add aiskillstore/marketplace codebase-explorerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Explore and document the Empathy Ledger codebase architecture, data flows, and system relationships.
When this skill is invoked, help the user understand:
| 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 |
| 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) |
| 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 |
| 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 |
User Action (React Component)
↓
fetch('/api/endpoint')
↓
API Route (src/app/api/*)
↓
Service Layer (src/lib/services/*)
↓
Supabase Client (RLS enforced)
↓
PostgreSQL (supabase/migrations/*)
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)
# 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/
When exploring, provide:
Invoke when:
For comprehensive documentation with full code examples, see:
Trigger: User asks about codebase structure, data flow, or "how does X connect to Y"
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.