implement-service
Creates standard Supabase service files for table operations, ensuring architectural consistency.
Install
mkdir -p .claude/skills/implement-service && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9827" && unzip -o skill.zip -d .claude/skills/implement-service && rm skill.zipInstalls to .claude/skills/implement-service
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implementa um arquivo de service Supabase seguindo o padrão do projeto. Use quando o Claude solicitar a criação de um novo service ou quando um componente estiver acessando o Supabase diretamente (violação de arquitetura).Key capabilities
- →Create Supabase service files
- →Implement CRUD operations
- →Manage real-time subscriptions
- →Admin access implementation
How it works
It implements boilerplate-free services for Supabase tables, following project conventions.
Inputs & outputs
When to use implement-service
- →Creating new database service files
- →Adding CRUD operations for new tables
- →Implementing real-time subscriptions
About this skill
Implemente o service app/src/services/$0Service.js para a tabela $0.
Regras inegociáveis
- Import APENAS:
import { supabase } from '../lib/supabaseClient'; - Todas as funções são
asynce fazemthrow errorem caso de falha - Listagens retornam
data ?? [](nuncanull) - Prefixos:
fetch(leitura),create,update,delete,subscribe(realtime),admin(acesso total)
Template de implementação
import { supabase } from '../lib/supabaseClient';
// ── Leitura pública ────────────────────────────────────────────────────────────
export async function fetch[Entidade]() {
const { data, error } = await supabase
.from('[tabela]')
.select('*')
.order('created_at', { ascending: false });
if (error) throw error;
return data ?? [];
}
// ── Realtime subscription ──────────────────────────────────────────────────────
export function subscribe[Entidade](callback) {
callback(); // carrega dados iniciais imediatamente
const channel = supabase
.channel('[tabela]-realtime')
.on('postgres_changes', { event: '*', schema: 'public', table: '[tabela]' }, callback)
.subscribe();
return () => supabase.removeChannel(channel); // cleanup obrigatório
}
// ── Escrita (usuário autenticado) ──────────────────────────────────────────────
export async function create[Entidade](payload) {
const { data, error } = await supabase
.from('[tabela]')
.insert(payload)
.select()
.single();
if (error) throw error;
return data;
}
export async function update[Entidade](id, changes) {
const { data, error } = await supabase
.from('[tabela]')
.update(changes)
.eq('id', id)
.select()
.single();
if (error) throw error;
return data;
}
export async function delete[Entidade](id) {
const { error } = await supabase
.from('[tabela]')
.delete()
.eq('id', id);
if (error) throw error;
return true;
}
// ── Admin (acesso sem filtro de RLS) ──────────────────────────────────────────
export async function adminFetch[Entidade]() {
const { data, error } = await supabase
.from('[tabela]')
.select('*, profiles(display_name)')
.order('created_at', { ascending: false });
if (error) throw error;
return data ?? [];
}
Após criar o arquivo
- Verificar se algum componente em
features/importasupabaseClientdiretamente para esta tabela - Se sim, substituir pelo service recém-criado
- Rodar build:
cd app && npm run build - Reportar resultado ao Claude
When not to use it
- →Direct Supabase access in components
- →Non-Supabase projects
Limitations
- →Strict project conventions
- →Requires Supabase client
How it compares
It prevents architectural violations by centralizing Supabase access in service files.
Compared to similar skills
implement-service side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| implement-service (this skill) | 0 | 4mo | No flags | Intermediate |
| cloudbase-document-database-web-sdk | 1 | 2mo | No flags | Intermediate |
| relational-database-web-cloudbase | 1 | 2mo | Review | Intermediate |
| convex | 0 | 6mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
cloudbase-document-database-web-sdk
TencentCloudBase
Use CloudBase document database Web SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
relational-database-web-cloudbase
TencentCloudBase
Use when building frontend Web apps that talk to CloudBase Relational Database via @cloudbase/js-sdk – provides the canonical init pattern so you can then use Supabase-style queries from the browser.
convex
waynesutton
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
supabase-hello-world
jeremylongshore
Create a minimal working Supabase example. Use when starting a new Supabase integration, testing your setup, or learning basic Supabase API patterns. Trigger with phrases like "supabase hello world", "supabase example", "supabase quick start", "simple supabase code".
dev-supabase
aibot88
Backend development with Supabase. Trigger when the user wants to configure auth, the database, or Supabase storage.
dynamic
LowyShin
|