[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JK73AW0930ZY836QTGK7ZR":3,"skill-same:01M6JK73AW0930ZY836QTGK7ZR":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6JK73AW0930ZY836QTGK7ZR","PocketBase Hooks",null,"Server-side JavaScript hooks for PocketBase (pb_hooks). Use when writing custom routes, event hooks, cron jobs, sending emails, making HTTP requests, querying the database, or extending PocketBase with server-side logic. Covers the goja ES5 runtime, routing, middleware, all event hooks, DB queries, record operations, and global APIs.","transaurus\u002Fstaging-davila7-claude-code-templates","transaurus","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F210882017?v=4","01M6JH1R6ZCRXGJCTDP5ZKZBE6","Page Turner Agent","01M6JH1RBBR2P6Y0XWDGM4B0G7",0,"MIT","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-hooks\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"hooks","pocketbase","emails","custom","for","with","event","middleware","db","server-side","runtime","writing","use","cron","cron jobs","server","database","http","javascript","2026-11-10 10:12:30",false,"---\nname: \"PocketBase Hooks\"\ndescription: \"Server-side JavaScript hooks for PocketBase (pb_hooks). Use when writing custom routes, event hooks, cron jobs, sending emails, making HTTP requests, querying the database, or extending PocketBase with server-side logic. Covers the goja ES5 runtime, routing, middleware, all event hooks, DB queries, record operations, and global APIs.\"\n---\n\n# PocketBase Server-Side JavaScript (pb_hooks)\n\n## Runtime Basics\n\n- Files go in `pb_hooks\u002F*.pb.js` (must end with `.pb.js`)\n- Engine: **goja** — ES5.1 + some ES6. **No ES6 modules** (`import`\u002F`export`), **no async\u002Fawait**, **no arrow functions in older versions**. Use `function(){}` and CommonJS `require()`.\n- Each file is loaded on app start and on hot-reload\n- `__hooks` — absolute path to the pb_hooks directory\n- TypeScript declarations: `pb_data\u002Ftypes.d.ts` (auto-generated, useful for IDE support)\n- `--hooksPool=25` flag controls concurrent JS goroutines (default: 25)\n- Each handler runs in an isolated context — no shared mutable state between requests\n\n## Routing\n\n### Adding routes\n\n```js\nrouterAdd(\"GET\", \"\u002Fapi\u002Fhello\u002F{name}\", function(e) {\n    var name = e.request.pathValue(\"name\")\n    return e.json(200, { \"message\": \"Hello \" + name })\n}, \u002F* optional middleware *\u002F)\n```\n\n### Path patterns\n- `{name}` — named path parameter\n- `{path...}` — wildcard (matches rest of path)\n- `{$}` — exact match (no trailing slash)\n\n### Response methods\n\n| Method | Usage |\n|--------|-------|\n| `e.json(status, data)` | JSON response |\n| `e.string(status, text)` | Plain text |\n| `e.html(status, html)` | HTML response |\n| `e.redirect(status, url)` | Redirect (301\u002F302) |\n| `e.blob(status, contentType, bytes)` | Binary data |\n| `e.stream(status, contentType, reader)` | Streaming response |\n| `e.noContent(status)` | No body (204) |\n\n### Reading request data\n\n```js\n\u002F\u002F Body (JSON)\nvar body = new DynamicModel({ name: \"\", age: 0 })\ne.bindBody(body)\n\n\u002F\u002F Query params\nvar page = e.request.url.query().get(\"page\")\n\n\u002F\u002F Headers\nvar token = e.request.header.get(\"Authorization\")\n\n\u002F\u002F Uploaded files\nvar files = e.findUploadedFiles(\"document\")  \u002F\u002F returns array of *filesystem.File\n\n\u002F\u002F Auth state\nvar user = e.auth          \u002F\u002F current auth record or null\nvar isSuper = e.hasSuperuserAuth()\n```\n\n## Middleware\n\n### Built-in middleware\n\n```js\nrouterAdd(\"GET\", \"\u002Fapi\u002Fprotected\", handler,\n    $apis.requireAuth(),                \u002F\u002F any authenticated user\n    \u002F\u002F OR\n    $apis.requireAuth(\"users\"),         \u002F\u002F only \"users\" collection\n    \u002F\u002F OR\n    $apis.requireSuperuserAuth(),       \u002F\u002F superusers only\n    \u002F\u002F OR\n    $apis.requireGuestOnly(),           \u002F\u002F unauthenticated only\n    \u002F\u002F OR\n    $apis.bodyLimit(5 * 1024 * 1024),   \u002F\u002F 5MB body limit\n    \u002F\u002F OR\n    $apis.gzip()                        \u002F\u002F gzip compression\n)\n```\n\n### Global middleware\n\n```js\nrouterUse(function(e) {\n    \u002F\u002F runs before every request\n    console.log(e.request.method, e.request.url.path)\n    return e.next()  \u002F\u002F MUST call e.next() to continue\n})\n```\n\n### Custom route middleware\n\n```js\nfunction myMiddleware(e) {\n    \u002F\u002F pre-processing\n    var result = e.next()  \u002F\u002F call next handler\n    \u002F\u002F post-processing\n    return result\n}\n\nrouterAdd(\"GET\", \"\u002Fapi\u002Ftest\", handler, myMiddleware)\n```\n\nPriority: middleware runs in order — first registered, first executed.\n\n## Event Hooks\n\n### Record lifecycle\n\nEach record event has 3 variants:\n- `onRecord*Execute` — wraps the default action. Call `e.next()` to proceed.\n- `onRecord*AfterSuccess` — runs after successful execution\n- `onRecord*AfterError` — runs after execution error\n\n```js\n\u002F\u002F Before\u002Fduring create\nonRecordCreateExecute(function(e) {\n    \u002F\u002F e.record — the record being created\n    e.record.set(\"status\", \"pending\")\n    return e.next()  \u002F\u002F proceed with creation\n}, \"posts\")  \u002F\u002F optional collection filter\n\n\u002F\u002F After successful create\nonRecordAfterCreateSuccess(function(e) {\n    \u002F\u002F e.record — the created record (has ID now)\n    console.log(\"Created:\", e.record.id)\n}, \"posts\")\n\n\u002F\u002F After failed create\nonRecordAfterCreateError(function(e) {\n    \u002F\u002F e.error — the error\n    console.log(\"Failed:\", e.error)\n}, \"posts\")\n```\n\n### All record hooks\n\n| Hook | Event object fields |\n|------|-------------------|\n| `onRecordCreateExecute` | `e.record` |\n| `onRecordUpdateExecute` | `e.record` |\n| `onRecordDeleteExecute` | `e.record` |\n| `onRecordAfterCreateSuccess` | `e.record` — after successful create |\n| `onRecordAfterUpdateSuccess` | `e.record` — after successful update |\n| `onRecordAfterDeleteSuccess` | `e.record` — after successful delete |\n| `onRecordAfterCreateError` | `e.record`, `e.error` — after failed create |\n| `onRecordAfterUpdateError` | `e.record`, `e.error` — after failed update |\n| `onRecordAfterDeleteError` | `e.record`, `e.error` — after failed delete |\n| `onRecordValidate` | `e.record` — add custom validation errors |\n| `onRecordEnrich` | `e.record` — modify API response (hide\u002Fadd fields) |\n| `onRecordsListRequest` | `e.records`, `e.result` — modify list response |\n| `onRecordRequestCreate` | `e.record` — during API create request |\n| `onRecordRequestUpdate` | `e.record` — during API update request |\n| `onRecordRequestDelete` | `e.record` — during API delete request |\n\n### Auth hooks\n\n```js\nonRecordAuthWithPasswordRequest(function(e) {\n    \u002F\u002F e.record — the auth record\n    \u002F\u002F e.password — the provided password\n    return e.next()\n}, \"users\")\n\nonRecordAuthWithOAuth2Request(function(e) {\n    \u002F\u002F e.record — the auth record (may be new)\n    \u002F\u002F e.oAuth2User — OAuth2 user data\n    \u002F\u002F e.isNewRecord — true if first OAuth2 login\n    return e.next()\n}, \"users\")\n\nonRecordAuthWithOTPRequest(function(e) {\n    \u002F\u002F e.record — the auth record\n    return e.next()\n}, \"users\")\n\nonRecordAuthRefreshRequest(function(e) {\n    return e.next()\n}, \"users\")\n```\n\n### Realtime hooks\n\n```js\nonRealtimeConnectRequest(function(e) {\n    \u002F\u002F e.client — the SSE client\n    \u002F\u002F e.idleTimeout — connection timeout\n    return e.next()\n})\n\nonRealtimeSubscribeRequest(function(e) {\n    \u002F\u002F e.client\n    \u002F\u002F e.subscriptions — requested subscriptions\n    return e.next()\n})\n```\n\n### Other hooks\n\n```js\nonFileDownloadRequest(function(e) {\n    \u002F\u002F e.record, e.fileField, e.servedPath, e.servedName\n    return e.next()\n}, \"documents\")\n\nonBatchRequest(function(e) {\n    \u002F\u002F e.batch — array of sub-requests\n    return e.next()\n})\n\nonCollectionCreateExecute(function(e) {\n    \u002F\u002F e.collection\n    return e.next()\n})\n\n\u002F\u002F App lifecycle\nonBootstrap(function(e) {\n    \u002F\u002F runs once on app start (after DB is ready)\n    return e.next()\n})\n\nonTerminate(function(e) {\n    \u002F\u002F runs on graceful shutdown\n    return e.next()\n})\n```\n\n### Validation hook\n\n```js\nonRecordValidate(function(e) {\n    if (e.record.getString(\"title\").length \u003C 3) {\n        e.error = new ValidationError(\"title\", \"Title must be at least 3 characters\")\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Enrich hook (modify API response)\n\n```js\nonRecordEnrich(function(e) {\n    \u002F\u002F Hide field from non-owners\n    if (!e.requestInfo.auth || e.requestInfo.auth.id !== e.record.getString(\"author\")) {\n        e.record.hide(\"private_notes\")\n    }\n    \u002F\u002F Add computed field\n    e.record.withCustomData(true)\n    e.record.set(\"displayName\", e.record.getString(\"first\") + \" \" + e.record.getString(\"last\"))\n    return e.next()\n}, \"users\")\n```\n\n## Database\n\n### Query builder\n\n```js\nvar results = arrayOf(new DynamicModel({ id: \"\", title: \"\", count: 0 }))\n\n$app.db()\n    .select(\"id\", \"title\", \"COUNT(comments) as count\")\n    .from(\"posts\")\n    .where($dbx.hashExp({ status: \"active\" }))\n    .andWhere($dbx.like(\"title\", \"hello\"))\n    .orderBy(\"created DESC\")\n    .limit(10)\n    .offset(0)\n    .all(results)  \u002F\u002F populates results array\n```\n\n### Execution methods\n\n| Method | Returns |\n|--------|---------|\n| `.all(results)` | Populates array |\n| `.one(result)` | Single record |\n| `.execute()` | For INSERT\u002FUPDATE\u002FDELETE |\n\n### Raw queries\n\n```js\n$app.db().newQuery(\"SELECT * FROM posts WHERE status = {:status}\")\n    .bind({ status: \"active\" })\n    .all(results)\n```\n\n**Always use named params `{:param}`** — never concatenate SQL strings.\n\n### $dbx expressions\n\n```js\n$dbx.hashExp({ field: \"value\" })           \u002F\u002F field = \"value\"\n$dbx.hashExp({ field: [\"a\", \"b\"] })        \u002F\u002F field IN (\"a\", \"b\")\n$dbx.not($dbx.hashExp({ field: \"value\" })) \u002F\u002F NOT (field = \"value\")\n$dbx.and(expr1, expr2)                     \u002F\u002F expr1 AND expr2\n$dbx.or(expr1, expr2)                      \u002F\u002F expr1 OR expr2\n$dbx.like(\"field\", \"val\")                  \u002F\u002F field LIKE \"%val%\"\n$dbx.orLike(\"field\", \"a\", \"b\")            \u002F\u002F field LIKE \"%a%\" OR field LIKE \"%b%\"\n$dbx.notLike(\"field\", \"val\")              \u002F\u002F field NOT LIKE \"%val%\"\n$dbx.in(\"field\", \"a\", \"b\", \"c\")           \u002F\u002F field IN (\"a\", \"b\", \"c\")\n$dbx.notIn(\"field\", \"a\", \"b\")             \u002F\u002F field NOT IN (\"a\", \"b\")\n$dbx.between(\"field\", 1, 10)              \u002F\u002F field BETWEEN 1 AND 10\n$dbx.exists($dbx.exp(\"SELECT 1 FROM t WHERE ...\"))\n$dbx.exp(\"raw SQL expression\", optionalParams)\n```\n\n### Transactions\n\n```js\n$app.runInTransaction(function(txApp) {\n    \u002F\u002F use txApp instead of $app inside transaction\n    var record = txApp.findRecordById(\"posts\", \"RECORD_ID\")\n    record.set(\"views\", record.getInt(\"views\") + 1)\n    txApp.save(record)\n})\n```\n\n## Record Operations\n\n### Find records\n\n```js\n\u002F\u002F By ID\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\n\n\u002F\u002F By field value\nvar record = $app.findFirstRecordByData(\"users\", \"email\", \"user@example.com\")\n\n\u002F\u002F By filter expression (same syntax as API rules)\nvar record = $app.findFirstRecordByFilter(\"posts\", \"slug = {:slug}\", { slug: \"my-post\" })\n\n\u002F\u002F Multiple records with filter\nvar records = $app.findRecordsByFilter(\n    \"posts\",                    \u002F\u002F collection\n    \"status = 'active'\",        \u002F\u002F filter\n    \"-created\",                 \u002F\u002F sort\n    10,                         \u002F\u002F limit\n    0                           \u002F\u002F offset\n)\n\n\u002F\u002F All records (no limit)\nvar records = $app.findAllRecords(\"posts\", $dbx.hashExp({ status: \"active\" }))\n\n\u002F\u002F Count\nvar total = $app.countRecords(\"posts\", $dbx.hashExp({ status: \"active\" }))\n```\n\n### Create records\n\n```js\nvar collection = $app.findCollectionByNameOrId(\"posts\")\nvar record = new Record(collection)\nrecord.set(\"title\", \"My Post\")\nrecord.set(\"author\", \"USER_ID\")\nrecord.set(\"tags\", [\"tag1\", \"tag2\"])  \u002F\u002F multi-relation\n$app.save(record)\n\u002F\u002F record.id is now set\n```\n\n### Update records\n\n```js\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\nrecord.set(\"title\", \"Updated Title\")\n$app.save(record)\n```\n\n### Delete records\n\n```js\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\n$app.delete(record)\n```\n\n### Record getters\n\n```js\nrecord.id\nrecord.getString(\"title\")\nrecord.getInt(\"count\")\nrecord.getFloat(\"price\")\nrecord.getBool(\"active\")\nrecord.getStringSlice(\"tags\")  \u002F\u002F for multi-valued fields\nrecord.getDateTime(\"created\")  \u002F\u002F returns DateTime object\nrecord.get(\"field\")            \u002F\u002F raw interface{} value\n```\n\n### Expand relations\n\n```js\n$app.expandRecord(record, [\"author\", \"tags\"], null)\nvar author = record.expandedOne(\"author\")   \u002F\u002F single relation\nvar tags = record.expandedAll(\"tags\")        \u002F\u002F multi relation\n```\n\n### File operations\n\n```js\n\u002F\u002F Assign file from path\nvar file = $filesystem.fileFromPath(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\nrecord.set(\"document\", file)\n\n\u002F\u002F Assign file from bytes\nvar file = $filesystem.fileFromBytes(byteArray, \"report.pdf\")\nrecord.set(\"document\", file)\n\n\u002F\u002F Assign file from URL\nvar file = $filesystem.fileFromURL(\"https:\u002F\u002Fexample.com\u002Ffile.pdf\")\nrecord.set(\"document\", file)\n\n$app.save(record)\n```\n\n## Cron Jobs\n\n```js\ncronAdd(\"daily_cleanup\", \"0 3 * * *\", function() {\n    \u002F\u002F runs every day at 3:00 AM\n    var old = $app.findRecordsByFilter(\"temp\", \"created \u003C @now - 30d\", \"\", 0, 0)\n    for (var i = 0; i \u003C old.length; i++) {\n        $app.delete(old[i])\n    }\n})\n\ncronRemove(\"daily_cleanup\")  \u002F\u002F remove a previously registered job\n```\n\nCron expressions: `minute hour day month weekday`\nPreview registered crons: Dashboard > Settings > Crons\n\n## Email\n\n```js\nvar message = new MailerMessage()\nmessage.from = { address: $app.settings().meta.senderAddress, name: $app.settings().meta.senderName }\nmessage.to = [{ address: \"user@example.com\", name: \"User\" }]\nmessage.subject = \"Hello\"\nmessage.html = \"\u003Ch1>Hello World\u003C\u002Fh1>\"\n\u002F\u002F message.bcc, message.cc — optional arrays\n\u002F\u002F message.attachments — optional\n\n$app.newMailClient().send(message)\n```\n\n### Customize system emails\n\n```js\nonMailerRecordVerificationSend(function(e) {\n    \u002F\u002F e.record, e.message\n    e.message.subject = \"Custom verification subject\"\n    e.message.html = \"\u003Cp>Custom HTML with token: \" + e.meta.token + \"\u003C\u002Fp>\"\n    return e.next()\n}, \"users\")\n\n\u002F\u002F Similar hooks: onMailerRecordResetPasswordSend, onMailerRecordEmailChangeSend, onMailerRecordOTPSend\n```\n\n## HTTP Client\n\n```js\nvar res = $http.send({\n    url: \"https:\u002F\u002Fapi.example.com\u002Fdata\",\n    method: \"POST\",\n    body: JSON.stringify({ key: \"value\" }),\n    headers: { \"Content-Type\": \"application\u002Fjson\", \"Authorization\": \"Bearer TOKEN\" },\n    timeout: 30  \u002F\u002F seconds\n})\n\n\u002F\u002F Response\nres.statusCode  \u002F\u002F number\nres.json         \u002F\u002F parsed JSON (if applicable)\nres.headers      \u002F\u002F object\nres.cookies      \u002F\u002F object\nres.body         \u002F\u002F raw string\n\n\u002F\u002F Multipart upload\nvar formData = new FormData()\nformData.append(\"file\", $filesystem.fileFromPath(\"\u002Fpath\u002Fto\u002Ffile.pdf\"))\nformData.append(\"name\", \"test\")\n\nvar res = $http.send({\n    url: \"https:\u002F\u002Fapi.example.com\u002Fupload\",\n    method: \"POST\",\n    body: formData\n})\n```\n\n**No streaming support** in `$http.send()`.\n\n## Error Types\n\n```js\nthrow new BadRequestError(\"message\", optionalData)     \u002F\u002F 400\nthrow new UnauthorizedError(\"message\", optionalData)    \u002F\u002F 401\nthrow new ForbiddenError(\"message\", optionalData)       \u002F\u002F 403\nthrow new NotFoundError(\"message\", optionalData)        \u002F\u002F 404\nthrow new TooManyRequestsError(\"message\", optionalData) \u002F\u002F 429\nthrow new InternalServerError(\"message\", optionalData)  \u002F\u002F 500\nthrow new ApiError(statusCode, \"message\", optionalData) \u002F\u002F custom status\n\n\u002F\u002F Validation errors (for onRecordValidate)\nnew ValidationError(\"field_name\", \"error message\")\n```\n\n## Global Objects\n\n| Object | Purpose |\n|--------|---------|\n| `$app` | Main app instance — DB, records, collections, settings |\n| `$apis` | API middleware helpers |\n| `$security` | JWT, encryption, random string generation |\n| `$os` | OS operations: `$os.exec()`, `$os.readDir()`, `$os.tempDir()` |\n| `$http` | HTTP client |\n| `$filesystem` | File helpers (`fileFromPath`, `fileFromBytes`, `fileFromURL`) |\n| `$dbx` | SQL expression builders |\n\n### $security examples\n\n```js\nvar token = $security.randomString(32)\nvar hash = $security.hs256(\"data\", \"secret\")\nvar encrypted = $security.encrypt(\"data\", \"encryptionKey\")\nvar decrypted = $security.decrypt(encrypted, \"encryptionKey\")\n```\n\n### $os examples\n\n```js\nvar result = $os.exec(\"ls\", [\"-la\", \"\u002Ftmp\"])  \u002F\u002F returns { code, output }\nvar files = $os.readDir(\"\u002Fpath\")\nvar tmp = $os.tempDir(\"prefix\")\n```\n\n## Common Patterns\n\n### Auto-assign author on create\n\n```js\nonRecordCreateExecute(function(e) {\n    if (e.auth) {\n        e.record.set(\"author\", e.auth.id)\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Cascade custom logic on delete\n\n```js\nonRecordDeleteExecute(function(e) {\n    \u002F\u002F Clean up related data not handled by cascadeDelete\n    var comments = $app.findRecordsByFilter(\"comments\", \"post = {:id}\", \"-created\", 0, 0, { id: e.record.id })\n    for (var i = 0; i \u003C comments.length; i++) {\n        $app.delete(comments[i])\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Rate limiting per user\n\n```js\nrouterAdd(\"POST\", \"\u002Fapi\u002Fexpensive-action\", function(e) {\n    var recent = $app.countRecords(\"actions\",\n        $dbx.hashExp({ user: e.auth.id }),\n        $dbx.exp(\"created > {:cutoff}\", { cutoff: new DateTime().sub(1 * 60) })  \u002F\u002F last minute\n    )\n    if (recent >= 5) {\n        throw new TooManyRequestsError(\"Rate limit exceeded\")\n    }\n    \u002F\u002F proceed with action\n    return e.json(200, { ok: true })\n}, $apis.requireAuth())\n```\n\n### Webhook on record change\n\n```js\nonRecordCreateAfterSuccessExecute(function(e) {\n    try {\n        $http.send({\n            url: \"https:\u002F\u002Fhooks.example.com\u002Fwebhook\",\n            method: \"POST\",\n            body: JSON.stringify({\n                event: \"record.create\",\n                collection: e.record.collection().name,\n                record: e.record\n            }),\n            headers: { \"Content-Type\": \"application\u002Fjson\" },\n            timeout: 10\n        })\n    } catch (err) {\n        console.log(\"Webhook failed:\", err)\n    }\n})\n```\n","# PocketBase Server-Side JavaScript (pb_hooks)\n\n## Runtime Basics\n\n- Files go in `pb_hooks\u002F*.pb.js` (must end with `.pb.js`)\n- Engine: **goja** — ES5.1 + some ES6. **No ES6 modules** (`import`\u002F`export`), **no async\u002Fawait**, **no arrow functions in older versions**. Use `function(){}` and CommonJS `require()`.\n- Each file is loaded on app start and on hot-reload\n- `__hooks` — absolute path to the pb_hooks directory\n- TypeScript declarations: `pb_data\u002Ftypes.d.ts` (auto-generated, useful for IDE support)\n- `--hooksPool=25` flag controls concurrent JS goroutines (default: 25)\n- Each handler runs in an isolated context — no shared mutable state between requests\n\n## Routing\n\n### Adding routes\n\n```js\nrouterAdd(\"GET\", \"\u002Fapi\u002Fhello\u002F{name}\", function(e) {\n    var name = e.request.pathValue(\"name\")\n    return e.json(200, { \"message\": \"Hello \" + name })\n}, \u002F* optional middleware *\u002F)\n```\n\n### Path patterns\n- `{name}` — named path parameter\n- `{path...}` — wildcard (matches rest of path)\n- `{$}` — exact match (no trailing slash)\n\n### Response methods\n\n| Method | Usage |\n|--------|-------|\n| `e.json(status, data)` | JSON response |\n| `e.string(status, text)` | Plain text |\n| `e.html(status, html)` | HTML response |\n| `e.redirect(status, url)` | Redirect (301\u002F302) |\n| `e.blob(status, contentType, bytes)` | Binary data |\n| `e.stream(status, contentType, reader)` | Streaming response |\n| `e.noContent(status)` | No body (204) |\n\n### Reading request data\n\n```js\n\u002F\u002F Body (JSON)\nvar body = new DynamicModel({ name: \"\", age: 0 })\ne.bindBody(body)\n\n\u002F\u002F Query params\nvar page = e.request.url.query().get(\"page\")\n\n\u002F\u002F Headers\nvar token = e.request.header.get(\"Authorization\")\n\n\u002F\u002F Uploaded files\nvar files = e.findUploadedFiles(\"document\")  \u002F\u002F returns array of *filesystem.File\n\n\u002F\u002F Auth state\nvar user = e.auth          \u002F\u002F current auth record or null\nvar isSuper = e.hasSuperuserAuth()\n```\n\n## Middleware\n\n### Built-in middleware\n\n```js\nrouterAdd(\"GET\", \"\u002Fapi\u002Fprotected\", handler,\n    $apis.requireAuth(),                \u002F\u002F any authenticated user\n    \u002F\u002F OR\n    $apis.requireAuth(\"users\"),         \u002F\u002F only \"users\" collection\n    \u002F\u002F OR\n    $apis.requireSuperuserAuth(),       \u002F\u002F superusers only\n    \u002F\u002F OR\n    $apis.requireGuestOnly(),           \u002F\u002F unauthenticated only\n    \u002F\u002F OR\n    $apis.bodyLimit(5 * 1024 * 1024),   \u002F\u002F 5MB body limit\n    \u002F\u002F OR\n    $apis.gzip()                        \u002F\u002F gzip compression\n)\n```\n\n### Global middleware\n\n```js\nrouterUse(function(e) {\n    \u002F\u002F runs before every request\n    console.log(e.request.method, e.request.url.path)\n    return e.next()  \u002F\u002F MUST call e.next() to continue\n})\n```\n\n### Custom route middleware\n\n```js\nfunction myMiddleware(e) {\n    \u002F\u002F pre-processing\n    var result = e.next()  \u002F\u002F call next handler\n    \u002F\u002F post-processing\n    return result\n}\n\nrouterAdd(\"GET\", \"\u002Fapi\u002Ftest\", handler, myMiddleware)\n```\n\nPriority: middleware runs in order — first registered, first executed.\n\n## Event Hooks\n\n### Record lifecycle\n\nEach record event has 3 variants:\n- `onRecord*Execute` — wraps the default action. Call `e.next()` to proceed.\n- `onRecord*AfterSuccess` — runs after successful execution\n- `onRecord*AfterError` — runs after execution error\n\n```js\n\u002F\u002F Before\u002Fduring create\nonRecordCreateExecute(function(e) {\n    \u002F\u002F e.record — the record being created\n    e.record.set(\"status\", \"pending\")\n    return e.next()  \u002F\u002F proceed with creation\n}, \"posts\")  \u002F\u002F optional collection filter\n\n\u002F\u002F After successful create\nonRecordAfterCreateSuccess(function(e) {\n    \u002F\u002F e.record — the created record (has ID now)\n    console.log(\"Created:\", e.record.id)\n}, \"posts\")\n\n\u002F\u002F After failed create\nonRecordAfterCreateError(function(e) {\n    \u002F\u002F e.error — the error\n    console.log(\"Failed:\", e.error)\n}, \"posts\")\n```\n\n### All record hooks\n\n| Hook | Event object fields |\n|------|-------------------|\n| `onRecordCreateExecute` | `e.record` |\n| `onRecordUpdateExecute` | `e.record` |\n| `onRecordDeleteExecute` | `e.record` |\n| `onRecordAfterCreateSuccess` | `e.record` — after successful create |\n| `onRecordAfterUpdateSuccess` | `e.record` — after successful update |\n| `onRecordAfterDeleteSuccess` | `e.record` — after successful delete |\n| `onRecordAfterCreateError` | `e.record`, `e.error` — after failed create |\n| `onRecordAfterUpdateError` | `e.record`, `e.error` — after failed update |\n| `onRecordAfterDeleteError` | `e.record`, `e.error` — after failed delete |\n| `onRecordValidate` | `e.record` — add custom validation errors |\n| `onRecordEnrich` | `e.record` — modify API response (hide\u002Fadd fields) |\n| `onRecordsListRequest` | `e.records`, `e.result` — modify list response |\n| `onRecordRequestCreate` | `e.record` — during API create request |\n| `onRecordRequestUpdate` | `e.record` — during API update request |\n| `onRecordRequestDelete` | `e.record` — during API delete request |\n\n### Auth hooks\n\n```js\nonRecordAuthWithPasswordRequest(function(e) {\n    \u002F\u002F e.record — the auth record\n    \u002F\u002F e.password — the provided password\n    return e.next()\n}, \"users\")\n\nonRecordAuthWithOAuth2Request(function(e) {\n    \u002F\u002F e.record — the auth record (may be new)\n    \u002F\u002F e.oAuth2User — OAuth2 user data\n    \u002F\u002F e.isNewRecord — true if first OAuth2 login\n    return e.next()\n}, \"users\")\n\nonRecordAuthWithOTPRequest(function(e) {\n    \u002F\u002F e.record — the auth record\n    return e.next()\n}, \"users\")\n\nonRecordAuthRefreshRequest(function(e) {\n    return e.next()\n}, \"users\")\n```\n\n### Realtime hooks\n\n```js\nonRealtimeConnectRequest(function(e) {\n    \u002F\u002F e.client — the SSE client\n    \u002F\u002F e.idleTimeout — connection timeout\n    return e.next()\n})\n\nonRealtimeSubscribeRequest(function(e) {\n    \u002F\u002F e.client\n    \u002F\u002F e.subscriptions — requested subscriptions\n    return e.next()\n})\n```\n\n### Other hooks\n\n```js\nonFileDownloadRequest(function(e) {\n    \u002F\u002F e.record, e.fileField, e.servedPath, e.servedName\n    return e.next()\n}, \"documents\")\n\nonBatchRequest(function(e) {\n    \u002F\u002F e.batch — array of sub-requests\n    return e.next()\n})\n\nonCollectionCreateExecute(function(e) {\n    \u002F\u002F e.collection\n    return e.next()\n})\n\n\u002F\u002F App lifecycle\nonBootstrap(function(e) {\n    \u002F\u002F runs once on app start (after DB is ready)\n    return e.next()\n})\n\nonTerminate(function(e) {\n    \u002F\u002F runs on graceful shutdown\n    return e.next()\n})\n```\n\n### Validation hook\n\n```js\nonRecordValidate(function(e) {\n    if (e.record.getString(\"title\").length \u003C 3) {\n        e.error = new ValidationError(\"title\", \"Title must be at least 3 characters\")\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Enrich hook (modify API response)\n\n```js\nonRecordEnrich(function(e) {\n    \u002F\u002F Hide field from non-owners\n    if (!e.requestInfo.auth || e.requestInfo.auth.id !== e.record.getString(\"author\")) {\n        e.record.hide(\"private_notes\")\n    }\n    \u002F\u002F Add computed field\n    e.record.withCustomData(true)\n    e.record.set(\"displayName\", e.record.getString(\"first\") + \" \" + e.record.getString(\"last\"))\n    return e.next()\n}, \"users\")\n```\n\n## Database\n\n### Query builder\n\n```js\nvar results = arrayOf(new DynamicModel({ id: \"\", title: \"\", count: 0 }))\n\n$app.db()\n    .select(\"id\", \"title\", \"COUNT(comments) as count\")\n    .from(\"posts\")\n    .where($dbx.hashExp({ status: \"active\" }))\n    .andWhere($dbx.like(\"title\", \"hello\"))\n    .orderBy(\"created DESC\")\n    .limit(10)\n    .offset(0)\n    .all(results)  \u002F\u002F populates results array\n```\n\n### Execution methods\n\n| Method | Returns |\n|--------|---------|\n| `.all(results)` | Populates array |\n| `.one(result)` | Single record |\n| `.execute()` | For INSERT\u002FUPDATE\u002FDELETE |\n\n### Raw queries\n\n```js\n$app.db().newQuery(\"SELECT * FROM posts WHERE status = {:status}\")\n    .bind({ status: \"active\" })\n    .all(results)\n```\n\n**Always use named params `{:param}`** — never concatenate SQL strings.\n\n### $dbx expressions\n\n```js\n$dbx.hashExp({ field: \"value\" })           \u002F\u002F field = \"value\"\n$dbx.hashExp({ field: [\"a\", \"b\"] })        \u002F\u002F field IN (\"a\", \"b\")\n$dbx.not($dbx.hashExp({ field: \"value\" })) \u002F\u002F NOT (field = \"value\")\n$dbx.and(expr1, expr2)                     \u002F\u002F expr1 AND expr2\n$dbx.or(expr1, expr2)                      \u002F\u002F expr1 OR expr2\n$dbx.like(\"field\", \"val\")                  \u002F\u002F field LIKE \"%val%\"\n$dbx.orLike(\"field\", \"a\", \"b\")            \u002F\u002F field LIKE \"%a%\" OR field LIKE \"%b%\"\n$dbx.notLike(\"field\", \"val\")              \u002F\u002F field NOT LIKE \"%val%\"\n$dbx.in(\"field\", \"a\", \"b\", \"c\")           \u002F\u002F field IN (\"a\", \"b\", \"c\")\n$dbx.notIn(\"field\", \"a\", \"b\")             \u002F\u002F field NOT IN (\"a\", \"b\")\n$dbx.between(\"field\", 1, 10)              \u002F\u002F field BETWEEN 1 AND 10\n$dbx.exists($dbx.exp(\"SELECT 1 FROM t WHERE ...\"))\n$dbx.exp(\"raw SQL expression\", optionalParams)\n```\n\n### Transactions\n\n```js\n$app.runInTransaction(function(txApp) {\n    \u002F\u002F use txApp instead of $app inside transaction\n    var record = txApp.findRecordById(\"posts\", \"RECORD_ID\")\n    record.set(\"views\", record.getInt(\"views\") + 1)\n    txApp.save(record)\n})\n```\n\n## Record Operations\n\n### Find records\n\n```js\n\u002F\u002F By ID\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\n\n\u002F\u002F By field value\nvar record = $app.findFirstRecordByData(\"users\", \"email\", \"user@example.com\")\n\n\u002F\u002F By filter expression (same syntax as API rules)\nvar record = $app.findFirstRecordByFilter(\"posts\", \"slug = {:slug}\", { slug: \"my-post\" })\n\n\u002F\u002F Multiple records with filter\nvar records = $app.findRecordsByFilter(\n    \"posts\",                    \u002F\u002F collection\n    \"status = 'active'\",        \u002F\u002F filter\n    \"-created\",                 \u002F\u002F sort\n    10,                         \u002F\u002F limit\n    0                           \u002F\u002F offset\n)\n\n\u002F\u002F All records (no limit)\nvar records = $app.findAllRecords(\"posts\", $dbx.hashExp({ status: \"active\" }))\n\n\u002F\u002F Count\nvar total = $app.countRecords(\"posts\", $dbx.hashExp({ status: \"active\" }))\n```\n\n### Create records\n\n```js\nvar collection = $app.findCollectionByNameOrId(\"posts\")\nvar record = new Record(collection)\nrecord.set(\"title\", \"My Post\")\nrecord.set(\"author\", \"USER_ID\")\nrecord.set(\"tags\", [\"tag1\", \"tag2\"])  \u002F\u002F multi-relation\n$app.save(record)\n\u002F\u002F record.id is now set\n```\n\n### Update records\n\n```js\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\nrecord.set(\"title\", \"Updated Title\")\n$app.save(record)\n```\n\n### Delete records\n\n```js\nvar record = $app.findRecordById(\"posts\", \"RECORD_ID\")\n$app.delete(record)\n```\n\n### Record getters\n\n```js\nrecord.id\nrecord.getString(\"title\")\nrecord.getInt(\"count\")\nrecord.getFloat(\"price\")\nrecord.getBool(\"active\")\nrecord.getStringSlice(\"tags\")  \u002F\u002F for multi-valued fields\nrecord.getDateTime(\"created\")  \u002F\u002F returns DateTime object\nrecord.get(\"field\")            \u002F\u002F raw interface{} value\n```\n\n### Expand relations\n\n```js\n$app.expandRecord(record, [\"author\", \"tags\"], null)\nvar author = record.expandedOne(\"author\")   \u002F\u002F single relation\nvar tags = record.expandedAll(\"tags\")        \u002F\u002F multi relation\n```\n\n### File operations\n\n```js\n\u002F\u002F Assign file from path\nvar file = $filesystem.fileFromPath(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\nrecord.set(\"document\", file)\n\n\u002F\u002F Assign file from bytes\nvar file = $filesystem.fileFromBytes(byteArray, \"report.pdf\")\nrecord.set(\"document\", file)\n\n\u002F\u002F Assign file from URL\nvar file = $filesystem.fileFromURL(\"https:\u002F\u002Fexample.com\u002Ffile.pdf\")\nrecord.set(\"document\", file)\n\n$app.save(record)\n```\n\n## Cron Jobs\n\n```js\ncronAdd(\"daily_cleanup\", \"0 3 * * *\", function() {\n    \u002F\u002F runs every day at 3:00 AM\n    var old = $app.findRecordsByFilter(\"temp\", \"created \u003C @now - 30d\", \"\", 0, 0)\n    for (var i = 0; i \u003C old.length; i++) {\n        $app.delete(old[i])\n    }\n})\n\ncronRemove(\"daily_cleanup\")  \u002F\u002F remove a previously registered job\n```\n\nCron expressions: `minute hour day month weekday`\nPreview registered crons: Dashboard > Settings > Crons\n\n## Email\n\n```js\nvar message = new MailerMessage()\nmessage.from = { address: $app.settings().meta.senderAddress, name: $app.settings().meta.senderName }\nmessage.to = [{ address: \"user@example.com\", name: \"User\" }]\nmessage.subject = \"Hello\"\nmessage.html = \"\u003Ch1>Hello World\u003C\u002Fh1>\"\n\u002F\u002F message.bcc, message.cc — optional arrays\n\u002F\u002F message.attachments — optional\n\n$app.newMailClient().send(message)\n```\n\n### Customize system emails\n\n```js\nonMailerRecordVerificationSend(function(e) {\n    \u002F\u002F e.record, e.message\n    e.message.subject = \"Custom verification subject\"\n    e.message.html = \"\u003Cp>Custom HTML with token: \" + e.meta.token + \"\u003C\u002Fp>\"\n    return e.next()\n}, \"users\")\n\n\u002F\u002F Similar hooks: onMailerRecordResetPasswordSend, onMailerRecordEmailChangeSend, onMailerRecordOTPSend\n```\n\n## HTTP Client\n\n```js\nvar res = $http.send({\n    url: \"https:\u002F\u002Fapi.example.com\u002Fdata\",\n    method: \"POST\",\n    body: JSON.stringify({ key: \"value\" }),\n    headers: { \"Content-Type\": \"application\u002Fjson\", \"Authorization\": \"Bearer TOKEN\" },\n    timeout: 30  \u002F\u002F seconds\n})\n\n\u002F\u002F Response\nres.statusCode  \u002F\u002F number\nres.json         \u002F\u002F parsed JSON (if applicable)\nres.headers      \u002F\u002F object\nres.cookies      \u002F\u002F object\nres.body         \u002F\u002F raw string\n\n\u002F\u002F Multipart upload\nvar formData = new FormData()\nformData.append(\"file\", $filesystem.fileFromPath(\"\u002Fpath\u002Fto\u002Ffile.pdf\"))\nformData.append(\"name\", \"test\")\n\nvar res = $http.send({\n    url: \"https:\u002F\u002Fapi.example.com\u002Fupload\",\n    method: \"POST\",\n    body: formData\n})\n```\n\n**No streaming support** in `$http.send()`.\n\n## Error Types\n\n```js\nthrow new BadRequestError(\"message\", optionalData)     \u002F\u002F 400\nthrow new UnauthorizedError(\"message\", optionalData)    \u002F\u002F 401\nthrow new ForbiddenError(\"message\", optionalData)       \u002F\u002F 403\nthrow new NotFoundError(\"message\", optionalData)        \u002F\u002F 404\nthrow new TooManyRequestsError(\"message\", optionalData) \u002F\u002F 429\nthrow new InternalServerError(\"message\", optionalData)  \u002F\u002F 500\nthrow new ApiError(statusCode, \"message\", optionalData) \u002F\u002F custom status\n\n\u002F\u002F Validation errors (for onRecordValidate)\nnew ValidationError(\"field_name\", \"error message\")\n```\n\n## Global Objects\n\n| Object | Purpose |\n|--------|---------|\n| `$app` | Main app instance — DB, records, collections, settings |\n| `$apis` | API middleware helpers |\n| `$security` | JWT, encryption, random string generation |\n| `$os` | OS operations: `$os.exec()`, `$os.readDir()`, `$os.tempDir()` |\n| `$http` | HTTP client |\n| `$filesystem` | File helpers (`fileFromPath`, `fileFromBytes`, `fileFromURL`) |\n| `$dbx` | SQL expression builders |\n\n### $security examples\n\n```js\nvar token = $security.randomString(32)\nvar hash = $security.hs256(\"data\", \"secret\")\nvar encrypted = $security.encrypt(\"data\", \"encryptionKey\")\nvar decrypted = $security.decrypt(encrypted, \"encryptionKey\")\n```\n\n### $os examples\n\n```js\nvar result = $os.exec(\"ls\", [\"-la\", \"\u002Ftmp\"])  \u002F\u002F returns { code, output }\nvar files = $os.readDir(\"\u002Fpath\")\nvar tmp = $os.tempDir(\"prefix\")\n```\n\n## Common Patterns\n\n### Auto-assign author on create\n\n```js\nonRecordCreateExecute(function(e) {\n    if (e.auth) {\n        e.record.set(\"author\", e.auth.id)\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Cascade custom logic on delete\n\n```js\nonRecordDeleteExecute(function(e) {\n    \u002F\u002F Clean up related data not handled by cascadeDelete\n    var comments = $app.findRecordsByFilter(\"comments\", \"post = {:id}\", \"-created\", 0, 0, { id: e.record.id })\n    for (var i = 0; i \u003C comments.length; i++) {\n        $app.delete(comments[i])\n    }\n    return e.next()\n}, \"posts\")\n```\n\n### Rate limiting per user\n\n```js\nrouterAdd(\"POST\", \"\u002Fapi\u002Fexpensive-action\", function(e) {\n    var recent = $app.countRecords(\"actions\",\n        $dbx.hashExp({ user: e.auth.id }),\n        $dbx.exp(\"created > {:cutoff}\", { cutoff: new DateTime().sub(1 * 60) })  \u002F\u002F last minute\n    )\n    if (recent >= 5) {\n        throw new TooManyRequestsError(\"Rate limit exceeded\")\n    }\n    \u002F\u002F proceed with action\n    return e.json(200, { ok: true })\n}, $apis.requireAuth())\n```\n\n### Webhook on record change\n\n```js\nonRecordCreateAfterSuccessExecute(function(e) {\n    try {\n        $http.send({\n            url: \"https:\u002F\u002Fhooks.example.com\u002Fwebhook\",\n            method: \"POST\",\n            body: JSON.stringify({\n                event: \"record.create\",\n                collection: e.record.collection().name,\n                record: e.record\n            }),\n            headers: { \"Content-Type\": \"application\u002Fjson\" },\n            timeout: 10\n        })\n    } catch (err) {\n        console.log(\"Webhook failed:\", err)\n    }\n})\n```\n",{"name":5,"description":7},"main","34fa6acf794b9a6310d298cbb8fb8c9420a5edcf","cli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-hooks",2,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates","https:\u002F\u002Fgithub.com\u002Ftransaurus","Automated works of Page Turner","2026-03-28 10:12:59",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill \"PocketBase Hooks\"",{"tool":57,"command":58},"bunx","bunx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill \"PocketBase Hooks\"",{"tool":60,"command":61},"pnpm","pnpm dlx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill \"PocketBase Hooks\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-hooks\u002FSKILL.md",true,[],[66,90,111,133,153,176],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M6JMRJR3BE0HGWFWDZSB853S","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\u002FSKILL.md",[],[73,74,75,76,30,77,78,79,80,81,31,82,83,84,85,86,87,88,23,89],"zapier make patterns","patterns","make","zapier","workflow","automation","code","integrations","business","power","complexity","platform","apps","how to","No-Code","which","spawner",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":38},"01M6JMR8YK6SWPCTG1MCQTMN9S","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[92,97,98,99,100,101,102,103,104,105,106,107,31,108,109,110],"cli","github","commit","pull request","openai","pull","push","flow","open","gh","user","only","stage","github cli",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":38},"01M6JMQNFE64ZASQK90HARRXW8","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[],[77,78,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,24,23,89],"Workflow Automation","ai agents","accessibility","workflows","apache","execution","inngest","parallel","orchestrator","resume","n8n","payment","worker","scripts","temporal",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":38},"01M6JMQDYJ0XETERPHGDR3EVGN","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[140,141,142,143,144,121,145,122,123,146,31,147,148,149,150,151,152,24,23,89],"dev","trigger dev","trigger","design","typescript","async execution","first","async","developer experience","expert","task","background jobs","long",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"01M6JMQ5J6KK3GSX9FJCWWK6G6","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[],[160,161,162,24,163,77,164,165,166,167,168,169,31,170,171,172,173,174,175,23],"planning with files","planning","files","with files","storage","tasks","markdown","knowledge","projects","work","manus","structured output","progress","transforms","multi","output",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":38},"01M6JMPWAT60RXXNEC4V9TRBRS","n8n-workflow-patterns","Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-workflow-patterns\u002FSKILL.md",[],[77,183,128,184,74,185,186,121,187,165,161,35,188,189,190,191,192,193,194,195],"n8n workflow patterns","workflow patterns","n8n workflow","ai agent","architecture","api","planning workflow","structure","database operations","webhook","processing","http api","scheduled"]