vybekiit 0.7.19 → 0.7.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/bin.js +11 -5
  2. package/dist/global-skills/aws-cloudformation/SKILL.md +173 -7
  3. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +107 -45
  4. package/dist/global-skills/aws-cloudformation/references/lookup-resource-properties.script.md +1 -1
  5. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +310 -0
  6. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +357 -0
  7. package/dist/global-skills/aws-cloudformation/references/template-safety-guidance.md +174 -0
  8. package/dist/global-skills/aws-cloudformation/references/validate-cloudformation-template.script.md +20 -2
  9. package/dist/global-skills/aws-serverless/SKILL.md +16 -1
  10. package/dist/global-skills/eas-simulator/references/controllers.md +21 -1
  11. package/dist/global-skills/eas-simulator/references/run-your-app.md +103 -69
  12. package/dist/global-skills/eas-simulator/references/troubleshooting.md +7 -4
  13. package/dist/global-skills/expo-skill-eval/scripts/check-static.sh +0 -0
  14. package/dist/global-skills/expo-skill-eval/scripts/clean-fixture.sh +0 -0
  15. package/dist/global-skills/expo-skill-eval/scripts/latest-sdk.sh +0 -0
  16. package/dist/global-skills/expo-skill-eval/scripts/make-fixture.sh +0 -0
  17. package/dist/global-skills/expo-skill-eval/scripts/make-workspace.sh +0 -0
  18. package/dist/global-skills/expo-skill-eval/scripts/snapshot-android.sh +0 -0
  19. package/dist/global-skills/expo-skill-eval/scripts/snapshot-ios.sh +0 -0
  20. package/dist/global-skills/expo-skill-eval/scripts/snapshot-web.sh +0 -0
  21. package/dist/global-skills/neon/SKILL.md +40 -17
  22. package/dist/global-skills/neon/references/claimable-neon.md +91 -0
  23. package/dist/global-skills/neon-object-storage/SKILL.md +11 -4
  24. package/dist/global-skills/onboarding/SKILL.md +5 -1
  25. package/dist/global-skills/resend/references/api-keys.md +1 -1
  26. package/dist/global-skills/resend/references/segments.md +19 -3
  27. package/dist/global-skills/use-railway/scripts/analyze-mongo.py +0 -0
  28. package/dist/global-skills/use-railway/scripts/analyze-mysql.py +0 -0
  29. package/dist/global-skills/use-railway/scripts/analyze-postgres.py +0 -0
  30. package/dist/global-skills/use-railway/scripts/analyze-redis.py +0 -0
  31. package/dist/global-skills/use-railway/scripts/enable-pg-stats.py +0 -0
  32. package/dist/global-skills/use-railway/scripts/pg-extensions.py +0 -0
  33. package/dist/global-skills/use-railway/scripts/railway-api.sh +0 -0
  34. package/package.json +22 -23
  35. package/dist/global-skills/email-best-practices/.github/workflows/sync-skills.yml +0 -30
  36. package/dist/global-skills/email-best-practices/README.md +0 -63
  37. package/dist/global-skills/email-best-practices/tests/README.md +0 -35
  38. package/dist/global-skills/email-best-practices/tests/scenarios/01-spam-deliverability.md +0 -46
  39. package/dist/global-skills/email-best-practices/tests/scenarios/02-multi-region-compliance.md +0 -48
  40. package/dist/global-skills/email-best-practices/tests/scenarios/03-retry-idempotency.md +0 -36
  41. package/dist/global-skills/email-best-practices/tests/scenarios/04-webhook-bounce-handling.md +0 -52
  42. package/dist/global-skills/email-best-practices/tests/scenarios/05-new-saas-email-plan.md +0 -51
@@ -9,7 +9,12 @@ description: >-
9
9
  are the trigger: "object storage" or "S3", "buckets", "serverless functions",
10
10
  "AI gateway", "call an LLM", "logs", "branch logs", "query logs",
11
11
  "log export", "Loki", "Grafana", "observability", "telemetry", "postgres",
12
- "database", or "backend".
12
+ "database", or "backend". Also use when there is no Neon account yet, the
13
+ user cannot sign in or provide an API key right now and needs a project they
14
+ can claim later, or the user asks for a throwaway DATABASE_URL, Claimable Neon,
15
+ Claimable Postgres, neon.new, claimable.neon.tech, instant Postgres, a no-signup
16
+ database, temporary postgres, quick postgres, a no credit card database, or
17
+ npx neon-new.
13
18
  metadata:
14
19
  source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon
15
20
  ---
@@ -79,15 +84,14 @@ Neon provides a set of agent skills in addition to the official documentation. W
79
84
 
80
85
  The skills below live in the [`neondatabase/agent-skills`](https://github.com/neondatabase/agent-skills) repo:
81
86
 
82
- | Skill | Use it for |
83
- | --- | --- |
84
- | `neon-postgres` | Working with databases, including connections, schemas, queries, and autoscaling: SQL development, schema design, performance optimization, and scaling decisions. |
85
- | `neon-postgres-branches` | Choosing or creating the right branch type for dev, preview, test, or CI workflows. Use this skill as a slash command. |
86
- | `neon-object-storage` | Storing and serving files (uploads, images, blobs), including branching them with the database. |
87
- | `neon-functions` | Deploying long-running or streaming serverless functions — APIs, agents, SSE/WebSocket servers. |
88
- | `neon-ai-gateway` | Calling an LLM or routing across model providers with one credential, including discovering the branch's servable models at runtime via the OpenAI-compatible `/v1/models` endpoint. |
89
- | `claimable-postgres` | Provisioning instant, claimable temporary Postgres databases (for example, one per end user or demo). |
90
- | `neon-postgres-egress-optimizer` | Diagnosing or fixing excessive Postgres egress (network data-transfer) costs in a codebase. |
87
+ | Skill | Use it for |
88
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
89
+ | `neon-postgres` | Working with databases, including connections, schemas, queries, and autoscaling: SQL development, schema design, performance optimization, and scaling decisions. |
90
+ | `neon-postgres-branches` | Choosing or creating the right branch type for dev, preview, test, or CI workflows. Use this skill as a slash command. |
91
+ | `neon-object-storage` | Storing and serving files (uploads, images, blobs), including branching them with the database. |
92
+ | `neon-functions` | Deploying long-running or streaming serverless functions — APIs, agents, SSE/WebSocket servers. |
93
+ | `neon-ai-gateway` | Calling an LLM or routing across model providers with one credential, including discovering the branch's servable models at runtime via the OpenAI-compatible `/v1/models` endpoint. |
94
+ | `neon-postgres-egress-optimizer` | Diagnosing or fixing excessive Postgres egress (network data-transfer) costs in a codebase. |
91
95
 
92
96
  For guidance on agent platforms that provision and operate Lakebase Postgres on Neon at scale, use `neon-postgres-agent-platforms`, which lives in a separate repo: [`neondatabase/neon-for-agent-platforms`](https://github.com/neondatabase/neon-for-agent-platforms).
93
97
 
@@ -121,6 +125,15 @@ Use the same method that was used to install them. With the `skills` CLI, run th
121
125
 
122
126
  ## Getting Started with Neon
123
127
 
128
+ Before `npx neon@latest init --agent`, check whether the CLI is already authenticated:
129
+
130
+ - `NEON_API_KEY` is set
131
+ - `npx neon@latest profile list -o json` lists a profile whose `account` is not `-`
132
+
133
+ A `DEFAULT` row with `account: "-"` and `file: "missing"` is not an account. If `neon` is not installed, or `npx neon@latest profile list` cannot run, that is not an account.
134
+
135
+ If none of those hold, follow [Starting without a Neon account](#starting-without-a-neon-account).
136
+
124
137
  The easiest way to get started with Neon is to use our CLI and the project bootstrap wizard:
125
138
 
126
139
  ```bash
@@ -168,6 +181,16 @@ Useful MCP tools to initialize a project:
168
181
  - `create_project` — Creates a new Neon project in your Neon account. A project acts as a container for branches, databases, roles, and computes.
169
182
  - `get_connection_string` — Returns your database connection string.
170
183
 
184
+ ## Starting without a Neon account
185
+
186
+ If the Getting Started account check found credentials, use them. If a command waits on a browser (`Awaiting authentication in web browser`) or authentication fails, stop and ask the user to sign in (`neon auth`) or mint an API key. Prefer that over Claimable Neon unless they say otherwise.
187
+
188
+ If they cannot sign in or provide a key right now, ask before using Claimable Neon. Continue only after they say yes. That is a temporary workaround.
189
+
190
+ If there is no Neon account yet, follow [references/claimable-neon.md](https://neon.com/docs/ai/skills/neon/references/claimable-neon.md). Do not run `neon init --agent` or `neon auth` on this path; those need a human Neon account. If `neon claim` is missing, the reference has the REST fallback.
191
+
192
+ Requests for neon.new, Claimable Postgres, claimable.neon.tech, instant Postgres, or a no-signup database are the same path.
193
+
171
194
  ## Neon Infrastructure as Code
172
195
 
173
196
  `neon.ts` is Neon's branch config and infrastructure-as-code file: declare which Neon services your project's branches should have, get type-safe env vars, and program branch settings — all in TypeScript. It's the config layer for your Neon services, and it composes with the branch-first loop below. Add it with `@neon/config`:
@@ -208,12 +231,8 @@ export default defineConfig({
208
231
  auth: true,
209
232
  dataApi: true,
210
233
  preview: {
211
- functions: {
212
- /* ... */
213
- }, // see the neon-functions skill
214
- buckets: {
215
- /* ... */
216
- }, // see the neon-object-storage skill
234
+ functions: {},
235
+ buckets: {},
217
236
  aiGateway: true, // see the neon-ai-gateway skill
218
237
  },
219
238
  });
@@ -395,7 +414,11 @@ for await (const record of neon.logs.query(projectId, branchId, {
395
414
  }
396
415
 
397
416
  const { data: fields } = await neon.logs.fields(projectId, branchId);
398
- const { data: serviceNames } = await neon.logs.fieldValues(projectId, branchId, "service_name");
417
+ const { data: serviceNames } = await neon.logs.fieldValues(
418
+ projectId,
419
+ branchId,
420
+ "service_name",
421
+ );
399
422
  ```
400
423
 
401
424
  `query`'s iterator always throws on error, but `fields` and `fieldValues` follow the client's `throwOnError`, which defaults to `false` and hands back `{ data, error }`. `fieldValues` resolves to the whole response, not a bare array: read `serviceNames.values`, and treat them as an arbitrary subset whenever `serviceNames.is_truncated` is true.
@@ -0,0 +1,91 @@
1
+ # Claimable Neon
2
+
3
+ Claimable Neon provisions a temporary Neon project — Lakebase Postgres, and optionally the Data API and Managed Better Auth — before a human creates an account. The agent holds an identity assertion, not a Neon API key. A human can later claim the project into their organization.
4
+
5
+ This flow follows the [auth.md](https://claimable.neon.tech/auth.md) protocol. Fetch `https://claimable.neon.tech/auth.md` for request and response fields. REST is on `https://claimable.neon.tech`. Use the table below; do not invent other identity paths.
6
+
7
+ Use this after the neon skill account check found no account.
8
+
9
+ ## Path
10
+
11
+ 1. Install the CLI: `npm i -g neon@latest`
12
+ 2. If `neon claim --help` does not list `create`, skip to [If neon claim is missing](#if-neon-claim-is-missing).
13
+ 3. Write a `neon.ts` that declares the services you need, or skip the file and pass `--service` on create. Postgres is always requested.
14
+ 4. Create the project: `neon claim create --env-pull` (add `--service data-api --service auth` if there is no `neon.ts`)
15
+ 5. If create did not write env, pull it: `neon env pull`
16
+ 6. Use the `neon-postgres` skill for connections, schemas, and queries. Install it if it is missing: `neon skills -s neon-postgres`
17
+
18
+ Do not run `neon init --agent` or `neon auth` on this path; those need a human Neon account. `--api-key` and `--profile` are refused on `neon claim`.
19
+
20
+ ```bash
21
+ npm i -g neon@latest
22
+ neon claim --help
23
+ ```
24
+
25
+ If that help lists `create` and you need Auth or the Data API, `npm i @neon/config` and write `neon.ts`. Then `neon claim create --env-pull`.
26
+
27
+ ```typescript
28
+ import { defineConfig } from "@neon/config/v1";
29
+
30
+ export default defineConfig({
31
+ auth: true,
32
+ dataApi: true,
33
+ });
34
+ ```
35
+
36
+ `neon claim create` reads `neon.ts` when it is present. It writes provisioned vars to an existing `.env`, otherwise `.env.local`, and gitignores that file. If `.env` or `.env.local` already has a `DATABASE_URL` (or other Neon-managed keys), pass `--file <path>` or `--no-env-pull`. The identity assertion is the pre-claim credential.
37
+
38
+ Before claim, Postgres is always granted; Auth and the Data API are granted when requested. Functions, Object Storage, and AI Gateway come back with `granted: false` and `reason: "requires_claim"`. The CLI prints those as `denied_capabilities`. Report what you were given. Do not retry or strip them.
39
+
40
+ After create, report the `project_id`, `project_expires_at`, and any denied capabilities. Do not invent the window.
41
+
42
+ ## Claim
43
+
44
+ Do not mint a claim URL until the human is ready. Opening the URL does not freeze access. Continuing to Neon starts the transfer and rotates `DATABASE_URL`. Existing access tokens are revoked. Auth and the Data API stay enabled when they were granted.
45
+
46
+ When `reconciled` is true, the pre-claim `DATABASE_URL` no longer works. Auth and Data API URLs stay. The human signs in with `neon auth`. Then the agent runs `neon link --agent` and `neon env pull` to write the new `DATABASE_URL`. `neon link --agent` discovers the project after that sign-in.
47
+
48
+ ### With the CLI
49
+
50
+ When the human is ready, run `neon claim accept --no-open`. Bare `neon claim accept` opens a browser. Report the `verification_url`, `user_code`, and `expires_in_seconds` the CLI printed (HTTP names: `verification_uri_complete`, `user_code`, `expires_in`). If the code expires, run `neon claim accept --no-open` again. Poll with `neon claim status`. The CLI re-exchanges the assertion; do not call the token endpoint yourself.
51
+
52
+ ```bash
53
+ neon claim accept --no-open
54
+ neon claim status
55
+ ```
56
+
57
+ Permanently delete the unclaimed project (this does not cancel a claim):
58
+
59
+ ```bash
60
+ neon claim delete --yes
61
+ ```
62
+
63
+ ### With REST
64
+
65
+ An agent must not complete the claim. Do not `POST /v1/projects/{id}/claim` until the human is ready. The human opens `verification_uri_complete` and accepts the transfer. If the claim code expires, `POST /v1/projects/{id}/claim` again. The live claim response also includes `user_code` and `expires_in`. `auth.md` documents `verification_uri_complete` and the polling `interval`.
66
+
67
+ After the human continues to Neon, existing access tokens are revoked: re-exchange the identity assertion, then poll `GET /v1/projects/{id}/claim` with that token at the interval `auth.md` returns. `claim_in_progress` means keep polling with the post-redemption token, not the token from create. Report `verification_uri_complete`, `user_code`, and `expires_in`.
68
+
69
+ When `error.code` is `capability_requires_claim`, preserve the denied capability and give the human a claim link instead of retrying or silently omitting it.
70
+
71
+ Only `invalid_grant`, `project_expired`, and `project_claimed` mean the stored identity assertion is dead. `token_expired` means re-exchange the assertion.
72
+
73
+ ## If neon claim is missing
74
+
75
+ Fall back to the REST API. Fetch `https://claimable.neon.tech/auth.md` for request and response fields. The claimable resource is `/v1/projects/{id}` on `https://claimable.neon.tech`, not `/v1/databases/{id}`. Follow [Claim](#claim) for when to mint, what rotates, and what to do after `reconciled`.
76
+
77
+ ```http
78
+ POST https://claimable.neon.tech/v1/agent/identity
79
+ POST https://claimable.neon.tech/v1/oauth2/token
80
+ GET https://claimable.neon.tech/v1/projects/{id}/credentials
81
+ POST https://claimable.neon.tech/v1/projects/{id}/claim
82
+ GET https://claimable.neon.tech/v1/projects/{id}/claim
83
+ DELETE https://claimable.neon.tech/v1/projects/{id}
84
+ ```
85
+
86
+ | CLI | REST |
87
+ | ----------------------------- | ------------------------------------------------------------------------------------------------- |
88
+ | `neon claim create` | `POST /v1/agent/identity`, then `POST /v1/oauth2/token`, then `GET /v1/projects/{id}/credentials` |
89
+ | `neon claim accept --no-open` | `POST /v1/projects/{id}/claim` |
90
+ | `neon claim status` | `GET /v1/projects/{id}/claim` |
91
+ | `neon claim delete --yes` | `DELETE /v1/projects/{id}` |
@@ -10,8 +10,8 @@ description: >-
10
10
  Supabase Storage. Triggers include "object storage", "bucket", "blob
11
11
  storage", "file storage", "store uploads/images/files", "S3-compatible
12
12
  storage", "presigned URL", "where do I put files", "storage logs",
13
- "bucket logs", "Neon Object Storage", "Neon Storage", and "storage that
14
- branches with my database".
13
+ "bucket logs", "CDN in front of object storage", "Neon Object Storage",
14
+ "Neon Storage", and "storage that branches with my database".
15
15
  metadata:
16
16
  parent: neon
17
17
  source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-object-storage
@@ -35,14 +35,14 @@ Use this skill to help the user store and serve files that branch alongside thei
35
35
 
36
36
  ## When to Use
37
37
 
38
- Reach for Neon Object Storage when the user needs to store files (images, uploads, generated assets, documents, backups) and any of the following are true:
38
+ Reach for Neon Object Storage for the files an app and its users produce — uploads, attachments, avatars, images, documents, generated assets, backups. It is the default place to put them when the app is already on Neon:
39
39
 
40
40
  - **They already use Lakebase Postgres and don't want a second provider.** One backend, one bill, one CLI, one set of branches — instead of standing up and wiring a separate AWS S3 / R2 / Supabase Storage account. The same Neon credential that backs the database backs storage.
41
41
  - **Files must stay in sync with the database across environments.** Storage branches _together with_ your Postgres data. Fork a branch and the child instantly inherits the parent's buckets and objects at that point in time — copy-on-write, so no data is duplicated. This is what makes agent, dev, preview, and test environments seamless: a preview branch gets a consistent snapshot of _both_ the rows and the files they reference, and writes on the child never touch the parent.
42
42
  - **They want safe, throwaway environments.** Upload, overwrite, and delete files in a preview/CI branch without any risk to production data, then drop the branch.
43
43
  - **They want standard S3 tooling.** It's built on S3 semantics and speaks the S3 API, so the AWS SDKs, `boto3`, the AWS CLI, and presigned URLs all work — reliable and familiar, with no proprietary client.
44
44
 
45
- If the user has no Neon project, isn't on Postgres, and just needs a standalone CDN-backed asset store, a dedicated object store may fit better but the moment branch-consistent files + rows matter, this is the reason to use it.
45
+ If the files in question ship with the app itself — HTML, JS bundles, CSS, the images in `public/` that's static web hosting and belongs on Vercel, Netlify, or Cloudflare instead. Public assets that are served from a bucket want a CDN in front of them (see [Architecture: Where Object Storage Fits](#architecture-where-object-storage-fits)).
46
46
 
47
47
  ## What It Does
48
48
 
@@ -55,6 +55,13 @@ If the user has no Neon project, isn't on Postgres, and just needs a standalone
55
55
 
56
56
  Check this precondition before setting anything up: Neon Object Storage is a public beta feature available in the `us-east-2` region. Confirm the user's Neon project is in `us-east-2` before proceeding.
57
57
 
58
+ ## Architecture: Where Object Storage Fits
59
+
60
+ Neon (Object Storage included) is **backend primitives, not full-stack app hosting**. Object Storage holds the files the app and its users produce — uploads, attachments, avatars, documents, generated images, backups — keyed from Postgres rows on the same branch. Two boundaries follow from that:
61
+
62
+ - **Put a CDN in front of public assets.** A `public_read` object is read anonymously at `${AWS_ENDPOINT_URL_S3}/<bucket>/<object-key>` — the branch's storage endpoint, injected as an env var (see [Environment Variables](#environment-variables)). For assets a browser loads on every page view — avatars, product images, anything hot — use that as the origin for a Cloudflare or Vercel CDN, and set `Cache-Control` on `PutObject` so the edge knows how long to hold each object. A cached object is only as fresh as its key, so write each version to a new key (`avatars/<user-id>/<uuid>.jpg`) and repoint the key stored in Postgres, rather than overwriting one key and waiting out the TTL. The endpoint is branch-scoped, so a production CDN points at the production branch while preview branches read their own endpoint directly rather than sharing a cache. Private buckets stay on presigned URLs instead, which carry their signature in the query string.
63
+ - **Host the app itself elsewhere.** Anything checked into the repo — HTML, JS bundles, CSS, and the images and fonts that ship in `public/` — belongs on Vercel, Netlify, or Cloudflare, along with the index documents, SPA fallbacks, and custom domains that go with them. Neon has no website mode to serve them through: `PutBucketWebsite` returns `501 Not Implemented`.
64
+
58
65
  ## Setup
59
66
 
60
67
  Object storage is part of the `neon.ts` infrastructure-as-code config (see the `neon` skill for the branch-first workflow, `link`/`checkout`, and `neon.ts` basics). Declare buckets under `preview.buckets`, keyed by bucket name:
@@ -42,7 +42,11 @@ translate every error · celebrate. Decide all technical choices yourself.
42
42
  First run `vybekiit doctor` — it installs the tools the app will need (for the database and for
43
43
  putting the app online) so the builder never configures anything. It may say a tool "isn't signed
44
44
  in yet" — that's fine for now; sign-in happens later, only when a step needs it (one browser click
45
- each). Then install the project's building blocks and start the app yourself, in plain words.
45
+ each). Then install the project's building blocks. Before starting the app, check whether
46
+ `http://localhost:3000` already responds and reuse that running preview when it does. Otherwise,
47
+ start exactly one preview with the agent's background-task support and keep its task handle.
48
+ If a running preview is unhealthy, inspect and restart that same process instead of starting a
49
+ second copy. Do this yourself, in plain words.
46
50
  After dependencies install, run **quality smoke** yourself: `pnpm verify` (format, lint, typecheck,
47
51
  tests). Confirm `.cursorignore` hides `.env` (doctor checks this). Optionally install UI walkthrough
48
52
  browsers: `pnpm exec playwright install chromium` (agent-only — see `playwright-vybekiit.md`).
@@ -85,7 +85,7 @@ keys = resend.ApiKeys.list()
85
85
 
86
86
  # Rename a key (only "name" is patchable)
87
87
  resend.ApiKeys.update({
88
- "api_key_id": "api_key_id",
88
+ "id": "api_key_id",
89
89
  "name": "Production Sending Key v2",
90
90
  })
91
91
 
@@ -10,17 +10,17 @@ Group contacts for broadcast targeting. Segments replaced legacy "audiences" —
10
10
  |-----------|--------|
11
11
  | Create | `resend.segments.create(params)` |
12
12
  | Get | `resend.segments.get(id)` |
13
+ | Update | `resend.segments.update(id, { name })` — rename only |
13
14
  | List | `resend.segments.list(params?)` |
14
15
  | Delete | `resend.segments.remove(id)` — not `.delete()` |
15
16
 
16
- No update endpoint — delete and recreate to rename a segment.
17
-
18
17
  ### Python
19
18
 
20
19
  | Operation | Method |
21
20
  |-----------|--------|
22
21
  | Create | `resend.Segments.create(params)` |
23
22
  | Get | `resend.Segments.get(id)` |
23
+ | Update | `resend.Segments.update(id, params)` — rename only |
24
24
  | List | `resend.Segments.list(params?)` |
25
25
  | Delete | `resend.Segments.remove(id)` |
26
26
 
@@ -39,6 +39,23 @@ if (error) {
39
39
  console.log(data.id); // seg_xxxxxxxx
40
40
  ```
41
41
 
42
+ ## Update Segment
43
+
44
+ Rename an existing segment. `name` is the only field — the response only returns `object` and `id`, not the new `name`.
45
+
46
+ ```typescript
47
+ const { data, error } = await resend.segments.update('seg_xxx', {
48
+ name: 'Active Users (Q3)',
49
+ });
50
+
51
+ if (error) {
52
+ console.error(error);
53
+ return;
54
+ }
55
+
56
+ console.log(data.id); // UUID, e.g. 78261eea-8f8b-4381-83c6-79fa7120f1cf
57
+ ```
58
+
42
59
  ## Managing Contacts in Segments
43
60
 
44
61
  Add or remove contacts from segments via the contacts sub-resource:
@@ -72,6 +89,5 @@ await resend.broadcasts.create({
72
89
  | Mistake | Fix |
73
90
  |---------|-----|
74
91
  | Using `audienceId` | Audiences are deprecated — use `segmentId` |
75
- | Calling `.update()` | No update endpoint — `.remove()` then `.create()` to rename |
76
92
  | Calling `.delete()` | SDK method is `.remove()` |
77
93
  | Expecting contacts auto-added | Contacts must be explicitly added via `contacts.segments.add()` |
package/package.json CHANGED
@@ -1,49 +1,48 @@
1
1
  {
2
2
  "name": "vybekiit",
3
- "version": "0.7.19",
3
+ "version": "0.7.21",
4
4
  "description": "Choose your services, sign in, create a VybeKiit app, and open its verified local welcome page.",
5
5
  "license": "MIT",
6
- "packageManager": "pnpm@10.33.2",
7
6
  "publishConfig": {
8
7
  "access": "public"
9
8
  },
10
9
  "type": "module",
11
10
  "bin": {
12
- "vybekiit": "./dist/bin.js"
11
+ "vybekiit": "dist/bin.js"
13
12
  },
14
13
  "files": [
15
14
  "dist"
16
15
  ],
17
- "scripts": {
18
- "build": "tsup && node scripts/bundleGlobalSkills.mjs",
19
- "typecheck": "tsc --noEmit",
20
- "test": "vitest run"
21
- },
22
16
  "dependencies": {
23
17
  "@modelcontextprotocol/sdk": "^1.12.1",
24
18
  "@aws-sdk/client-dynamodb": "^3.1075.0",
25
19
  "@aws-sdk/client-s3": "^3.1075.0",
26
20
  "@aws-sdk/lib-dynamodb": "^3.1075.0",
27
- "@clack/prompts": "catalog:",
21
+ "@clack/prompts": "1.7.0",
28
22
  "@neondatabase/serverless": "^0.10.4",
29
23
  "@supabase/supabase-js": "^2.47.10",
30
- "effect": "catalog:",
24
+ "effect": "3.21.4",
31
25
  "firebase-admin": "^13.0.2",
32
26
  "mongodb": "^7.4.0",
33
- "open": "catalog:",
27
+ "open": "11.0.0",
34
28
  "playwright": "^1.61.1"
35
29
  },
36
30
  "devDependencies": {
37
- "@types/node": "catalog:",
38
- "tsup": "catalog:",
39
- "typescript": "catalog:",
40
- "vitest": "catalog:",
41
- "@vybekiit/agent-kit": "workspace:*",
42
- "@vybekiit/agent-mcp": "workspace:*",
43
- "@vybekiit/core": "workspace:*",
44
- "@vybekiit/db": "workspace:*",
45
- "@vybekiit/deploy": "workspace:*",
46
- "@vybekiit/payments": "workspace:*",
47
- "@vybekiit/report-mode": "workspace:*"
31
+ "@types/node": "22.20.0",
32
+ "tsup": "8.5.1",
33
+ "typescript": "5.7.2",
34
+ "vitest": "3.2.6",
35
+ "@vybekiit/core": "0.7.21",
36
+ "@vybekiit/db": "0.7.21",
37
+ "@vybekiit/agent-mcp": "0.7.21",
38
+ "@vybekiit/agent-kit": "0.7.21",
39
+ "@vybekiit/deploy": "0.7.21",
40
+ "@vybekiit/report-mode": "0.7.21",
41
+ "@vybekiit/payments": "0.7.21"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup && node scripts/bundleGlobalSkills.mjs",
45
+ "typecheck": "tsc --noEmit",
46
+ "test": "vitest run"
48
47
  }
49
- }
48
+ }
@@ -1,30 +0,0 @@
1
- name: Sync Skills
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- paths:
7
- - 'SKILL.md'
8
- - 'references/**'
9
- - 'scripts/**'
10
- - 'assets/**'
11
- workflow_dispatch:
12
-
13
- permissions:
14
- contents: read
15
-
16
- jobs:
17
- sync:
18
- runs-on: ubuntu-latest
19
- steps:
20
- - name: Trigger sync on resend-skills
21
- env:
22
- GH_TOKEN: ${{ secrets.SYNC_SKILLS_TO_RESEND_SKILLS }}
23
- run: |
24
- gh workflow run sync-from-repo.yml \
25
- --repo resend/resend-skills \
26
- --field repo=email-best-practices \
27
- --field skill-path=. \
28
- --field skill-name=email-best-practices \
29
- --field sha=${{ github.sha }} \
30
- --field reviewer=${{ github.actor }}
@@ -1,63 +0,0 @@
1
- ```
2
- ╔══════════════════════════════════════╗
3
- ║ _____ __ __ _ ___ _ ║
4
- ║ | ____| \/ | / \ |_ _| | ║
5
- ║ | _| | |\/| | / _ \ | || | ║
6
- ║ | |___| | | |/ ___ \ | || |___ ║
7
- ║ |_____|_| |_/_/ \_\___|_____| ║
8
- ║ ║
9
- ║ Best Practices ║
10
- ╚══════════════════════════════════════╝
11
- ```
12
-
13
- # Email Best Practices Skill
14
-
15
- A comprehensive agent skill for building production-ready email systems. Covers everything from DNS authentication to webhook processing, with a focus on deliverability, compliance, and reliability.
16
-
17
- ## Installation
18
-
19
- ```bash
20
- npx skills add resend/email-best-practices
21
- ```
22
-
23
- ## What This Skill Covers
24
-
25
- **Getting Started**
26
- - Planning which emails your app needs (password reset, verification, order confirmations)
27
- - Setting up email authentication (SPF, DKIM, DMARC) so emails reach inboxes
28
-
29
- **Sending Emails**
30
- - Transactional email design (subject lines, content structure, mobile-first)
31
- - Marketing email best practices (consent, segmentation, unsubscribe)
32
- - Compliance requirements by region (CAN-SPAM, GDPR, CASL)
33
-
34
- **Production Infrastructure**
35
- - Idempotency and retry logic to prevent duplicates
36
- - Webhook processing for delivery events
37
- - Suppression lists and list hygiene automation
38
-
39
- ## Structure
40
-
41
- ```
42
- email-best-practices/
43
- ├── SKILL.md # Start here - routes to the right resource
44
- └── references/
45
- ├── deliverability.md # SPF/DKIM/DMARC, sender reputation
46
- ├── transactional-emails.md # Password resets, OTPs, confirmations
47
- ├── transactional-email-catalog.md # Email combinations by app type
48
- ├── marketing-emails.md # Newsletters, campaigns, consent
49
- ├── email-capture.md # Validation, verification, opt-in
50
- ├── compliance.md # CAN-SPAM, GDPR, CASL
51
- ├── email-types.md # Transactional vs marketing
52
- ├── sending-reliability.md # Idempotency, retry logic, errors
53
- ├── webhooks-events.md # Delivery events, webhook setup
54
- └── list-management.md # Suppression lists, hygiene
55
- ```
56
-
57
- ## Quick Start
58
-
59
- Open `SKILL.md` - it has a routing table that directs you to the right resource based on what you need to do.
60
-
61
- ## License
62
-
63
- MIT
@@ -1,35 +0,0 @@
1
- # Skill Tests
2
-
3
- Tests for the `email-best-practices` skill using the RED-GREEN methodology from [writing-skills](https://github.com/yourorg/writing-skills).
4
-
5
- ## Skill Type
6
-
7
- This is a **reference/technique** skill (not discipline-enforcing), so tests focus on:
8
-
9
- - **Retrieval** — Does the agent find the right resource for a given problem?
10
- - **Application** — Does the agent produce correct, specific guidance?
11
- - **Gap** — Are common email scenarios adequately covered?
12
-
13
- ## Test Scenarios
14
-
15
- | # | Scenario | Tests | Key Resource(s) |
16
- |---|----------|-------|-----------------|
17
- | 1 | Emails going to spam | Retrieval + Application | deliverability.md |
18
- | 2 | Multi-region compliance | Retrieval + Application | compliance.md |
19
- | 3 | Retry logic + idempotency | Application | sending-reliability.md |
20
- | 4 | Webhook bounce/complaint handling | Application | webhooks-events.md, list-management.md |
21
- | 5 | New SaaS email infrastructure | Retrieval + Application + Gap | All resources |
22
-
23
- ## Running Tests
24
-
25
- Each scenario in `scenarios/` is a self-contained prompt. Run with a subagent:
26
-
27
- **RED (baseline):** Run the prompt as-is — no skill loaded. The agent uses only general knowledge.
28
-
29
- **GREEN (with skill):** Prepend: `You have access to an email best practices skill with resources in <path>. Read SKILL.md first, then read the relevant resource file(s).`
30
-
31
- Compare outputs against `results.md` for expected correctness criteria.
32
-
33
- ## Results
34
-
35
- See `results.md` for the full RED vs GREEN comparison and gap analysis from the initial test campaign.
@@ -1,46 +0,0 @@
1
- # Scenario 1: Emails Going to Spam
2
-
3
- ## Prompt
4
-
5
- ```
6
- You are an AI coding assistant. A developer asks you:
7
-
8
- "My transactional emails (password resets, order confirmations) are going to spam in Gmail. What do I do to fix this?"
9
-
10
- Answer with specific, actionable steps. Include exact DNS records, commands to verify, and threshold numbers where relevant.
11
-
12
- Format your response as a numbered action plan.
13
- ```
14
-
15
- ## Expected Correctness Criteria
16
-
17
- The agent MUST include these skill-specific details:
18
-
19
- ### Authentication (deliverability.md)
20
- - [ ] SPF record example: `v=spf1 include:amazonses.com ~all`
21
- - [ ] DKIM: provider supplies the record
22
- - [ ] DMARC: `v=DMARC1; p=none; rua=mailto:dmarc@example.com`
23
- - [ ] DMARC rollout: `p=none` → `p=quarantine; pct=25` → `p=reject`
24
- - [ ] Verification commands: `dig TXT example.com +short`, `dig TXT resend._domainkey.example.com +short`, `dig TXT _dmarc.example.com +short`
25
-
26
- ### Thresholds (deliverability.md)
27
- - [ ] Bounce targets: <1% good, 1-3% acceptable, 3-4% concerning, >4% critical
28
- - [ ] Complaint targets: <0.01% excellent, 0.01-0.05% good, >0.05% critical
29
-
30
- ### IP Warming (deliverability.md)
31
- - [ ] Week 1: 50-100/day
32
- - [ ] Week 2: 200-500/day
33
- - [ ] Week 3: 1,000-2,000/day
34
- - [ ] Week 4: 5,000-10,000/day
35
-
36
- ### Infrastructure (deliverability.md)
37
- - [ ] Dedicated subdomains: `t.example.com` (transactional), `m.example.com` (marketing)
38
- - [ ] DNS TTL: 300s during setup, 3600s+ after stable
39
-
40
- ### Troubleshooting order (deliverability.md)
41
- - [ ] Check in order: 1. Authentication, 2. List-Unsubscribe header, 3. Reputation, 4. Content, 5. Sending patterns
42
-
43
- ### Diagnostic tools (deliverability.md)
44
- - [ ] Google Postmaster Tools
45
- - [ ] mail-tester.com
46
- - [ ] MXToolbox blacklist check
@@ -1,48 +0,0 @@
1
- # Scenario 2: Multi-Region Email Compliance
2
-
3
- ## Prompt
4
-
5
- ```
6
- You are an AI coding assistant. A developer asks you:
7
-
8
- "I'm building an email newsletter for my SaaS product. I have users in the US, EU, and Canada. What legal requirements do I need to follow? Give me a comparison table of requirements by region and the specific implementation steps."
9
-
10
- Be specific about penalty amounts, timing requirements for unsubscribe processing, and consent record requirements.
11
- ```
12
-
13
- ## Expected Correctness Criteria
14
-
15
- ### Penalties (compliance.md)
16
- - [ ] CAN-SPAM: $53k/email
17
- - [ ] GDPR: EUR 20M or 4% revenue
18
- - [ ] CASL: $1M (individual) to $10M (organization) CAD
19
-
20
- ### Consent types (compliance.md)
21
- - [ ] CAN-SPAM: opt-out model (can send without opt-in)
22
- - [ ] GDPR: explicit opt-in (no pre-checked boxes)
23
- - [ ] CASL express: explicit opt-in
24
- - [ ] CASL implied: existing relationship (2 years) or inquiry (6 months)
25
-
26
- ### Unsubscribe timing (compliance.md)
27
- - [ ] CAN-SPAM: 10 business days, must work 30 days after send
28
- - [ ] GDPR: immediately, as easy as opting in
29
- - [ ] CASL: 10 business days, must work 60 days after send
30
-
31
- ### CASL specifics (compliance.md)
32
- - [ ] Sender identification valid 60 days after send
33
- - [ ] Keep consent records 3 years after expiration
34
-
35
- ### Consent records (compliance.md)
36
- - [ ] Record: email, date/time, method, what consented to, source
37
-
38
- ### International sending (compliance.md)
39
- - [ ] Best practice: follow GDPR (most restrictive) for all regions
40
-
41
- ### Managing preferences vs unsubscribe (compliance.md)
42
- - [ ] One-click unsubscribe required; preference management is nice-to-have, doesn't replace unsubscribe
43
-
44
- ### List-Unsubscribe header (compliance.md)
45
- - [ ] Required by Gmail/Yahoo since Feb 2024
46
- - [ ] Headers: `List-Unsubscribe` URL + `List-Unsubscribe-Post: List-Unsubscribe=One-Click`
47
- - [ ] Endpoint: POST returns 200/202, GET shows unsubscribe page
48
- - [ ] Stop sending within 48 hours