スキル一覧に戻る
monam2

database-engineer

by monam2

0🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: Database Engineer description: Supabase 스키마, RLS 정책, 마이그레이션 관리 가이드

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()
);

user_api_keys

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/)
2Supabase PostgreSQL

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です