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
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.
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>/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
30-day change not yet available: not enough history.
Individual skills in this repository
- pocketbase-best-practices
skills/pocketbase-best-practices
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 tokensAlways available to the agent
SKILL.md
2,669 tokensWhen the skill is activated
Reference documents
127,403 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- How rules are prioritized
- What's covered
- Quick Reference
- Example Prompts
- Detailed Rules
Files
AGENTS.mddoc6,547 bytesSKILL.mdcore10,967 bytesmetadata.jsonasset1,539 bytesreferences/api-rules-security.mddoc17,320 bytesreferences/authentication.mddoc21,850 bytesreferences/collection-design.mddoc15,111 bytesreferences/file-handling.mddoc15,197 bytesreferences/production-deployment.mddoc31,621 bytesreferences/query-performance.mddoc28,514 bytesreferences/realtime.mddoc19,876 bytesreferences/sdk-usage.mddoc29,182 bytesreferences/server-side-extending.mddoc77,020 bytesrules/_sections.mddoc1,894 bytesrules/_template.mddoc855 bytesrules/auth-impersonation.mddoc3,779 bytesrules/auth-mfa.mddoc3,635 bytesrules/auth-oauth2.mddoc4,999 bytesrules/auth-otp.mddoc3,601 bytesrules/auth-password.mddoc2,841 bytesrules/auth-token-management.mddoc3,558 bytesrules/coll-auth-vs-base.mddoc2,153 bytesrules/coll-field-types.mddoc2,703 bytesrules/coll-geopoint.mddoc3,380 bytesrules/coll-indexes.mddoc2,351 bytesrules/coll-relations.mddoc2,950 bytesrules/coll-view-collections.mddoc2,115 bytesrules/deploy-backup.mddoc4,276 bytesrules/deploy-configuration.mddoc4,917 bytesrules/deploy-rate-limiting.mddoc5,160 bytesrules/deploy-reverse-proxy.mddoc5,740 bytesrules/deploy-scaling.mddoc3,845 bytesrules/deploy-sqlite-considerations.mddoc6,464 bytesrules/deploy-superuser-ips.mddoc1,869 bytesrules/ext-compose-request-flow.mddoc9,919 bytesrules/ext-cron-jobs.mddoc4,464 bytesrules/ext-filesystem.mddoc4,327 bytesrules/ext-filter-binding-server.mddoc3,219 bytesrules/ext-go-custom-sqlite.mddoc4,601 bytesrules/ext-go-migrations.mddoc4,326 bytesrules/ext-go-setup.mddoc3,659 bytesrules/ext-hooks-chain.mddoc3,441 bytesrules/ext-hooks-record-vs-request.mddoc3,088 bytesrules/ext-js-migrations.mddoc4,803 bytesrules/ext-js-setup.mddoc2,581 bytesrules/ext-jsvm-modules.mddoc4,057 bytesrules/ext-jsvm-scope.mddoc2,810 bytesrules/ext-mailer.mddoc5,226 bytesrules/ext-routing-custom.mddoc3,912 bytesrules/ext-settings.mddoc4,398 bytesrules/ext-testing.mddoc7,251 bytesrules/ext-transactions.mddoc3,287 bytesrules/file-serving.mddoc5,886 bytesrules/file-upload.mddoc4,313 bytesrules/file-validation.mddoc5,149 bytesrules/query-back-relations.mddoc4,761 bytesrules/query-batch-operations.mddoc5,030 bytesrules/query-expand.mddoc3,977 bytesrules/query-field-selection.mddoc3,585 bytesrules/query-first-item.mddoc4,287 bytesrules/query-n-plus-one.mddoc4,057 bytesrules/query-pagination.mddoc3,419 bytesrules/realtime-auth.mddoc4,679 bytesrules/realtime-events.mddoc4,683 bytesrules/realtime-reconnection.mddoc5,446 bytesrules/realtime-subscribe.mddoc5,374 bytesrules/rules-basics.mddoc2,708 bytesrules/rules-cross-collection.mddoc2,682 bytesrules/rules-filter-syntax.mddoc3,264 bytesrules/rules-locked-vs-open.mddoc3,160 bytesrules/rules-request-context.mddoc3,187 bytesrules/rules-strftime.mddoc2,837 bytesrules/sdk-auth-store.mddoc3,851 bytesrules/sdk-auto-cancellation.mddoc4,361 bytesrules/sdk-error-handling.mddoc4,721 bytesrules/sdk-field-modifiers.mddoc3,836 bytesrules/sdk-filter-binding.mddoc4,551 bytesrules/sdk-initialization.mddoc4,111 bytesrules/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 GitHubSkills 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 shellAutomated signals, not a guarantee
Checked Nov 6, 2026
- No broad tool permissions
- 2 dangerous shell commandsin 2 files: pocketbase-best-practices/references/production-deployment.md:107 pocketbase-best-practices/rules/deploy-backup.md:104
- 368 network referencesin 76 files: pocketbase-best-practices/references/production-deployment.md:34 pocketbase-best-practices/references/sdk-usage.md:18 pocketbase-best-practices/references/server-side-extending.md:325 and 73 more
- No hidden or obfuscated text
- No instruction overrides
- No executable scripts
- 34 references to secretsin 7 files: pocketbase-best-practices/references/production-deployment.md:124 pocketbase-best-practices/rules/deploy-configuration.md:35 pocketbase-best-practices/rules/deploy-backup.md:121 and 4 more
- No requests to vote in Hot
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
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
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
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)
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
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:120Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:128Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:129Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:130Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:131Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:132Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:133Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:134Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:135Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:136Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:137Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:138Low confidence
- Network access in prose of documentationpocketbase-best-practices/AGENTS.md:139Low confidence
- Network access in the frontmatter of the SKILL.mdpocketbase-best-practices/SKILL.md:7Low confidence
- Network access in the frontmatter of the SKILL.mdpocketbase-best-practices/SKILL.md:8Low confidence
- Network access in the frontmatter of the SKILL.mdpocketbase-best-practices/SKILL.md:9Low confidence
- Network access in the frontmatter of the SKILL.mdpocketbase-best-practices/SKILL.md:10Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:88Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:159Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:248Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:335Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:419Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:425Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/api-rules-security.md:488Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:79Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:81Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:124Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:148Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:255Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:267Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:268Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:269Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:273Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:274Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:275Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:287Low confidence
- Access to secrets in code of documentation: a variable, placeholder or call, not a stored valuepocketbase-best-practices/references/authentication.md:383Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:398Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:462Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:494Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:562Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:580Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:581Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:582Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:592Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:657Low confidence
- Network access in code of documentationpocketbase-best-practices/references/authentication.md:659Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/authentication.md:700Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/collection-design.md:70Low confidence
- Network access in prose of documentationpocketbase-best-practices/references/collection-design.md:135Low confidence
and 340 more
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Native | Path .claude/settings.json | .claude/skills/<skill-name>/ |
| Codex | Native | Manifest skills/pocketbase-best-practices/AGENTS.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md skills/pocketbase-best-practices/SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md skills/pocketbase-best-practices/SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md skills/pocketbase-best-practices/SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard 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.