# Send PocketBase to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pocketbase",
    "name": "PocketBase",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/pocketbase",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/pocketbase",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/pocketbase",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pocketbase",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "pocketbase",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T05:56:51.021Z",
      "expiresAt": "2026-05-14T05:56:51.021Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pocketbase",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pocketbase",
        "contentDisposition": "attachment; filename=\"pocketbase-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "pocketbase"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pocketbase"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pocketbase",
    "downloadUrl": "https://openagent3.xyz/downloads/pocketbase",
    "agentUrl": "https://openagent3.xyz/skills/pocketbase/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pocketbase/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pocketbase/agent.md"
  }
}
```
## Documentation

### SDK Basics

Import from pocketbase not pocketbase/dist — the dist path is internal and breaks on updates
Always check pb.authStore.isValid before using pb.authStore.model — expired tokens return stale data without error
After login, token is auto-attached to requests — no need to manually set Authorization headers

### Fetching Records

Use expand parameter to load relations: pb.collection('posts').getList(1, 20, { expand: 'author,comments' })
Expanded records appear in record.expand.fieldName — not directly on the record object
Filter syntax is SQL-like but uses single quotes: filter: "status = 'active' && created >= '2024-01-01'"
Combine conditions with && and ||, not AND/OR — SQL keywords don't work

### Authentication

Users collection is users (lowercase) — _users or Users returns empty results
authWithPassword(email, password) returns the full user record plus token
OAuth flow: authWithOAuth2({ provider: 'google' }) opens popup automatically in browser
Logout requires both pb.authStore.clear() and invalidating server-side if using tokens elsewhere

### Realtime

Subscribe with pb.collection('posts').subscribe('*', callback) — the '*' means all record changes
Callback receives { action: 'create'|'update'|'delete', record } — check action before processing
Always unsubscribe on cleanup: pb.collection('posts').unsubscribe() — orphan subscriptions leak memory

### File Uploads

Files require FormData, not JSON: formData.append('document', file) then pass to create()
Get file URL with pb.files.getURL(record, record.filename) — don't construct URLs manually
Multiple files to same field: append with same key multiple times

### Collection Rules

Empty rule = blocked for everyone, "" (empty string) rule = open to everyone — counterintuitive
Use @request.auth.id to reference logged-in user, @request.data for submitted data
Example restrict to owner: @request.auth.id = user.id in View/Update/Delete rules

### Hooks (pb_hooks/)

JavaScript hooks go in pb_hooks/*.pb.js — the .pb.js extension is required
Hooks run synchronously and block the request — keep them fast or use routines
Access app with $app, event data with e — common: e.record, e.httpContext

### Admin API

Admin endpoints need superuser auth, not regular user tokens
Create admin token: pb.admins.authWithPassword(email, password)
Admin operations use pb.admins or pb.collections, not pb.collection()
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivangdavila
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T05:56:51.021Z
- Expires at: 2026-05-14T05:56:51.021Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/pocketbase)
- [Send to Agent page](https://openagent3.xyz/skills/pocketbase/agent)
- [JSON manifest](https://openagent3.xyz/skills/pocketbase/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/pocketbase/agent.md)
- [Download page](https://openagent3.xyz/downloads/pocketbase)