Not in the top 1,000 by GitHub stars

greendesertsnow/pocketbase-skills

Agent Skills for PocketBase development — 64 best-practice rules across 9 categories, current as of PocketBase v0.40 and JS SDK v0.28. Works with Claude Code, Cursor, Copilot and other Agent Skills-compatible tools.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

skills/pocketbase-best-practices/SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Network or broad shell → After Network or broad shell

6565fa03a835 → 6565fa03a835

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Network or broad shell

First observation → 6565fa03a835

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 6565fa03a8356bfc3127b1e7d086787a19e71813

git clone --filter=blob:none --no-checkout https://github.com/greendesertsnow/pocketbase-skills.git .hotskills/greendesertsnow-pocketbase-skills && git -C .hotskills/greendesertsnow-pocketbase-skills checkout --detach 6565fa03a8356bfc3127b1e7d086787a19e71813 # Copy each selected skill directory from .hotskills/greendesertsnow-pocketbase-skills into .claude/skills/<skill-name>/
git clone --filter=blob:none --no-checkout https://github.com/greendesertsnow/pocketbase-skills.git .hotskills/greendesertsnow-pocketbase-skills && git -C .hotskills/greendesertsnow-pocketbase-skills checkout --detach 6565fa03a8356bfc3127b1e7d086787a19e71813 # Copy each selected skill directory from .hotskills/greendesertsnow-pocketbase-skills into .agents/skills/<skill-name>/
14GitHub stars
0stars in 7 days
1skill in this repository
0commits in 30 days

Heat

0.3
  • Star growth, last 7 daysNot available
  • Star growth, last 24 hoursNot available
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysNot available
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekNot available

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Oct 25, 2026Oct 28, 202614

30-day change not yet available: not enough history.

Individual skills in this repository

How it works

pocketbase-best-practices

When your agent uses it

PocketBase development best practices covering collection design, API rules, authentication, SDK usage, query optimization, realtime subscriptions, file handling, deployment, and server-side extending (Go + JSVM). Current as of PocketBase v0.40 and JS SDK v0.28. Use when building PocketBase backends, designing schemas, implementing access control, setting up auth flows, or optimizing performance.

What it loads into context

Frontmatter

171 tokens

Always available to the agent

SKILL.md

2,669 tokens

When the skill is activated

Reference documents

127,403 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. How rules are prioritized
  2. What's covered
  3. Quick Reference
  4. Example Prompts
  5. Detailed Rules

Files

  • AGENTS.mddoc6,547 bytes
  • SKILL.mdcore10,967 bytes
  • metadata.jsonasset1,539 bytes
  • references/api-rules-security.mddoc17,320 bytes
  • references/authentication.mddoc21,850 bytes
  • references/collection-design.mddoc15,111 bytes
  • references/file-handling.mddoc15,197 bytes
  • references/production-deployment.mddoc31,621 bytes
  • references/query-performance.mddoc28,514 bytes
  • references/realtime.mddoc19,876 bytes
  • references/sdk-usage.mddoc29,182 bytes
  • references/server-side-extending.mddoc77,020 bytes
  • rules/_sections.mddoc1,894 bytes
  • rules/_template.mddoc855 bytes
  • rules/auth-impersonation.mddoc3,779 bytes
  • rules/auth-mfa.mddoc3,635 bytes
  • rules/auth-oauth2.mddoc4,999 bytes
  • rules/auth-otp.mddoc3,601 bytes
  • rules/auth-password.mddoc2,841 bytes
  • rules/auth-token-management.mddoc3,558 bytes
  • rules/coll-auth-vs-base.mddoc2,153 bytes
  • rules/coll-field-types.mddoc2,703 bytes
  • rules/coll-geopoint.mddoc3,380 bytes
  • rules/coll-indexes.mddoc2,351 bytes
  • rules/coll-relations.mddoc2,950 bytes
  • rules/coll-view-collections.mddoc2,115 bytes
  • rules/deploy-backup.mddoc4,276 bytes
  • rules/deploy-configuration.mddoc4,917 bytes
  • rules/deploy-rate-limiting.mddoc5,160 bytes
  • rules/deploy-reverse-proxy.mddoc5,740 bytes
  • rules/deploy-scaling.mddoc3,845 bytes
  • rules/deploy-sqlite-considerations.mddoc6,464 bytes
  • rules/deploy-superuser-ips.mddoc1,869 bytes
  • rules/ext-compose-request-flow.mddoc9,919 bytes
  • rules/ext-cron-jobs.mddoc4,464 bytes
  • rules/ext-filesystem.mddoc4,327 bytes
  • rules/ext-filter-binding-server.mddoc3,219 bytes
  • rules/ext-go-custom-sqlite.mddoc4,601 bytes
  • rules/ext-go-migrations.mddoc4,326 bytes
  • rules/ext-go-setup.mddoc3,659 bytes
  • rules/ext-hooks-chain.mddoc3,441 bytes
  • rules/ext-hooks-record-vs-request.mddoc3,088 bytes
  • rules/ext-js-migrations.mddoc4,803 bytes
  • rules/ext-js-setup.mddoc2,581 bytes
  • rules/ext-jsvm-modules.mddoc4,057 bytes
  • rules/ext-jsvm-scope.mddoc2,810 bytes
  • rules/ext-mailer.mddoc5,226 bytes
  • rules/ext-routing-custom.mddoc3,912 bytes
  • rules/ext-settings.mddoc4,398 bytes
  • rules/ext-testing.mddoc7,251 bytes
  • rules/ext-transactions.mddoc3,287 bytes
  • rules/file-serving.mddoc5,886 bytes
  • rules/file-upload.mddoc4,313 bytes
  • rules/file-validation.mddoc5,149 bytes
  • rules/query-back-relations.mddoc4,761 bytes
  • rules/query-batch-operations.mddoc5,030 bytes
  • rules/query-expand.mddoc3,977 bytes
  • rules/query-field-selection.mddoc3,585 bytes
  • rules/query-first-item.mddoc4,287 bytes
  • rules/query-n-plus-one.mddoc4,057 bytes
  • rules/query-pagination.mddoc3,419 bytes
  • rules/realtime-auth.mddoc4,679 bytes
  • rules/realtime-events.mddoc4,683 bytes
  • rules/realtime-reconnection.mddoc5,446 bytes
  • rules/realtime-subscribe.mddoc5,374 bytes
  • rules/rules-basics.mddoc2,708 bytes
  • rules/rules-cross-collection.mddoc2,682 bytes
  • rules/rules-filter-syntax.mddoc3,264 bytes
  • rules/rules-locked-vs-open.mddoc3,160 bytes
  • rules/rules-request-context.mddoc3,187 bytes
  • rules/rules-strftime.mddoc2,837 bytes
  • rules/sdk-auth-store.mddoc3,851 bytes
  • rules/sdk-auto-cancellation.mddoc4,361 bytes
  • rules/sdk-error-handling.mddoc4,721 bytes
  • rules/sdk-field-modifiers.mddoc3,836 bytes
  • rules/sdk-filter-binding.mddoc4,551 bytes
  • rules/sdk-initialization.mddoc4,111 bytes
  • rules/sdk-send-hooks.mddoc4,372 bytes
Read SKILL.md

# PocketBase Best Practices

PocketBase is a single-binary backend (SQLite + REST + realtime + auth) that is easy to start with and easy to misuse at scale. This skill gives AI agents the guardrails: **64 rules across 9 categories**, each with an incorrect vs. correct code example, covering the mistakes agents actually make — insecure API rules, unindexed queries, broken auth flows, N+1 expands, leaked server-side handles.

**Updated for PocketBase v0.40 and JS SDK v0.28 (August 2026).** Works with v0.36+.

## How rules are prioritized

Every rule carries an impact level: **Critical** = security holes or broken data models, **High** = performance and correctness problems, **Medium/Low** = operational polish. When rules conflict, higher impact wins.

## What's covered

| Category | Impact | What it protects you from |
|----------|--------|---------------------------|
View the complete source on GitHub

Skills included

  • pocketbase-best-practices

Repository facts

License
MIT
Created
Jan 25, 2026
Last pushed
Aug 23, 2026
Forks
0
Open issues
0
Project activity
Slowing

Before you install

Network or broad shell

Automated signals, not a guarantee

Checked Nov 6, 2026

Show all 404 signals by file

skills/pocketbase-best-practices/AGENTS.md

  • Network accessline 120
    - 9.16 Read Settings via app.Settings(), Encrypt at Rest with PB_ENCRYPTION - 9.17 Test Hooks and Routes with tests.NewTestApp and ApiScenario instead of Curl - 9.18 Use RunInTransaction with the Scoped txApp, Never the Outer App
  • Network accessline 128
    - https://pocketbase.io/docs/
  • Network accessline 129
    - https://github.com/pocketbase/pocketbase
  • Network accessline 130
    - https://github.com/pocketbase/js-sdk
  • Network accessline 131
    - https://pocketbase.io/docs/api-records/
  • Network accessline 132
    - https://pocketbase.io/docs/api-rules-and-filters/
  • Network accessline 133
    - https://pocketbase.io/docs/go-overview/
  • Network accessline 134
    - https://pocketbase.io/docs/js-overview/
  • Network accessline 135
    - https://pocketbase.io/docs/go-migrations/
  • Network accessline 136
    - https://pocketbase.io/docs/go-jobs-scheduling/
  • Network accessline 137
    - https://pocketbase.io/docs/js-jobs-scheduling/
  • Network accessline 138
    - https://pocketbase.io/docs/going-to-production/
  • Network accessline 139
    - https://pocketbase.io/docs/going-to-production/#limit-superusers-to-specific-ipssubnets

skills/pocketbase-best-practices/SKILL.md

  • Network accessline 7
    author: community   version: "1.4.0"   repository: https://github.com/greendesertsnow/pocketbase-skills
  • Network accessline 8
    version: "1.4.0"   repository: https://github.com/greendesertsnow/pocketbase-skills   documentation: https://pocketbase.io/docs/
  • Network accessline 9
    repository: https://github.com/greendesertsnow/pocketbase-skills
  • Network accessline 10
    documentation: https://pocketbase.io/docs/

skills/pocketbase-best-practices/metadata.json

  • Network accessline 5
    "abstract": "Comprehensive PocketBase development best practices and performance optimization guide. Contains 64 rules across 9 categories, prioritized by impact from critical (collection design, API rules, authentication) to incremental (p
  • Network accessline 6
    "references": [ 		"https://pocketbase.io/docs/", 		"https://github.com/pocketbase/pocketbase",
  • Network accessline 7
    "https://pocketbase.io/docs/",
  • Network accessline 8
    "https://github.com/pocketbase/pocketbase",
  • Network accessline 9
    "https://github.com/pocketbase/js-sdk",
  • Network accessline 10
    "https://pocketbase.io/docs/api-records/",
  • Network accessline 11
    "https://pocketbase.io/docs/api-rules-and-filters/",
  • Network accessline 12
    "https://pocketbase.io/docs/go-overview/",
  • Network accessline 13
    "https://pocketbase.io/docs/js-overview/",
  • Network accessline 14
    "https://pocketbase.io/docs/go-migrations/",
  • Network accessline 15
    "https://pocketbase.io/docs/go-jobs-scheduling/",
  • Network accessline 16
    "https://pocketbase.io/docs/js-jobs-scheduling/",
  • Network accessline 17
    "https://pocketbase.io/docs/going-to-production/",
  • Network accessline 18
    "https://pocketbase.io/docs/going-to-production/#limit-superusers-to-specific-ipssubnets"

skills/pocketbase-best-practices/references/api-rules-security.md

  • Network accessline 88
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/)
  • Network accessline 159
    Reference: [PocketBase Collection Reference](https://pocketbase.io/docs/api-rules-and-filters/#collection-fields)
  • Network accessline 248
    Reference: [PocketBase Filters](https://pocketbase.io/docs/api-rules-and-filters/#filters-syntax)
  • Network accessline 335
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/)
  • Network accessline 419
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/#available-fields)
  • Network accessline 425
    PocketBase v0.36 added the `strftime()` function to the filter expression grammar. It maps directly to SQLite's [strftime](https://sqlite.org/lang_datefunc.html) and is the correct way to bucket, compare, or extract parts of a datetime fiel
  • Network accessline 488
    Reference: [Filter Syntax - Functions](https://pocketbase.io/docs/api-rules-and-filters/#filters) · [v0.36.0 release](https://github.com/pocketbase/pocketbase/releases/tag/v0.36.0)

skills/pocketbase-best-practices/references/authentication.md

  • Network accessline 79
    // Using API key token in another service async function useApiKey(apiToken) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 81
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 124
    Reference: [PocketBase Impersonation](https://pocketbase.io/docs/authentication/#impersonate-authentication)
  • Network accessline 148
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 255
    Reference: [PocketBase MFA](https://pocketbase.io/docs/authentication/#mfa)
  • Network accessline 267
    async function loginWithGoogle() {   // Redirect user to Google manually   window.location.href = 'https://accounts.google.com/oauth/authorize?...';
  • Network accessline 268
    // Redirect user to Google manually   window.location.href = 'https://accounts.google.com/oauth/authorize?...'; }
  • Network accessline 269
    window.location.href = 'https://accounts.google.com/oauth/authorize?...';
  • Network accessline 273
    async function handleCallback(code) {   // Exchange code manually - error prone!   const response = await fetch('/api/auth/callback', {
  • Network accessline 274
    // Exchange code manually - error prone!   const response = await fetch('/api/auth/callback', {     method: 'POST',
  • Network accessline 275
    const response = await fetch('/api/auth/callback', {
  • Network accessline 287
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Access to secretsline 383
    [Credential-related source omitted]
  • Network accessline 398
    Reference: [PocketBase OAuth2](https://pocketbase.io/docs/authentication/#oauth2-authentication)
  • Network accessline 462
    Reference: [Auth with OTP](https://pocketbase.io/docs/authentication/#auth-with-otp) · [JS SDK - authWithOTP](https://github.com/pocketbase/js-sdk#authwithotp)
  • Network accessline 494
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 562
    Reference: [PocketBase Auth](https://pocketbase.io/docs/authentication/)
  • Network accessline 580
    // Bad: manually managing tokens let authToken = localStorage.getItem('token'); fetch('/api/posts', {
  • Network accessline 581
    [Credential-related source omitted]
  • Network accessline 582
    fetch('/api/posts', {
  • Network accessline 592
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 657
    // Server-side: create fresh client per request export async function handleRequest(request) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 659
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 700
    Reference: [PocketBase Auth Store](https://pocketbase.io/docs/authentication/)

skills/pocketbase-best-practices/references/collection-design.md

  • Network accessline 70
    Reference: [PocketBase Auth Collections](https://pocketbase.io/docs/collections/#auth-collection)
  • Network accessline 135
    Reference: [PocketBase Collections](https://pocketbase.io/docs/collections/)
  • Network accessline 253
    Reference: [PocketBase GeoPoint](https://pocketbase.io/docs/collections/#geopoint)
  • Network accessline 323
    Reference: [SQLite Query Planning](https://www.sqlite.org/queryplanner.html)
  • Network accessline 417
    Reference: [PocketBase Relations](https://pocketbase.io/docs/collections/#relation)
  • Network accessline 481
    Reference: [PocketBase View Collections](https://pocketbase.io/docs/collections/#view-collection)

skills/pocketbase-best-practices/references/file-handling.md

  • Network accessline 18
    // Hardcoded URL construction - brittle const imageUrl = `http://localhost:8090/api/files/${record.collectionId}/${record.id}/${record.image}`;
  • Network accessline 19
    const imageUrl = `http://localhost:8090/api/files/${record.collectionId}/${record.id}/${record.image}`;
  • Network accessline 32
    // Basic file URL const imageUrl = pb.files.getURL(record, record.image); // Returns: http://host/api/files/COLLECTION/RECORD_ID/filename.jpg
  • Network accessline 34
    // Returns: http://host/api/files/COLLECTION/RECORD_ID/filename.jpg
  • Network accessline 162
    const sizes = ['100x100', '300x200', '800x600'];   await Promise.all(sizes.map(size =>     fetch(pb.files.getURL(updated, updated.image, { thumb: size }))
  • Network accessline 163
    await Promise.all(sizes.map(size =>     fetch(pb.files.getURL(updated, updated.image, { thumb: size }))   ));
  • Network accessline 164
    fetch(pb.files.getURL(updated, updated.image, { thumb: size }))
  • Network accessline 176
    // Default: All file requests proxy through PocketBase const url = pb.files.getURL(record, record.image); // -> https://myapp.com/api/files/COLLECTION/ID/filename.jpg (proxied)
  • Network accessline 178
    // -> https://myapp.com/api/files/COLLECTION/ID/filename.jpg (proxied)
  • Network accessline 180
    // For public files with S3 + CDN, construct CDN URL directly: const cdnBase = 'https://cdn.myapp.com';  // Your S3 CDN domain
  • Network accessline 181
    const cdnBase = 'https://cdn.myapp.com';  // Your S3 CDN domain
  • Network accessline 189
    Reference: [PocketBase Files](https://pocketbase.io/docs/files-handling/)
  • Network accessline 355
    Reference: [PocketBase File Upload](https://pocketbase.io/docs/files-handling/)
  • Network accessline 538
    Reference: [PocketBase Files Configuration](https://pocketbase.io/docs/files-handling/)

skills/pocketbase-best-practices/references/production-deployment.md

  • Network accessline 34
    // 1. Using PocketBase Admin API for backups const adminPb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 35
    const adminPb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 91
    POCKETBASE_URL="http://127.0.0.1:8090"
  • Network accessline 100
    # Create backup via API curl -X POST "${POCKETBASE_URL}/api/backups" \
  • Network accessline 101
    curl -X POST "${POCKETBASE_URL}/api/backups" \
  • Network accessline 102
    [Credential-related source omitted]
  • Dangerous shell operationline 107
    find "${BACKUP_DIR}" -name "*.zip" -mtime +${KEEP_DAYS} -delete
  • Access to secretsline 124
    [Credential-related source omitted]
  • Access to secretsline 125
    [Credential-related source omitted]
  • Network accessline 148
    Reference: [PocketBase Backups](https://pocketbase.io/docs/going-to-production/#backups)
  • Network accessline 165
    # Wrong origin for CORS # Leaving http://localhost:8090 as allowed origin
  • Network accessline 166
    # Leaving http://localhost:8090 as allowed origin
  • Network accessline 173
    ./pocketbase serve \   --http="0.0.0.0:8090" \   --origins="https://myapp.com,https://www.myapp.com" \
  • Network accessline 174
    --http="0.0.0.0:8090" \   --origins="https://myapp.com,https://www.myapp.com" \   --encryptionEnv="PB_ENCRYPTION_KEY"
  • Network accessline 175
    --origins="https://myapp.com,https://www.myapp.com" \
  • Access to secretsline 179
    [Credential-related source omitted]
  • Network accessline 201
    meta: {     appName: 'My App',     appURL: 'https://myapp.com',
  • Network accessline 202
    appName: 'My App',     appURL: 'https://myapp.com',     senderName: 'My App',
  • Network accessline 203
    appURL: 'https://myapp.com',
  • Access to secretsline 223
    [Credential-related source omitted]
  • Access to secretsline 224
    [Credential-related source omitted]
  • Access to secretsline 252
    [Credential-related source omitted]
  • Access to secretsline 268
    [Credential-related source omitted]
  • Access to secretsline 269
    [Credential-related source omitted]
  • Access to secretsline 287
    [Credential-related source omitted]
  • Access to secretsline 294
    [Credential-related source omitted]
  • Access to secretsline 295
    [Credential-related source omitted]
  • Access to secretsline 297
    [Credential-related source omitted]
  • Access to secretsline 298
    [Credential-related source omitted]
  • Network accessline 320
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)
  • Network accessline 386
    location /api/ {             limit_req zone=api burst=20 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 387
    limit_req zone=api burst=20 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 388
    proxy_pass http://pocketbase;
  • Network accessline 392
    location /api/collections/users/auth {             limit_req zone=auth burst=5 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 393
    limit_req zone=auth burst=5 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 394
    proxy_pass http://pocketbase;
  • Network accessline 398
    location /api/collections/_superusers/auth {             limit_req zone=auth burst=3 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 399
    limit_req zone=auth burst=3 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 400
    proxy_pass http://pocketbase;
  • Network accessline 492
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)
  • Network accessline 567
    listen 80;     server_name myapp.com;     return 301 https://$server_name$request_uri;
  • Network accessline 568
    server_name myapp.com;     return 301 https://$server_name$request_uri; }
  • Network accessline 569
    return 301 https://$server_name$request_uri;
  • Network accessline 592
    location / {         proxy_pass http://pocketbase;
  • Network accessline 593
    proxy_pass http://pocketbase;
  • Network accessline 617
    proxy_pass http://pocketbase;
  • Network accessline 627
    # Static file caching     location /api/files/ {         proxy_pass http://pocketbase;
  • Network accessline 628
    location /api/files/ {         proxy_pass http://pocketbase;         proxy_cache_valid 200 1d;
  • Network accessline 629
    proxy_pass http://pocketbase;
  • Network accessline 650
    # NOTE: This is a third-party community image, not officially maintained by PocketBase.     # For production, consider building your own image from the official PocketBase binary.     # See: https://pocketbase.io/docs/going-to-production/
  • Network accessline 651
    # For production, consider building your own image from the official PocketBase binary.     # See: https://pocketbase.io/docs/going-to-production/     image: ghcr.io/muchobien/pocketbase:latest
  • Network accessline 652
    # See: https://pocketbase.io/docs/going-to-production/
  • Access to secretsline 658
    [Credential-related source omitted]
  • Network accessline 688
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)
  • Access to secretsline 734
    [Credential-related source omitted]
  • Network accessline 747
    ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
  • Access to secretsline 771
    [Credential-related source omitted]
  • Network accessline 788
    Reference: [Going to production](https://pocketbase.io/docs/going-to-production/)
  • Network accessline 986
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)
  • Network accessline 1018
    Reference: [Going to production - Limit superusers to specific IPs/subnets](https://pocketbase.io/docs/going-to-production/#limit-superusers-to-specific-ipssubnets)

skills/pocketbase-best-practices/references/query-performance.md

  • Network accessline 167
    Reference: [PocketBase Back-Relations](https://pocketbase.io/docs/working-with-relations/#back-relation-expand)
  • Network accessline 337
    Reference: [PocketBase Batch API](https://pocketbase.io/docs/api-records/#batch-operations)
  • Network accessline 476
    Reference: [PocketBase Expand](https://pocketbase.io/docs/api-records/#expand)
  • Network accessline 590
    Reference: [PocketBase Fields Parameter](https://pocketbase.io/docs/api-records/#fields)
  • Network accessline 744
    Reference: [PocketBase Records API](https://pocketbase.io/docs/api-records/)
  • Network accessline 878
    Reference: [PocketBase Expand](https://pocketbase.io/docs/api-records/#expand)
  • Network accessline 988
    Reference: [PocketBase Records API](https://pocketbase.io/docs/api-records/)

skills/pocketbase-best-practices/references/realtime.md

  • Network accessline 18
    // Subscribing before authentication const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 19
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 35
    // Subscribe after authentication const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 36
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 156
    Reference: [PocketBase Realtime Auth](https://pocketbase.io/docs/api-realtime/)
  • Network accessline 324
    Reference: [PocketBase Realtime Events](https://pocketbase.io/docs/api-realtime/)
  • Network accessline 522
    Reference: [PocketBase Realtime](https://pocketbase.io/docs/api-realtime/)
  • Network accessline 702
    Reference: [PocketBase Realtime](https://pocketbase.io/docs/api-realtime/)

skills/pocketbase-best-practices/references/sdk-usage.md

  • Network accessline 18
    // React Native: LocalAuthStore doesn't work correctly import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 19
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // Auth state lost on app restart!
  • Network accessline 20
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 23
    // Deno server: LocalStorage shared between all clients import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 24
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // All clients share the same auth state!
  • Network accessline 25
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 28
    // Server-side: Reusing single client for multiple users const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 29
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 37
    // Browser (default LocalAuthStore - works automatically) import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 38
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // Automatically persists to localStorage and syncs between tabs
  • Network accessline 39
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 56
    const pb = new PocketBase('http://127.0.0.1:8090', store);
  • Network accessline 61
    export function createServerClient(cookieHeader) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 62
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 75
    const pb = new PocketBase('http://127.0.0.1:8090', new MemoryAuthStore());
  • Network accessline 106
    const pb = new PocketBase('http://127.0.0.1:8090', new SecureAuthStore());
  • Network accessline 131
    Reference: [PocketBase Authentication](https://pocketbase.io/docs/authentication/)
  • Network accessline 267
    Reference: [PocketBase Auto-Cancellation](https://github.com/pocketbase/js-sdk#auto-cancellation)
  • Network accessline 301
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 428
    Reference: [PocketBase Error Handling](https://github.com/pocketbase/js-sdk#error-handling)
  • Network accessline 553
    Reference: [PocketBase Relations](https://pocketbase.io/docs/working-with-relations/)
  • Network accessline 702
    Reference: [PocketBase Filters](https://pocketbase.io/docs/api-rules-and-filters/)
  • Network accessline 713
    // Missing polyfills in Node.js import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 715
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 731
    const pb = new PocketBase('http://127.0.0.1:8090');  // Use https:// in production
  • Network accessline 740
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 754
    const pb = new PocketBase('http://127.0.0.1:8090', store);
  • Network accessline 764
    export async function handle({ event, resolve }) {   // Create fresh client for each request   event.locals.pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 766
    event.locals.pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 826
    const pb = new PocketBase('http://127.0.0.1:8090') as TypedPocketBase;
  • Network accessline 835
    Reference: [PocketBase JS SDK](https://github.com/pocketbase/js-sdk)
  • Network accessline 866
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 1006
    Reference: [PocketBase Send Hooks](https://github.com/pocketbase/js-sdk#send-hooks)

skills/pocketbase-best-practices/references/server-side-extending.md

  • Network accessline 325
    Reference: [Go – Jobs scheduling](https://pocketbase.io/docs/go-jobs-scheduling/) | [JS – Jobs scheduling](https://pocketbase.io/docs/js-jobs-scheduling/)
  • Network accessline 389
    const file1 = $filesystem.fileFromPath("/tmp/import.jpg"); const file2 = $filesystem.fileFromBytes(new Uint8Array([0xff, 0xd8]), "logo.jpg"); const file3 = $filesystem.fileFromURL("https://example.com/a.jpg");
  • Network accessline 391
    const file3 = $filesystem.fileFromURL("https://example.com/a.jpg");
  • Network accessline 416
    Reference: [Go Filesystem](https://pocketbase.io/docs/go-filesystem/) · [JS Filesystem](https://pocketbase.io/docs/js-filesystem/)
  • Network accessline 489
    - Passing a `types.DateTime` / `DateTime` value binds it correctly - do not stringify dates manually. - `nil` / `null` binds as SQL NULL; use `field = null` or `field != null` in the filter expression. - The filter grammar is the same as us
  • Network accessline 491
    - The filter grammar is the same as used by collection API rules - consult [Filter Syntax](https://pocketbase.io/docs/api-rules-and-filters/#filters) for operators.
  • Network accessline 493
    Reference: [Go database - FindRecordsByFilter](https://pocketbase.io/docs/go-records/#fetch-records-via-filter-expression) · [JS database - findRecordsByFilter](https://pocketbase.io/docs/js-records/#fetch-records-via-filter-expression)
  • Network accessline 625
    Reference: [Extend with Go - Custom SQLite driver](https://pocketbase.io/docs/go-overview/#custom-sqlite-driver)
  • Network accessline 760
    Reference: [Extend with Go – Migrations](https://pocketbase.io/docs/go-migrations/)
  • Network accessline 853
    Reference: [Extend with Go - Overview](https://pocketbase.io/docs/go-overview/)
  • Network accessline 931
    Reference: [Go Event hooks](https://pocketbase.io/docs/go-event-hooks/) · [JS Event hooks](https://pocketbase.io/docs/js-event-hooks/)
  • Network accessline 991
    Reference: [Go Record request hooks](https://pocketbase.io/docs/go-event-hooks/#record-crud-request-hooks) · [JS Record model hooks](https://pocketbase.io/docs/js-event-hooks/#record-model-hooks)
  • Network accessline 1092
    Reference: [Extend with JavaScript - Migrations](https://pocketbase.io/docs/js-migrations/)
  • Network accessline 1145
    Reference: [Extend with JavaScript - Overview](https://pocketbase.io/docs/js-overview/)
  • Network accessline 1246
    Reference: [Extend with JavaScript - Loading modules](https://pocketbase.io/docs/js-overview/#loading-modules)
  • Network accessline 1311
    Reference: [Extend with JavaScript - Handlers scope](https://pocketbase.io/docs/js-overview/#handlers-scope)
  • Network accessline 1421
    Reference: [Go Mailer](https://pocketbase.io/docs/go-sending-emails/) · [JS Mailer](https://pocketbase.io/docs/js-sending-emails/)
  • Network accessline 1505
    Reference: [Go Routing](https://pocketbase.io/docs/go-routing/) · [JS Routing](https://pocketbase.io/docs/js-routing/)
  • Network accessline 1516
    // ❌ Secret compiled into the binary - leaks via `strings ./pocketbase` const slackWebhook = "https://hooks.slack.com/services/T00/B00/XXXX"
  • Network accessline 1517
    const slackWebhook = "https://hooks.slack.com/services/T00/B00/XXXX"
  • Network accessline 1589
    Reference: [Settings](https://pocketbase.io/docs/going-to-production/#use-encryption-for-the-pb_data-settings) · [OnSettingsReload hook](https://pocketbase.io/docs/go-event-hooks/#app-hooks)
  • Network accessline 1600
    // ❌ Hits the actual dev server - depends on side-effects from a previous run func TestCreatePost(t *testing.T) {     resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",
  • Network accessline 1601
    func TestCreatePost(t *testing.T) {     resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",         "application/json",
  • Network accessline 1602
    resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",
  • Network accessline 1759
    Reference: [Testing](https://pocketbase.io/docs/go-testing/) · [tests package GoDoc](https://pkg.go.dev/github.com/pocketbase/pocketbase/tests)
  • Network accessline 1829
    Reference: [Go database](https://pocketbase.io/docs/go-database/#transaction) · [JS database](https://pocketbase.io/docs/js-database/#transaction)

skills/pocketbase-best-practices/rules/_template.md

  • Network accessline 33
    Reference: [PocketBase Docs](https://pocketbase.io/docs/)

skills/pocketbase-best-practices/rules/auth-impersonation.md

  • Network accessline 76
    // Using API key token in another service async function useApiKey(apiToken) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 78
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 121
    Reference: [PocketBase Impersonation](https://pocketbase.io/docs/authentication/#impersonate-authentication)

skills/pocketbase-best-practices/rules/auth-mfa.md

  • Network accessline 28
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 135
    Reference: [PocketBase MFA](https://pocketbase.io/docs/authentication/#mfa)

skills/pocketbase-best-practices/rules/auth-oauth2.md

  • Network accessline 16
    async function loginWithGoogle() {   // Redirect user to Google manually   window.location.href = 'https://accounts.google.com/oauth/authorize?...';
  • Network accessline 17
    // Redirect user to Google manually   window.location.href = 'https://accounts.google.com/oauth/authorize?...'; }
  • Network accessline 18
    window.location.href = 'https://accounts.google.com/oauth/authorize?...';
  • Network accessline 22
    async function handleCallback(code) {   // Exchange code manually - error prone!   const response = await fetch('/api/auth/callback', {
  • Network accessline 23
    // Exchange code manually - error prone!   const response = await fetch('/api/auth/callback', {     method: 'POST',
  • Network accessline 24
    const response = await fetch('/api/auth/callback', {
  • Network accessline 36
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Access to secretsline 132
    [Credential-related source omitted]
  • Network accessline 147
    Reference: [PocketBase OAuth2](https://pocketbase.io/docs/authentication/#oauth2-authentication)

skills/pocketbase-best-practices/rules/auth-otp.md

  • Network accessline 68
    Reference: [Auth with OTP](https://pocketbase.io/docs/authentication/#auth-with-otp) · [JS SDK - authWithOTP](https://github.com/pocketbase/js-sdk#authwithotp)

skills/pocketbase-best-practices/rules/auth-password.md

  • Network accessline 36
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 104
    Reference: [PocketBase Auth](https://pocketbase.io/docs/authentication/)

skills/pocketbase-best-practices/rules/auth-token-management.md

  • Network accessline 22
    // Bad: manually managing tokens let authToken = localStorage.getItem('token'); fetch('/api/posts', {
  • Network accessline 23
    [Credential-related source omitted]
  • Network accessline 24
    fetch('/api/posts', {
  • Network accessline 34
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 99
    // Server-side: create fresh client per request export async function handleRequest(request) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 101
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 142
    Reference: [PocketBase Auth Store](https://pocketbase.io/docs/authentication/)

skills/pocketbase-best-practices/rules/coll-auth-vs-base.md

  • Network accessline 67
    Reference: [PocketBase Auth Collections](https://pocketbase.io/docs/collections/#auth-collection)

skills/pocketbase-best-practices/rules/coll-field-types.md

  • Network accessline 69
    Reference: [PocketBase Collections](https://pocketbase.io/docs/collections/)

skills/pocketbase-best-practices/rules/coll-geopoint.md

  • Network accessline 122
    Reference: [PocketBase GeoPoint](https://pocketbase.io/docs/collections/#geopoint)

skills/pocketbase-best-practices/rules/coll-indexes.md

  • Network accessline 74
    Reference: [SQLite Query Planning](https://www.sqlite.org/queryplanner.html)

skills/pocketbase-best-practices/rules/coll-relations.md

  • Network accessline 98
    Reference: [PocketBase Relations](https://pocketbase.io/docs/collections/#relation)

skills/pocketbase-best-practices/rules/coll-view-collections.md

  • Network accessline 68
    Reference: [PocketBase View Collections](https://pocketbase.io/docs/collections/#view-collection)

skills/pocketbase-best-practices/rules/deploy-backup.md

  • Network accessline 31
    // 1. Using PocketBase Admin API for backups const adminPb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 32
    const adminPb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 88
    POCKETBASE_URL="http://127.0.0.1:8090"
  • Network accessline 97
    # Create backup via API curl -X POST "${POCKETBASE_URL}/api/backups" \
  • Network accessline 98
    curl -X POST "${POCKETBASE_URL}/api/backups" \
  • Network accessline 99
    [Credential-related source omitted]
  • Dangerous shell operationline 104
    find "${BACKUP_DIR}" -name "*.zip" -mtime +${KEEP_DAYS} -delete
  • Access to secretsline 121
    [Credential-related source omitted]
  • Access to secretsline 122
    [Credential-related source omitted]
  • Network accessline 145
    Reference: [PocketBase Backups](https://pocketbase.io/docs/going-to-production/#backups)

skills/pocketbase-best-practices/rules/deploy-configuration.md

  • Network accessline 21
    # Wrong origin for CORS # Leaving http://localhost:8090 as allowed origin
  • Network accessline 22
    # Leaving http://localhost:8090 as allowed origin
  • Network accessline 29
    ./pocketbase serve \   --http="0.0.0.0:8090" \   --origins="https://myapp.com,https://www.myapp.com" \
  • Network accessline 30
    --http="0.0.0.0:8090" \   --origins="https://myapp.com,https://www.myapp.com" \   --encryptionEnv="PB_ENCRYPTION_KEY"
  • Network accessline 31
    --origins="https://myapp.com,https://www.myapp.com" \
  • Access to secretsline 35
    [Credential-related source omitted]
  • Network accessline 57
    meta: {     appName: 'My App',     appURL: 'https://myapp.com',
  • Network accessline 58
    appName: 'My App',     appURL: 'https://myapp.com',     senderName: 'My App',
  • Network accessline 59
    appURL: 'https://myapp.com',
  • Access to secretsline 79
    [Credential-related source omitted]
  • Access to secretsline 80
    [Credential-related source omitted]
  • Access to secretsline 108
    [Credential-related source omitted]
  • Access to secretsline 124
    [Credential-related source omitted]
  • Access to secretsline 125
    [Credential-related source omitted]
  • Access to secretsline 143
    [Credential-related source omitted]
  • Access to secretsline 150
    [Credential-related source omitted]
  • Access to secretsline 151
    [Credential-related source omitted]
  • Access to secretsline 153
    [Credential-related source omitted]
  • Access to secretsline 154
    [Credential-related source omitted]
  • Network accessline 176
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)

skills/pocketbase-best-practices/rules/deploy-rate-limiting.md

  • Network accessline 70
    location /api/ {             limit_req zone=api burst=20 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 71
    limit_req zone=api burst=20 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 72
    proxy_pass http://pocketbase;
  • Network accessline 76
    location /api/collections/users/auth {             limit_req zone=auth burst=5 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 77
    limit_req zone=auth burst=5 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 78
    proxy_pass http://pocketbase;
  • Network accessline 82
    location /api/collections/_superusers/auth {             limit_req zone=auth burst=3 nodelay;             proxy_pass http://pocketbase;
  • Network accessline 83
    limit_req zone=auth burst=3 nodelay;             proxy_pass http://pocketbase;         }
  • Network accessline 84
    proxy_pass http://pocketbase;
  • Network accessline 176
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)

skills/pocketbase-best-practices/rules/deploy-reverse-proxy.md

  • Network accessline 79
    listen 80;     server_name myapp.com;     return 301 https://$server_name$request_uri;
  • Network accessline 80
    server_name myapp.com;     return 301 https://$server_name$request_uri; }
  • Network accessline 81
    return 301 https://$server_name$request_uri;
  • Network accessline 104
    location / {         proxy_pass http://pocketbase;
  • Network accessline 105
    proxy_pass http://pocketbase;
  • Network accessline 129
    proxy_pass http://pocketbase;
  • Network accessline 139
    # Static file caching     location /api/files/ {         proxy_pass http://pocketbase;
  • Network accessline 140
    location /api/files/ {         proxy_pass http://pocketbase;         proxy_cache_valid 200 1d;
  • Network accessline 141
    proxy_pass http://pocketbase;
  • Network accessline 162
    # NOTE: This is a third-party community image, not officially maintained by PocketBase.     # For production, consider building your own image from the official PocketBase binary.     # See: https://pocketbase.io/docs/going-to-production/
  • Network accessline 163
    # For production, consider building your own image from the official PocketBase binary.     # See: https://pocketbase.io/docs/going-to-production/     image: ghcr.io/muchobien/pocketbase:latest
  • Network accessline 164
    # See: https://pocketbase.io/docs/going-to-production/
  • Access to secretsline 170
    [Credential-related source omitted]
  • Network accessline 200
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)

skills/pocketbase-best-practices/rules/deploy-scaling.md

  • Access to secretsline 50
    [Credential-related source omitted]
  • Network accessline 63
    ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
  • Access to secretsline 87
    [Credential-related source omitted]
  • Network accessline 104
    Reference: [Going to production](https://pocketbase.io/docs/going-to-production/)

skills/pocketbase-best-practices/rules/deploy-sqlite-considerations.md

  • Network accessline 202
    Reference: [PocketBase Going to Production](https://pocketbase.io/docs/going-to-production/)

skills/pocketbase-best-practices/rules/deploy-superuser-ips.md

  • Network accessline 36
    Reference: [Going to production - Limit superusers to specific IPs/subnets](https://pocketbase.io/docs/going-to-production/#limit-superusers-to-specific-ipssubnets)

skills/pocketbase-best-practices/rules/ext-cron-jobs.md

  • Network accessline 128
    Reference: [Go – Jobs scheduling](https://pocketbase.io/docs/go-jobs-scheduling/) | [JS – Jobs scheduling](https://pocketbase.io/docs/js-jobs-scheduling/)

skills/pocketbase-best-practices/rules/ext-filesystem.md

  • Network accessline 68
    const file1 = $filesystem.fileFromPath("/tmp/import.jpg"); const file2 = $filesystem.fileFromBytes(new Uint8Array([0xff, 0xd8]), "logo.jpg"); const file3 = $filesystem.fileFromURL("https://example.com/a.jpg");
  • Network accessline 70
    const file3 = $filesystem.fileFromURL("https://example.com/a.jpg");
  • Network accessline 95
    Reference: [Go Filesystem](https://pocketbase.io/docs/go-filesystem/) · [JS Filesystem](https://pocketbase.io/docs/js-filesystem/)

skills/pocketbase-best-practices/rules/ext-filter-binding-server.md

  • Network accessline 77
    - Passing a `types.DateTime` / `DateTime` value binds it correctly - do not stringify dates manually. - `nil` / `null` binds as SQL NULL; use `field = null` or `field != null` in the filter expression. - The filter grammar is the same as us
  • Network accessline 79
    - The filter grammar is the same as used by collection API rules - consult [Filter Syntax](https://pocketbase.io/docs/api-rules-and-filters/#filters) for operators.
  • Network accessline 81
    Reference: [Go database - FindRecordsByFilter](https://pocketbase.io/docs/go-records/#fetch-records-via-filter-expression) · [JS database - findRecordsByFilter](https://pocketbase.io/docs/js-records/#fetch-records-via-filter-expression)

skills/pocketbase-best-practices/rules/ext-go-custom-sqlite.md

  • Network accessline 136
    Reference: [Extend with Go - Custom SQLite driver](https://pocketbase.io/docs/go-overview/#custom-sqlite-driver)

skills/pocketbase-best-practices/rules/ext-go-migrations.md

  • Network accessline 139
    Reference: [Extend with Go – Migrations](https://pocketbase.io/docs/go-migrations/)

skills/pocketbase-best-practices/rules/ext-go-setup.md

  • Network accessline 97
    Reference: [Extend with Go - Overview](https://pocketbase.io/docs/go-overview/)

skills/pocketbase-best-practices/rules/ext-hooks-chain.md

  • Network accessline 82
    Reference: [Go Event hooks](https://pocketbase.io/docs/go-event-hooks/) · [JS Event hooks](https://pocketbase.io/docs/js-event-hooks/)

skills/pocketbase-best-practices/rules/ext-hooks-record-vs-request.md

  • Network accessline 64
    Reference: [Go Record request hooks](https://pocketbase.io/docs/go-event-hooks/#record-crud-request-hooks) · [JS Record model hooks](https://pocketbase.io/docs/js-event-hooks/#record-model-hooks)

skills/pocketbase-best-practices/rules/ext-js-migrations.md

  • Network accessline 105
    Reference: [Extend with JavaScript - Migrations](https://pocketbase.io/docs/js-migrations/)

skills/pocketbase-best-practices/rules/ext-js-setup.md

  • Network accessline 57
    Reference: [Extend with JavaScript - Overview](https://pocketbase.io/docs/js-overview/)

skills/pocketbase-best-practices/rules/ext-jsvm-modules.md

  • Network accessline 105
    Reference: [Extend with JavaScript - Loading modules](https://pocketbase.io/docs/js-overview/#loading-modules)

skills/pocketbase-best-practices/rules/ext-jsvm-scope.md

  • Network accessline 69
    Reference: [Extend with JavaScript - Handlers scope](https://pocketbase.io/docs/js-overview/#handlers-scope)

skills/pocketbase-best-practices/rules/ext-mailer.md

  • Network accessline 114
    Reference: [Go Mailer](https://pocketbase.io/docs/go-sending-emails/) · [JS Mailer](https://pocketbase.io/docs/js-sending-emails/)

skills/pocketbase-best-practices/rules/ext-routing-custom.md

  • Network accessline 88
    Reference: [Go Routing](https://pocketbase.io/docs/go-routing/) · [JS Routing](https://pocketbase.io/docs/js-routing/)

skills/pocketbase-best-practices/rules/ext-settings.md

  • Network accessline 15
    // ❌ Secret compiled into the binary - leaks via `strings ./pocketbase` const slackWebhook = "https://hooks.slack.com/services/T00/B00/XXXX"
  • Network accessline 16
    const slackWebhook = "https://hooks.slack.com/services/T00/B00/XXXX"
  • Network accessline 88
    Reference: [Settings](https://pocketbase.io/docs/going-to-production/#use-encryption-for-the-pb_data-settings) · [OnSettingsReload hook](https://pocketbase.io/docs/go-event-hooks/#app-hooks)

skills/pocketbase-best-practices/rules/ext-testing.md

  • Network accessline 1
    --- title: Test Hooks and Routes with tests.NewTestApp and ApiScenario instead of Curl impact: HIGH
  • Network accessline 2
    title: Test Hooks and Routes with tests.NewTestApp and ApiScenario instead of Curl impact: HIGH impactDescription: Without the tests package you cannot exercise hooks, middleware, and transactions in isolation
  • Network accessline 15
    // ❌ Hits the actual dev server - depends on side-effects from a previous run func TestCreatePost(t *testing.T) {     resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",
  • Network accessline 16
    func TestCreatePost(t *testing.T) {     resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",         "application/json",
  • Network accessline 17
    resp, _ := http.Post("http://localhost:8090/api/collections/posts/records",
  • Network accessline 174
    Reference: [Testing](https://pocketbase.io/docs/go-testing/) · [tests package GoDoc](https://pkg.go.dev/github.com/pocketbase/pocketbase/tests)

skills/pocketbase-best-practices/rules/ext-transactions.md

  • Network accessline 74
    Reference: [Go database](https://pocketbase.io/docs/go-database/#transaction) · [JS database](https://pocketbase.io/docs/js-database/#transaction)

skills/pocketbase-best-practices/rules/file-serving.md

  • Network accessline 15
    // Hardcoded URL construction - brittle const imageUrl = `http://localhost:8090/api/files/${record.collectionId}/${record.id}/${record.image}`;
  • Network accessline 16
    const imageUrl = `http://localhost:8090/api/files/${record.collectionId}/${record.id}/${record.image}`;
  • Network accessline 29
    // Basic file URL const imageUrl = pb.files.getURL(record, record.image); // Returns: http://host/api/files/COLLECTION/RECORD_ID/filename.jpg
  • Network accessline 31
    // Returns: http://host/api/files/COLLECTION/RECORD_ID/filename.jpg
  • Network accessline 159
    const sizes = ['100x100', '300x200', '800x600'];   await Promise.all(sizes.map(size =>     fetch(pb.files.getURL(updated, updated.image, { thumb: size }))
  • Network accessline 160
    await Promise.all(sizes.map(size =>     fetch(pb.files.getURL(updated, updated.image, { thumb: size }))   ));
  • Network accessline 161
    fetch(pb.files.getURL(updated, updated.image, { thumb: size }))
  • Network accessline 173
    // Default: All file requests proxy through PocketBase const url = pb.files.getURL(record, record.image); // -> https://myapp.com/api/files/COLLECTION/ID/filename.jpg (proxied)
  • Network accessline 175
    // -> https://myapp.com/api/files/COLLECTION/ID/filename.jpg (proxied)
  • Network accessline 177
    // For public files with S3 + CDN, construct CDN URL directly: const cdnBase = 'https://cdn.myapp.com';  // Your S3 CDN domain
  • Network accessline 178
    const cdnBase = 'https://cdn.myapp.com';  // Your S3 CDN domain
  • Network accessline 186
    Reference: [PocketBase Files](https://pocketbase.io/docs/files-handling/)

skills/pocketbase-best-practices/rules/file-upload.md

  • Network accessline 168
    Reference: [PocketBase File Upload](https://pocketbase.io/docs/files-handling/)

skills/pocketbase-best-practices/rules/file-validation.md

  • Network accessline 187
    Reference: [PocketBase Files Configuration](https://pocketbase.io/docs/files-handling/)

skills/pocketbase-best-practices/rules/query-back-relations.md

  • Network accessline 164
    Reference: [PocketBase Back-Relations](https://pocketbase.io/docs/working-with-relations/#back-relation-expand)

skills/pocketbase-best-practices/rules/query-batch-operations.md

  • Network accessline 174
    Reference: [PocketBase Batch API](https://pocketbase.io/docs/api-records/#batch-operations)

skills/pocketbase-best-practices/rules/query-expand.md

  • Network accessline 143
    Reference: [PocketBase Expand](https://pocketbase.io/docs/api-records/#expand)

skills/pocketbase-best-practices/rules/query-field-selection.md

  • Network accessline 118
    Reference: [PocketBase Fields Parameter](https://pocketbase.io/docs/api-records/#fields)

skills/pocketbase-best-practices/rules/query-first-item.md

  • Network accessline 158
    Reference: [PocketBase Records API](https://pocketbase.io/docs/api-records/)

skills/pocketbase-best-practices/rules/query-n-plus-one.md

  • Network accessline 138
    Reference: [PocketBase Expand](https://pocketbase.io/docs/api-records/#expand)

skills/pocketbase-best-practices/rules/query-pagination.md

  • Network accessline 114
    Reference: [PocketBase Records API](https://pocketbase.io/docs/api-records/)

skills/pocketbase-best-practices/rules/realtime-auth.md

  • Network accessline 15
    // Subscribing before authentication const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 16
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 32
    // Subscribe after authentication const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 33
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 153
    Reference: [PocketBase Realtime Auth](https://pocketbase.io/docs/api-realtime/)

skills/pocketbase-best-practices/rules/realtime-events.md

  • Network accessline 172
    Reference: [PocketBase Realtime Events](https://pocketbase.io/docs/api-realtime/)

skills/pocketbase-best-practices/rules/realtime-reconnection.md

  • Network accessline 202
    Reference: [PocketBase Realtime](https://pocketbase.io/docs/api-realtime/)

skills/pocketbase-best-practices/rules/realtime-subscribe.md

  • Network accessline 184
    Reference: [PocketBase Realtime](https://pocketbase.io/docs/api-realtime/)

skills/pocketbase-best-practices/rules/rules-basics.md

  • Network accessline 85
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/)

skills/pocketbase-best-practices/rules/rules-cross-collection.md

  • Network accessline 75
    Reference: [PocketBase Collection Reference](https://pocketbase.io/docs/api-rules-and-filters/#collection-fields)

skills/pocketbase-best-practices/rules/rules-filter-syntax.md

  • Network accessline 93
    Reference: [PocketBase Filters](https://pocketbase.io/docs/api-rules-and-filters/#filters-syntax)

skills/pocketbase-best-practices/rules/rules-locked-vs-open.md

  • Network accessline 91
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/)

skills/pocketbase-best-practices/rules/rules-request-context.md

  • Network accessline 88
    Reference: [PocketBase API Rules](https://pocketbase.io/docs/api-rules-and-filters/#available-fields)

skills/pocketbase-best-practices/rules/rules-strftime.md

  • Network accessline 10
    PocketBase v0.36 added the `strftime()` function to the filter expression grammar. It maps directly to SQLite's [strftime](https://sqlite.org/lang_datefunc.html) and is the correct way to bucket, compare, or extract parts of a datetime fiel
  • Network accessline 73
    Reference: [Filter Syntax - Functions](https://pocketbase.io/docs/api-rules-and-filters/#filters) · [v0.36.0 release](https://github.com/pocketbase/pocketbase/releases/tag/v0.36.0)

skills/pocketbase-best-practices/rules/sdk-auth-store.md

  • Network accessline 15
    // React Native: LocalAuthStore doesn't work correctly import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 16
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // Auth state lost on app restart!
  • Network accessline 17
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 20
    // Deno server: LocalStorage shared between all clients import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 21
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // All clients share the same auth state!
  • Network accessline 22
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 25
    // Server-side: Reusing single client for multiple users const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 26
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 34
    // Browser (default LocalAuthStore - works automatically) import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 35
    import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); // Automatically persists to localStorage and syncs between tabs
  • Network accessline 36
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 53
    const pb = new PocketBase('http://127.0.0.1:8090', store);
  • Network accessline 58
    export function createServerClient(cookieHeader) {   const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 59
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 72
    const pb = new PocketBase('http://127.0.0.1:8090', new MemoryAuthStore());
  • Network accessline 103
    const pb = new PocketBase('http://127.0.0.1:8090', new SecureAuthStore());
  • Network accessline 128
    Reference: [PocketBase Authentication](https://pocketbase.io/docs/authentication/)

skills/pocketbase-best-practices/rules/sdk-auto-cancellation.md

  • Network accessline 140
    Reference: [PocketBase Auto-Cancellation](https://github.com/pocketbase/js-sdk#auto-cancellation)

skills/pocketbase-best-practices/rules/sdk-error-handling.md

  • Network accessline 38
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 165
    Reference: [PocketBase Error Handling](https://github.com/pocketbase/js-sdk#error-handling)

skills/pocketbase-best-practices/rules/sdk-field-modifiers.md

  • Network accessline 129
    Reference: [PocketBase Relations](https://pocketbase.io/docs/working-with-relations/)

skills/pocketbase-best-practices/rules/sdk-filter-binding.md

  • Network accessline 153
    Reference: [PocketBase Filters](https://pocketbase.io/docs/api-rules-and-filters/)

skills/pocketbase-best-practices/rules/sdk-initialization.md

  • Network accessline 15
    // Missing polyfills in Node.js import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 17
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 33
    const pb = new PocketBase('http://127.0.0.1:8090');  // Use https:// in production
  • Network accessline 42
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 56
    const pb = new PocketBase('http://127.0.0.1:8090', store);
  • Network accessline 66
    export async function handle({ event, resolve }) {   // Create fresh client for each request   event.locals.pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 68
    event.locals.pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 128
    const pb = new PocketBase('http://127.0.0.1:8090') as TypedPocketBase;
  • Network accessline 137
    Reference: [PocketBase JS SDK](https://github.com/pocketbase/js-sdk)

skills/pocketbase-best-practices/rules/sdk-send-hooks.md

  • Network accessline 35
    const pb = new PocketBase('http://127.0.0.1:8090');
  • Network accessline 175
    Reference: [PocketBase Send Hooks](https://github.com/pocketbase/js-sdk#send-hooks)

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Some files could not be read; the facts below still hold.

Signal confidence: 390 facts

and 340 more

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeNativePath .claude/settings.json.claude/skills/<skill-name>/
CodexNativeManifest skills/pocketbase-best-practices/AGENTS.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md skills/pocketbase-best-practices/SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md skills/pocketbase-best-practices/SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md skills/pocketbase-best-practices/SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md skills/pocketbase-best-practices/SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.