pocketbase-api-and-sdk

📁 anirudh-777/pocketbase-skills 📅 Today
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/anirudh-777/pocketbase-skills --skill pocketbase-api-and-sdk

Agent 安装分布

kilo 1
amp 1
cline 1
pi 1
opencode 1
cursor 1

Skill 文档

PocketBase API and SDK

Overview

Use this skill for reliable integration patterns with PocketBase REST and SDK APIs.

When to Use

  • CRUD endpoints and SDK method usage
  • Filter/sort/paginate/expand query construction
  • Batch workflows and idempotent write behavior
  • Error handling and retry strategy in app integration

Workflow

  1. Choose execution context:
  • Browser client
  • Server-side app/service
  • Background worker
  • Stack profile: Next.js App Router, Node/Express, or React Native/Expo
  1. Define data contract:
  • Request fields and validation expectations
  • Response projection and relation expansion requirements
  1. Implement read patterns:
  • Use pagination by default
  • Use filter expressions intentionally
  • Expand only required relations
  1. Implement write patterns:
  • Validate input before write
  • Use deterministic retry for transient failures
  • Prevent duplicate writes via business keys where needed
  1. Error handling:
  • Classify auth errors, validation errors, and transient/network errors
  • Return structured errors to caller
  1. Performance checks:
  • Minimize over-expansion
  • Avoid unbounded list pulls in production paths
  1. Handoff:
  • If schema pressure emerges -> pocketbase-data-modeling
  • If permissions fail or leak -> pocketbase-auth-and-access
  • If operational incidents appear -> pocketbase-operations

References

Common Mistakes

  • Loading entire collections without pagination
  • Expanding deep relations in latency-sensitive endpoints
  • Treating all API errors as retryable