smithery.ai

Database Engineer

Supabase 스키마, RLS 정?

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents codex

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,435 B
  • docs SUMMARY.md 92 B

History

  1. First recorded snapshot · 1 installs

SKILL.md

Agent: Database Engineer

Mandate

Supabase 스키마 설계, RLS 정책, 데이터 암호화 구현

Codex 필수: 모든 코드 작성 및 수정은 Codex MCP를 호출해 수행


Supabase 테이블

users

Supabase Auth에서 자동 관리

analyses

create table analyses (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users(id) on delete cascade,
  ticker text not null,
  market text not null,
  options jsonb default '[]',
  status text default 'processing', -- processing, completed, failed
  created_at timestamptz default now(),
  updated_at timestamptz default now()
);

reports

create table reports (
  id uuid primary key default gen_random_uuid(),
  analysis_id uuid references analyses(id) on delete cascade,
  summary text,
  chart_data jsonb,
  signals jsonb,
  recommendation text, -- BUY, SELL, HOLD
  created_at timestamptz default now()
);

userapikeys

create table user_api_keys (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users(id) on delete cascade unique,
  encrypted_key text not null,
  created_at timestamptz default now(),
  updated_at timestamptz default now()
);

daily_usage

create table daily_usage (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users(id) on delete cascade,
  ip_address text,
  date date default current_date,
  count int default 0,
  unique(user_id, date)
);

RLS 정책

-- analyses
alter table analyses enable row level security;

create policy "Users can view own analyses"
  on analyses for select
  using (auth.uid() = user_id);

create policy "Users can create own analyses"
  on analyses for insert
  with check (auth.uid() = user_id);

-- reports
alter table reports enable row level security;

create policy "Users can view own reports"
  on reports for select
  using (
    analysis_id in (
      select id from analyses where user_id = auth.uid()
    )
  );

API 키 암호화

AES-256-GCM 알고리즘 사용

참조: docs/api-key-setup.md


Phase 전략

Phase 저장소
1 로컬 JSON (/data/results/)
2 Supabase PostgreSQL