opencode-skills-collection 3.0.31 → 3.0.33

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 (51) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +14 -1
  2. package/bundled-skills/bilig-workpaper/SKILL.md +12 -3
  3. package/bundled-skills/bumblebee/SKILL.md +6 -2
  4. package/bundled-skills/bun-development/SKILL.md +5 -3
  5. package/bundled-skills/cloud-penetration-testing/SKILL.md +5 -3
  6. package/bundled-skills/container-security-hardening/SKILL.md +1001 -0
  7. package/bundled-skills/container-security-hardening/references/base-image-comparison.md +245 -0
  8. package/bundled-skills/container-security-hardening/references/kubernetes-pod-security.md +567 -0
  9. package/bundled-skills/container-security-hardening/references/seccomp-profile-template.json +337 -0
  10. package/bundled-skills/doc2math/SKILL.md +102 -0
  11. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  12. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  13. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  14. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  15. package/bundled-skills/docs/users/bundles.md +1 -1
  16. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  17. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  18. package/bundled-skills/docs/users/getting-started.md +6 -2
  19. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  20. package/bundled-skills/docs/users/usage.md +4 -4
  21. package/bundled-skills/docs/users/visual-guide.md +4 -4
  22. package/bundled-skills/environment-setup-guide/SKILL.md +10 -6
  23. package/bundled-skills/evolution/SKILL.md +5 -3
  24. package/bundled-skills/github-actions-advanced/SKILL.md +1100 -0
  25. package/bundled-skills/gitops-workflow/SKILL.md +5 -3
  26. package/bundled-skills/ii-commons/SKILL.md +15 -1
  27. package/bundled-skills/lemmaly/SKILL.md +15 -6
  28. package/bundled-skills/linkerd-patterns/SKILL.md +5 -3
  29. package/bundled-skills/longbridge/SKILL.md +95 -0
  30. package/bundled-skills/mercury-mcp/SKILL.md +9 -1
  31. package/bundled-skills/moatmri/SKILL.md +84 -0
  32. package/bundled-skills/nextjs-seo-indexing/SKILL.md +263 -0
  33. package/bundled-skills/openclaw-github-repo-commander/scripts/repo-audit.sh +42 -0
  34. package/bundled-skills/photopea-embedded-editor/SKILL.md +7 -3
  35. package/bundled-skills/runaway-guard/SKILL.md +331 -0
  36. package/bundled-skills/schema-markup-generator/SKILL.md +319 -0
  37. package/bundled-skills/sendblue/sendblue-api/SKILL.md +6 -1
  38. package/bundled-skills/sendblue/sendblue-cli/SKILL.md +6 -1
  39. package/bundled-skills/sendblue/sendblue-notify/SKILL.md +6 -1
  40. package/bundled-skills/sendblue/textme/SKILL.md +4 -0
  41. package/bundled-skills/social-metadata-hardening/SKILL.md +230 -0
  42. package/bundled-skills/socialclaw/SKILL.md +6 -1
  43. package/bundled-skills/uv-package-manager/resources/implementation-playbook.md +5 -3
  44. package/bundled-skills/varlock/SKILL.md +10 -6
  45. package/bundled-skills/vibe-code-cleanup/SKILL.md +231 -0
  46. package/bundled-skills/vibecode-production-qa-validator/SKILL.md +237 -0
  47. package/bundled-skills/wordpress-centric-high-seo-optimized-blogwriting-skill/SKILL.md +229 -162
  48. package/bundled-skills/yield-intelligence/SKILL.md +121 -0
  49. package/bundled-skills/youtube-full/SKILL.md +144 -0
  50. package/package.json +1 -1
  51. package/skills_index.json +330 -28
@@ -0,0 +1,331 @@
1
+ ---
2
+ name: runaway-guard
3
+ description: "Cost-safety discipline for paid AI / inference APIs: treat $-cost as a third complexity dimension alongside time and space. Forces a written per-run $-cap, per-day $-cap, max-iterations bound, concurrency limit, and a matching provider-dashboard hard cap BEFORE any call site is written."
4
+ risk: safe
5
+ source: community
6
+ source_repo: morsechimwai/lemmaly
7
+ source_type: community
8
+ date_added: "2026-05-28"
9
+ author: morsechimwai
10
+ tags: [cost-safety, finops, ai-apis, agents, retries, concurrency, wallet-invariant, gateway]
11
+ tools: [claude-code, antigravity, cursor, gemini-cli, codex-cli]
12
+ license: "Apache-2.0"
13
+ license_source: "https://github.com/morsechimwai/lemmaly/blob/main/LICENSE"
14
+ ---
15
+
16
+ # runaway-guard — $-Cost is the Third Complexity Dimension
17
+
18
+ Every loop has time complexity and space complexity. A loop that calls a paid API has a third: **dollars per execution**. The model tracks the first two automatically. It does not track the third, so it ships code where a single bug — a retry without bound, a stream reconnect storm, an agent that re-queues itself, a webhook that fires the same job twice — silently spends real money.
19
+
20
+ The canonical incident: developer writes a Fal.ai image-generation loop. Loop "obviously terminates" because it iterates over a fixed list. The list comes from a callback that fires on every Inngest retry. Each retry doubles the list. By morning, the bill is **$200**. Tests pass. Code review passed. The bug is not in the loop body. The bug is that **no one stated the wallet invariant**.
21
+
22
+ runaway-guard fixes this. State the max calls. State the max dollars per run. State the max dollars per day. Set the same caps in the provider dashboard so a code bug cannot bypass them. Then write the code.
23
+
24
+ **Violating the letter of these rules is violating the spirit of the skill.** "I'm only testing locally" is the exact rationalization that ships the $200 bill — local code hits the same paid API as production.
25
+
26
+ ## When to Use This Skill
27
+
28
+ Use **runaway-guard** when:
29
+
30
+ - Writing or reviewing code that calls a paid AI / inference API in a loop, queue, retry path, agent step, webhook handler, or background job.
31
+ - Importing or wrapping any paid-inference SDK: `@fal-ai/*`, `fal-client`, `@anthropic-ai/sdk`, `anthropic`, `openai`, `replicate`, `elevenlabs`, `together-ai`, `groq-sdk`, `cohere-ai`, `@mistralai/*`.
32
+ - Designing an agent loop, fan-out pipeline, retry wrapper, polling job, stream reconnect, or self-rescheduling job that may call a billed endpoint.
33
+ - Auditing a codebase / PR for unbounded fan-out, unbounded retries, missing idempotency keys, or missing provider-side spend caps.
34
+ - Diagnosing an unexpected bill, runaway loop incident, or surprise overage.
35
+
36
+ ## The Iron Law
37
+
38
+ ```text
39
+ NO CALL TO A PAID API WITHOUT A WRITTEN $-CAP AT BOTH THE CODE AND PROVIDER LEVEL
40
+ ```
41
+
42
+ A cap only in code can be bypassed by a bug in that code. A cap only at the provider can be hit during normal usage and degrade the product. You need both. If you cannot state both in one sentence each, you have not designed the call site — you have written a wish.
43
+
44
+ ## Non-negotiable rules
45
+
46
+ 1. **Every call site gets a one-line cost contract.** Before writing any paid-API call, state in one sentence:
47
+ - **Max calls per run:** the strict upper bound on invocations in a single execution of this code path.
48
+ - **Max $ per run:** `max_calls × unit_cost` — compute it, don't estimate.
49
+ - **Max $ per day:** the provider-side hard cap that backstops the code-side bound.
50
+
51
+ Examples:
52
+ - "Fal flux-pro at $0.05/image; max 20 images per job; max $1 per job; provider Spend Limit $50/day."
53
+ - "Anthropic Sonnet at ~$0.015 per request (cached); max 50 requests per agent run; max $0.75 per run; Workspace Budget hard cap $30/day."
54
+
55
+ If you cannot fill in all three numbers, you have not designed the call site.
56
+
57
+ 2. **Every loop calling a paid API gets an explicit iteration bound, not just a termination argument.** `invariant-guard` requires a termination measure. runaway-guard requires the bound to be a **concrete integer in code**, not just "eventually terminates":
58
+
59
+ ```ts
60
+ // ❌ Terminates in theory. Bills $200 in practice.
61
+ while (job.status !== 'done') {
62
+ await fal.run(...);
63
+ }
64
+
65
+ // ✅ Concrete bound — wallet invariant explicit.
66
+ const MAX_CALLS = 20;
67
+ for (let i = 0; i < MAX_CALLS && job.status !== 'done'; i++) {
68
+ await fal.run(...);
69
+ }
70
+ if (job.status !== 'done') throw new Error('exceeded MAX_CALLS budget');
71
+ ```
72
+
73
+ 3. **Every retry path is bounded by attempts AND total elapsed cost, not by time alone.** Exponential backoff with no attempt cap is a wallet attack on yourself.
74
+ - Max attempts: a small integer (3–5 for transient errors, 1 for 4xx).
75
+ - Cap counts across the whole pipeline, not just one library — Inngest retries × SDK retries × your own retry wrapper multiply.
76
+ - 4xx errors do not retry. Period. They will not become 2xx; they will just bill again.
77
+
78
+ 4. **Every fan-out path declares a concurrency limit.** Parallel calls multiply cost per wall-clock second. State the limit in code, at the queue (Inngest `concurrency`), and at the provider where supported:
79
+ - Inngest: `concurrency: { limit: N }` on the function.
80
+ - BullMQ / Sidekiq / Cloud Tasks: queue-level concurrency.
81
+ - In-process: `p-limit`, semaphore, or batched `Promise.all` chunks — never an unbounded `Promise.all(items.map(...))` on a paid API.
82
+
83
+ 5. **Every paid API has a matching provider-side hard cap, configured out of band.** Defense in depth: if the code is wrong, the provider stops the bleeding. Document the cap in the same file as the call site so future readers know it exists.
84
+
85
+ | Provider | Where to set the hard cap |
86
+ |---|---|
87
+ | **Fal.ai** | Dashboard → Billing → **Spend Limit** (e.g. $50/day). Hard stop on exceed. |
88
+ | **Anthropic** | Console → Workspaces → **Workspace Budget** with hard limit. Per-workspace, per-month. |
89
+ | **OpenAI** | Org → Settings → **Usage limits** (org-level hard limit blocks requests). ⚠️ Per-*project* monthly budgets are **soft thresholds only** — they alert but do not block. For a real hard cap use the org-level Usage limit, a billing gateway, or your own fail-closed budget check. |
90
+ | **Replicate** | Account → Billing → **Spend limit**. Per account. |
91
+ | **ElevenLabs** | Workspace → **Usage limits** per workspace / API key. |
92
+ | **Together / Groq / Cohere / Mistral** | Each has a billing dashboard with a monthly spend cap — set it before first deploy, not after. |
93
+
94
+ No hard cap, no call site. Set the cap before the first request, not after the first incident.
95
+
96
+ 6. **Idempotency keys on every mutating or charging call.** A webhook that fires twice should bill once. Without an idempotency key, retry policies you cannot see (load balancer, framework, gateway) silently double-charge.
97
+
98
+ 7. **Make the "amplifier" patterns explicit and forbidden by default.** These are the shapes that turn small bugs into large bills:
99
+ - **Self-rescheduling jobs.** A job that re-enqueues itself with no decrementing measure is an unbounded loop with extra steps.
100
+ - **Webhook handlers that call the API that called the webhook.** Cycle detection or it will cycle.
101
+ - **Recursion over LLM output.** "Ask the model what to do next" with no depth cap is a depth-unbounded recursion in dollars.
102
+ - **Polling without a deadline.** `while (!done) await poll()` with no `maxWaitMs` is a wallet leak.
103
+ - **Streaming reconnect storms.** A WebSocket / SSE reconnect with no backoff and no attempt cap can hammer a billed endpoint thousands of times per minute.
104
+ - **Cache-miss stampede on a paid call.** N concurrent requests for the same uncached key → N billed calls. Use `singleflight` / request coalescing.
105
+
106
+ ## The pre-write protocol
107
+
108
+ Before producing code that calls a paid API, your message must contain — in this order:
109
+
110
+ 1. **Provider + unit cost.** "Fal flux-pro: $0.05/image, billed per success."
111
+ 2. **Max calls per run.** A literal integer that will appear as a constant in the code.
112
+ 3. **Max $ per run.** `max_calls × unit_cost`. Compute it.
113
+ 4. **Max $ per day (provider hard cap).** The dashboard setting that backstops the code.
114
+ 5. **Concurrency limit.** In code, at the queue, at the provider.
115
+ 6. **Retry policy.** Max attempts, which error codes retry, idempotency key strategy.
116
+ 7. **Amplifier audit.** Walk the list in rule 7; declare "none apply" or address each that does.
117
+ 8. **The code** — with the cost contract in a comment above the call site.
118
+ 9. **Self-check.** One line: "in the worst case, this code bills $X and the provider cap stops it at $Y."
119
+
120
+ If any of 1–7 is missing, do not emit code.
121
+
122
+ ## Worked trap — the Inngest + Fal $200 night
123
+
124
+ This is the canonical case. Observe how each rule would have caught it.
125
+
126
+ **What shipped:**
127
+
128
+ ```ts
129
+ // inngest function: generate images for a campaign
130
+ export const generateCampaign = inngest.createFunction(
131
+ { id: 'gen-campaign' }, // ❌ no concurrency limit
132
+ { event: 'campaign/start' },
133
+ async ({ event, step }) => {
134
+ const prompts = await step.run('fetch', () => fetchPrompts(event.data.id));
135
+ // ❌ unbounded fan-out, no per-run cap, no idempotency
136
+ await Promise.all(prompts.map(p => fal.run('fal-ai/flux-pro', { input: { prompt: p } })));
137
+ }
138
+ );
139
+ ```
140
+
141
+ **What went wrong.** `fetchPrompts` had a bug: on a transient DB error it returned the partial list *plus the previous run's list appended*. Inngest retried the function at its default retry count (multiple attempts in addition to the initial one). Each retry re-ran `fetchPrompts`, each retry doubled the list (40 → 80 → 160 → 320 prompts). `Promise.all` fanned all 320 out concurrently. At $0.05/image: **$16/retry × triangular growth across overnight retries on the schedule = ~$200 by morning.**
142
+
143
+ **Why each rule would have caught it.**
144
+
145
+ | Rule | Catch |
146
+ |---|---|
147
+ | 1. Cost contract | Forces writing "max calls per run". The number `prompts.length` is not a known integer → rule fails → write a cap. |
148
+ | 2. Concrete iteration bound | `Promise.all(prompts.map(...))` has no integer bound → rule fails → wrap in chunks with `MAX_IMAGES_PER_RUN`. |
149
+ | 3. Retry policy | Inngest default retries × no idempotency key = double-billed work. Rule forces an idempotency key per `(campaignId, promptHash)`. |
150
+ | 4. Concurrency limit | `Promise.all` is unbounded concurrency. Rule forces `p-limit(3)` and Inngest `concurrency: { limit: 3 }`. |
151
+ | 5. Provider hard cap | Fal Spend Limit $50/day would have stopped the bleeding at $50 instead of $200. |
152
+ | 7. Amplifier audit | "Self-rescheduling jobs" — Inngest's retry IS self-rescheduling. The audit forces you to consider it. |
153
+
154
+ **The fix that survives the protocol:**
155
+
156
+ ```ts
157
+ // cost contract:
158
+ // provider: Fal flux-pro @ $0.05/image
159
+ // max calls per run: 50
160
+ // max $ per run: $2.50
161
+ // provider hard cap: $50/day (set in Fal dashboard 2026-05-22)
162
+ // concurrency: 3 (Inngest + p-limit, matching)
163
+ // idempotency: key = `${campaignId}:${sha1(prompt)}` — provider-side dedup window 24h
164
+ const MAX_IMAGES_PER_RUN = 50;
165
+ const limit = pLimit(3);
166
+
167
+ export const generateCampaign = inngest.createFunction(
168
+ {
169
+ id: 'gen-campaign',
170
+ concurrency: { limit: 3 },
171
+ retries: 2, // attempts = 1 + retries
172
+ },
173
+ { event: 'campaign/start' },
174
+ async ({ event, step }) => {
175
+ const prompts = await step.run('fetch', () => fetchPrompts(event.data.id));
176
+ if (prompts.length > MAX_IMAGES_PER_RUN) {
177
+ throw new NonRetriableError(
178
+ `prompt count ${prompts.length} exceeds MAX_IMAGES_PER_RUN=${MAX_IMAGES_PER_RUN}`
179
+ );
180
+ }
181
+ await Promise.all(prompts.map(p => limit(() => step.run(
182
+ `img:${event.data.id}:${sha1(p)}`, // idempotency key
183
+ () => fal.run('fal-ai/flux-pro', { input: { prompt: p } })
184
+ ))));
185
+ }
186
+ );
187
+ ```
188
+
189
+ Note: the bug in `fetchPrompts` is still there. The protocol does not fix that bug — it makes the bug **cost $2.50 instead of $200** while you find it. That is the entire point of defense in depth.
190
+
191
+ ## Common runaway patterns and their wallet invariants
192
+
193
+ | Pattern | Wallet invariant to write | Hard cap to set |
194
+ |---|---|---|
195
+ | Fan-out over a list of items | `total_cost ≤ list_len × unit_cost ≤ MAX_$_PER_RUN` | provider daily spend limit |
196
+ | Retry on transient error | `total_cost ≤ attempts × unit_cost`, attempts ≤ 5 | provider daily spend limit; alert at 50% |
197
+ | Agent loop ("ask model what to do next") | `total_cost ≤ MAX_STEPS × per_step_cost`, depth ≤ MAX_DEPTH | per-agent-run cost ceiling, kill-switch |
198
+ | Polling for job completion | `total_cost ≤ ceil(MAX_WAIT_MS / poll_interval) × poll_cost` | absolute deadline + alert |
199
+ | Webhook handler → API call | idempotency key required; cycle if webhook is triggered by the same API | provider rate limit per key |
200
+ | Stream reconnect | `attempts ≤ MAX_RECONNECTS`, exponential backoff with cap | provider connection cap |
201
+ | Cache miss stampede | singleflight → `cost ≤ 1 × unit_cost` per key per window | n/a (deduped in code) |
202
+ | Self-scheduling job | recursion depth bounded by ledger row, not by code | scheduler-level dedup + max runs/day |
203
+ | Multi-provider fallback | sum across providers ≤ MAX_$_PER_RUN | hard cap on each provider separately |
204
+
205
+ ## Provider-specific cheat sheet
206
+
207
+ Set these **before** the first deploy. None of them require code changes.
208
+
209
+ ### Fal.ai
210
+ - Dashboard → **Billing → Spend Limit**. Daily and monthly hard caps. Hard stop on exceed.
211
+ - Use **per-API-key** keys per environment (dev / staging / prod) and set a low limit on dev.
212
+ - Webhooks: deliveries are paid; cap retries on your side.
213
+
214
+ ### Anthropic
215
+ - Console → **Workspaces** → create a Workspace per environment.
216
+ - Each Workspace gets a **Budget** with a **hard limit** (request blocking) and **soft limit** (email alert).
217
+ - Use a per-Workspace API key — a leaked dev key cannot exceed the dev Workspace budget.
218
+ - Prompt caching reduces cost ~90% for repeated context; cap is on unblended cost so caching extends the budget.
219
+
220
+ ### OpenAI
221
+ - ⚠️ **Per-project monthly budgets are soft only.** OpenAI's Help Center documents project budgets as "soft spending thresholds" that send alerts but do **not** enforce a hard cap. A runaway can continue past the documented project budget.
222
+ - For a real hard cap, use one of:
223
+ - **Org-level Usage limits** (Org → Settings → Limits) — block requests on exceed.
224
+ - A billing gateway / proxy in front of the API that enforces fail-closed budgets.
225
+ - Your own fail-closed budget check in code that refuses calls past a ledgered $-cap.
226
+ - Use separate projects per environment (dev/staging/prod) for attribution and alerting, but do not rely on the project budget as the hard stop.
227
+
228
+ ### Replicate
229
+ - Account → **Billing → Spend limit**. Account-wide hard cap.
230
+ - Use separate tokens per environment; rotate on leak.
231
+
232
+ ### ElevenLabs
233
+ - Workspace → **Usage limits**. Set per API key.
234
+ - Voice cloning is billed per character; cap the character count in code AND per key.
235
+
236
+ ### Inngest (queue layer — not paid AI but the multiplier)
237
+ - `concurrency: { limit: N }` on every function that calls a paid API.
238
+ - `retries: 2` (Inngest default is **4 retries**, i.e. up to 5 attempts including the initial — confirm against current Inngest docs) for paid call functions; fewer attempts on idempotent failures. Worst-case wallet math: `attempts = 1 + retries`, so a default `step.run()` can bill **5×**, not 4×.
239
+ - `NonRetriableError` for 4xx — never retry a 4xx into a paid API.
240
+ - `idempotency: ...` on events you cannot deduplicate at the call site.
241
+
242
+ ## Edge cases to enumerate before shipping
243
+
244
+ | Scenario | Expected behavior |
245
+ |---|---|
246
+ | Empty input list | 0 calls, 0 cost, return early — do not even auth |
247
+ | Input list longer than MAX | reject with NonRetriableError, do not partial-process |
248
+ | All calls fail with 4xx | 1 attempt each, no retry, surface error |
249
+ | All calls fail with 5xx | bounded retries, total cost ≤ attempts × unit, alert on full exhaustion |
250
+ | Concurrent invocation of the same job | idempotency key dedups; second invocation costs $0 |
251
+ | Network partition mid-batch | partial cost banked; on resume, idempotency key prevents re-charge |
252
+ | Provider rate-limit (429) | respect `Retry-After`; do not multiply retries inside SDK and outside |
253
+ | Webhook retried by provider | idempotency at the handler boundary |
254
+ | Local dev accidentally pointing at prod key | per-env keys + per-env caps make this cost $0.50, not $50 |
255
+ | Cron fires while previous run still executing | concurrency limit = 1 OR explicit overlap-tolerant design |
256
+
257
+ ## Output discipline
258
+
259
+ Code you emit must:
260
+
261
+ - Have a `// cost contract:` block above each call site with the four numbers (unit cost, max calls, max $/run, provider hard cap setting).
262
+ - Use a named constant (`MAX_IMAGES_PER_RUN`, `MAX_AGENT_STEPS`) for the bound — never a magic number inline.
263
+ - Wrap fan-out in `p-limit` or equivalent — never raw `Promise.all` over a paid API.
264
+ - Pass an idempotency key for every mutating / charging call.
265
+ - Set queue-level concurrency and retries in the same file or document it.
266
+ - Reject `4xx` retries via `NonRetriableError` or equivalent.
267
+ - Reference the provider hard-cap setting by name ("Fal Spend Limit $50/day, set 2026-05-22") so a future reader knows it exists.
268
+
269
+ ## Related Skills
270
+
271
+ - **invariant-guard** — when the loop or recursion calling the paid API has no written termination measure. Termination is a precondition for a wallet cap; invariant-guard establishes it, runaway-guard bounds the cost.
272
+ - **complexity-cuts** — when the runaway has already shipped and you are diagnosing an unexpected bill. Treat the unintended fan-out as a complexity bug, write a characterization test, then transform one step at a time.
273
+ - **lemmaly** — when designing a new agent loop or batch pipeline that fans out paid calls. Pick the algorithm and data structure first; come back here for the wallet invariant per step.
274
+ - **mathguard** — when the cost driver is compute on a sublinear-algorithm problem (vector search, sketching, FFT) rather than per-call billing; mathguard sets the algorithmic floor that determines per-call work.
275
+
276
+ ## Rationalizations to watch for
277
+
278
+ | Excuse | Reality |
279
+ |---|---|
280
+ | "I'm only testing locally." | Local hits the same paid endpoint. A retry bug in test code bills the same dollars. |
281
+ | "The list is small, fan-out is fine." | The list is small *today*. Next week it is fetched from a table that grew 50×. The cap exists for next week. |
282
+ | "Inngest already retries, so I don't need a retry policy." | Inngest retries × your retry wrapper × SDK retries = 27 attempts. Each one bills. |
283
+ | "The API call is cheap, $0.001." | At 10,000 unintended invocations that is $10 — and the count is exactly what you failed to bound. |
284
+ | "I'll set the provider cap later." | The bug ships before "later". Set the cap in the 60 seconds it takes; the code can wait. |
285
+ | "Idempotency is overkill for this." | Webhooks retry. Load balancers retry. Browsers retry. Without an idempotency key, *something* will duplicate. |
286
+ | "We have monitoring, we'll catch it." | Monitoring catches it after $200 is spent. Caps prevent the $200 from being spent. |
287
+ | "It obviously terminates." | The $200/night incident also "obviously terminated". Write the integer bound. |
288
+
289
+ If any of these sound familiar mid-thought: stop, write the cost contract, set the provider cap, then write the code.
290
+
291
+ ## Red flags — STOP and write the cost contract first
292
+
293
+ - About to write `await Promise.all(items.map(x => paidApi(x)))` with no `p-limit`.
294
+ - About to write `while (!done) await paidApi(...)` with no integer bound.
295
+ - About to write an agent loop with "the model decides when to stop".
296
+ - About to write a retry wrapper around a call that is already retried by Inngest / SDK / framework.
297
+ - About to deploy a paid API key without first setting the provider dashboard cap.
298
+ - About to commit a paid API key to a `.env` shared across environments.
299
+ - About to handle a webhook that calls the API that produced the webhook.
300
+ - "Just for tonight" — overnight is exactly when runaway loops bill the most.
301
+
302
+ All of these mean: stop, write the cost contract, set the provider cap, then write the code.
303
+
304
+ ## Verification checklist
305
+
306
+ Before shipping any code that calls a paid API:
307
+
308
+ - [ ] Cost contract comment exists above each call site with unit cost, max calls/run, max $/run, provider cap.
309
+ - [ ] The iteration / fan-out bound is a named integer constant, not implicit in list length.
310
+ - [ ] Concurrency limit is set in code (`p-limit`) AND at the queue (`Inngest concurrency`).
311
+ - [ ] Retry policy is explicit: max attempts, 4xx → no retry, idempotency key per call.
312
+ - [ ] Provider dashboard hard cap is set and the value is documented in the file.
313
+ - [ ] Per-environment API keys; dev keys have lower caps than prod.
314
+ - [ ] Amplifier audit (rule 7) has been performed and either "none apply" or each addressed.
315
+ - [ ] A test exists for: empty input, oversized input rejected, 4xx not retried, idempotency key dedups duplicate invocation.
316
+ - [ ] In the worst case the code bills ≤ MAX_$_PER_RUN, and even with a bug the provider cap stops loss at MAX_$_PER_DAY.
317
+
318
+ Cannot check every box? The code is example-correct, not bill-correct. Either fill the gap or do not connect a billing-enabled key.
319
+
320
+ ## Limitations
321
+
322
+ - **Not a billing system.** runaway-guard enforces *intent* (caps, contracts, audits) at code-write time. It does not meter spend in production — pair it with the provider's hard cap and observability (LLM-cost dashboards, log alerts) for runtime enforcement.
323
+ - **Provider-side caps may take minutes to enforce.** Anthropic Workspace Budgets, OpenAI usage limits, and Fal Spend Limits are reconciled on a delay measured in minutes, not milliseconds. A pathological burst within a single window can still exceed the cap modestly.
324
+ - **No automated cost estimation for novel models.** The cost-contract numbers (unit cost, $/run) are inputs the author must look up; the skill does not maintain a per-model price table.
325
+ - **Streaming and per-token pricing.** For per-token APIs (Anthropic, OpenAI), `max calls` is a proxy — the real cap is `max input tokens × max output tokens × per-token rate`. Adapt the protocol: replace `max calls per run` with `max tokens per run`.
326
+ - **Compute-billed providers.** For long-running GPU jobs (training, video encoding) billed in seconds, replace "calls" with "GPU-seconds" in the contract; the discipline transfers but the units differ.
327
+ - **Does not replace incident response.** When a bill has already arrived, escalate to `complexity-cuts` for the corrective rewrite — runaway-guard prevents the next one, not the current one.
328
+
329
+ ## The thesis, in one line
330
+
331
+ > **Time bounds prevent stalls. Space bounds prevent OOMs. Dollar bounds prevent $200 mornings. AI assistants enforce the first two by default and ignore the third. runaway-guard makes them reason about the wallet first.**
@@ -0,0 +1,319 @@
1
+ ---
2
+ name: schema-markup-generator
3
+ description: "Generate and implement JSON-LD structured data for web apps, tool pages, blogs, FAQs, and SaaS sites. Supports WebSite, SoftwareApplication, BlogPosting, FAQPage, HowTo, BreadcrumbList, and Organization schemas."
4
+ category: seo
5
+ risk: safe
6
+ source: self
7
+ source_type: self
8
+ date_added: "2026-05-31"
9
+ author: Whoisabhishekadhikari
10
+ tags: [seo, schema, json-ld, structured-data, rich-results, nextjs, technical-seo]
11
+ tools: [claude, cursor, gemini, claude-code]
12
+ version: 1.0.0
13
+ ---
14
+
15
+ # Schema Markup Generator Skill
16
+
17
+ Add JSON-LD structured data to pages to unlock rich results, improve CTR, and signal context to Google and AI systems.
18
+
19
+ ---
20
+
21
+ ## When to Use
22
+
23
+ - Use when adding or auditing JSON-LD schema for websites, SaaS apps, tools, articles, FAQs, breadcrumbs, or organization pages.
24
+ - Use when schema must be implemented in Next.js App Router or validated against Google Rich Results and Schema.org tooling.
25
+ - Use when a page has strong content but lacks structured data for search engines and rich-result eligibility.
26
+
27
+ ---
28
+
29
+ ## How to Add Schema in Next.js App Router
30
+
31
+ The cleanest approach is a reusable `JsonLd` component:
32
+
33
+ ```jsx
34
+ // components/JsonLd.jsx
35
+ export function JsonLd({ data }) {
36
+ return (
37
+ <script
38
+ type="application/ld+json"
39
+ dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
40
+ />
41
+ );
42
+ }
43
+ ```
44
+
45
+ Use it in any page:
46
+ ```jsx
47
+ import { JsonLd } from '@/components/JsonLd';
48
+
49
+ export default function MyPage() {
50
+ return (
51
+ <>
52
+ <JsonLd data={mySchemaObject} />
53
+ {/* rest of page */}
54
+ </>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Schema Types by Page Type
62
+
63
+ ### WebSite + Sitelinks Searchbox (homepage only)
64
+ ```js
65
+ {
66
+ "@context": "https://schema.org",
67
+ "@type": "WebSite",
68
+ "name": "100 SEO Tools",
69
+ "url": "https://www.100seotools.com",
70
+ "description": "Free online SEO tools for keyword research, technical audits, and more.",
71
+ "potentialAction": {
72
+ "@type": "SearchAction",
73
+ "target": {
74
+ "@type": "EntryPoint",
75
+ "urlTemplate": "https://www.100seotools.com/search?q={search_term_string}"
76
+ },
77
+ "query-input": "required name=search_term_string"
78
+ }
79
+ }
80
+ ```
81
+
82
+ ---
83
+
84
+ ### SoftwareApplication (tool / SaaS app pages)
85
+ ```js
86
+ {
87
+ "@context": "https://schema.org",
88
+ "@type": "SoftwareApplication",
89
+ "name": "Keyword Density Checker",
90
+ "applicationCategory": "WebApplication",
91
+ "operatingSystem": "Web",
92
+ "url": "https://www.100seotools.com/tools/keyword-density-checker",
93
+ "description": "Free keyword density checker tool. Analyze keyword frequency and optimize your content for SEO.",
94
+ "offers": {
95
+ "@type": "Offer",
96
+ "price": "0",
97
+ "priceCurrency": "USD"
98
+ },
99
+ "featureList": [
100
+ "Analyze keyword frequency",
101
+ "Detect over-optimization",
102
+ "Export results as CSV"
103
+ ],
104
+ "provider": {
105
+ "@type": "Organization",
106
+ "name": "100 SEO Tools",
107
+ "url": "https://www.100seotools.com"
108
+ }
109
+ }
110
+ ```
111
+
112
+ ---
113
+
114
+ ### Article / BlogPosting (blog posts)
115
+ ```js
116
+ {
117
+ "@context": "https://schema.org",
118
+ "@type": "BlogPosting",
119
+ "headline": "How to Improve Your Core Web Vitals in 2025",
120
+ "description": "A practical guide to improving LCP, FID, and CLS scores for better rankings.",
121
+ "url": "https://www.100seotools.com/blog/improve-core-web-vitals",
122
+ "datePublished": "2025-01-15",
123
+ "dateModified": "2025-03-20",
124
+ "author": {
125
+ "@type": "Person",
126
+ "name": "Jane Smith",
127
+ "url": "https://www.100seotools.com/author/jane-smith"
128
+ },
129
+ "publisher": {
130
+ "@type": "Organization",
131
+ "name": "100 SEO Tools",
132
+ "logo": {
133
+ "@type": "ImageObject",
134
+ "url": "https://www.100seotools.com/logo.png"
135
+ }
136
+ },
137
+ "image": {
138
+ "@type": "ImageObject",
139
+ "url": "https://www.100seotools.com/images/blog/core-web-vitals.jpg",
140
+ "width": 1200,
141
+ "height": 630
142
+ },
143
+ "mainEntityOfPage": {
144
+ "@type": "WebPage",
145
+ "@id": "https://www.100seotools.com/blog/improve-core-web-vitals"
146
+ }
147
+ }
148
+ ```
149
+
150
+ ---
151
+
152
+ ### FAQPage (FAQ sections, tool help pages)
153
+ ```js
154
+ {
155
+ "@context": "https://schema.org",
156
+ "@type": "FAQPage",
157
+ "mainEntity": [
158
+ {
159
+ "@type": "Question",
160
+ "name": "What is keyword density?",
161
+ "acceptedAnswer": {
162
+ "@type": "Answer",
163
+ "text": "Keyword density is the percentage of times a keyword appears in a piece of content relative to the total word count. A healthy keyword density is typically 1-3%."
164
+ }
165
+ },
166
+ {
167
+ "@type": "Question",
168
+ "name": "Is this tool free to use?",
169
+ "acceptedAnswer": {
170
+ "@type": "Answer",
171
+ "text": "Yes, our keyword density checker is completely free with no registration required."
172
+ }
173
+ }
174
+ ]
175
+ }
176
+ ```
177
+
178
+ ---
179
+
180
+ ### HowTo (step-by-step tool guides)
181
+ ```js
182
+ {
183
+ "@context": "https://schema.org",
184
+ "@type": "HowTo",
185
+ "name": "How to Check Keyword Density",
186
+ "description": "Step-by-step guide to analyzing keyword density using our free tool.",
187
+ "totalTime": "PT2M",
188
+ "step": [
189
+ {
190
+ "@type": "HowToStep",
191
+ "position": 1,
192
+ "name": "Paste your content",
193
+ "text": "Copy your article or webpage content and paste it into the text area.",
194
+ "image": "https://www.100seotools.com/images/how-to/step1.jpg"
195
+ },
196
+ {
197
+ "@type": "HowToStep",
198
+ "position": 2,
199
+ "name": "Enter your target keyword",
200
+ "text": "Type the keyword you want to analyze in the keyword field."
201
+ },
202
+ {
203
+ "@type": "HowToStep",
204
+ "position": 3,
205
+ "name": "Click Analyze",
206
+ "text": "Press the Analyze button to get your keyword density report instantly."
207
+ }
208
+ ]
209
+ }
210
+ ```
211
+
212
+ ---
213
+
214
+ ### BreadcrumbList (all non-homepage pages)
215
+ ```js
216
+ {
217
+ "@context": "https://schema.org",
218
+ "@type": "BreadcrumbList",
219
+ "itemListElement": [
220
+ {
221
+ "@type": "ListItem",
222
+ "position": 1,
223
+ "name": "Home",
224
+ "item": "https://www.100seotools.com"
225
+ },
226
+ {
227
+ "@type": "ListItem",
228
+ "position": 2,
229
+ "name": "SEO Tools",
230
+ "item": "https://www.100seotools.com/tools"
231
+ },
232
+ {
233
+ "@type": "ListItem",
234
+ "position": 3,
235
+ "name": "Keyword Density Checker",
236
+ "item": "https://www.100seotools.com/tools/keyword-density-checker"
237
+ }
238
+ ]
239
+ }
240
+ ```
241
+
242
+ ---
243
+
244
+ ### Organization (about, contact pages)
245
+ ```js
246
+ {
247
+ "@context": "https://schema.org",
248
+ "@type": "Organization",
249
+ "name": "100 SEO Tools",
250
+ "url": "https://www.100seotools.com",
251
+ "logo": "https://www.100seotools.com/logo.png",
252
+ "sameAs": [
253
+ "https://twitter.com/100seotools",
254
+ "https://www.linkedin.com/company/100seotools"
255
+ ],
256
+ "contactPoint": {
257
+ "@type": "ContactPoint",
258
+ "contactType": "customer support",
259
+ "email": "hello@100seotools.com"
260
+ }
261
+ }
262
+ ```
263
+
264
+ ---
265
+
266
+ ## Combining Multiple Schemas on One Page
267
+
268
+ A tool page can have BreadcrumbList + SoftwareApplication + FAQPage:
269
+
270
+ ```jsx
271
+ export default function ToolPage() {
272
+ return (
273
+ <>
274
+ <JsonLd data={breadcrumbSchema} />
275
+ <JsonLd data={softwareApplicationSchema} />
276
+ <JsonLd data={faqSchema} />
277
+ {/* page content */}
278
+ </>
279
+ );
280
+ }
281
+ ```
282
+
283
+ Each schema lives in its own `<script>` tag — do NOT merge them into one object.
284
+
285
+ ---
286
+
287
+ ## Validation
288
+
289
+ Always validate schema before deploying:
290
+
291
+ 1. **Google Rich Results Test** — https://search.google.com/test/rich-results
292
+ 2. **Schema.org Validator** — https://validator.schema.org/
293
+ 3. **Google Search Console** → Enhancements → check for warnings after deployment
294
+
295
+ ```bash
296
+ # Quick check: schema appears in HTML
297
+ curl -s https://www.yourdomain.com/tools/keyword-density | grep -A 5 "application/ld+json"
298
+ ```
299
+
300
+ ---
301
+
302
+ ## Schema Markup Checklist
303
+
304
+ - [ ] Homepage has `WebSite` schema
305
+ - [ ] Tool/app pages have `SoftwareApplication` schema
306
+ - [ ] Blog posts have `BlogPosting` / `Article` schema
307
+ - [ ] FAQ sections have `FAQPage` schema
308
+ - [ ] Step-by-step guides have `HowTo` schema
309
+ - [ ] All non-homepage pages have `BreadcrumbList`
310
+ - [ ] About/contact page has `Organization` schema
311
+ - [ ] All URLs in schema are absolute HTTPS
312
+ - [ ] Schema validated with Google Rich Results Test
313
+ - [ ] No schema errors in Google Search Console
314
+
315
+ ## Limitations
316
+
317
+ - Does not guarantee rich-result eligibility or display; Google and other consumers decide whether to use valid schema.
318
+ - Generated examples must be adapted to the site's real content, legal entity details, ratings, pricing, and availability.
319
+ - Always validate deployed HTML, not only source code, because frameworks and rendering modes can change the final markup.
@@ -2,13 +2,17 @@
2
2
  name: sendblue-api
3
3
  description: "Send and receive iMessage, SMS, and RCS from application code via the Sendblue HTTP API — text, media, group messages, send styles, reactions, typing indicators, status callbacks, and inbound webhooks."
4
4
  category: api-integration
5
- risk: safe
5
+ risk: critical
6
6
  source: community
7
7
  source_type: official
8
8
  date_added: "2026-05-22"
9
9
  author: AnthonyFirth
10
10
  tags: [sendblue, imessage, sms, rcs, messaging, api, webhooks]
11
11
  tools: [claude, cursor, gemini]
12
+ plugin:
13
+ targets:
14
+ codex: blocked
15
+ claude: blocked
12
16
  ---
13
17
 
14
18
  # Sendblue API
@@ -167,6 +171,7 @@ Status callback payloads (`outbound`) mirror the send-message response and updat
167
171
  ## Security & Safety Notes
168
172
 
169
173
  - Keep `sb-api-key-id` and `sb-api-secret-key` server-side. They are not safe in browser, mobile, or CI logs.
174
+ - Treat every outbound send, contact/webhook mutation, read receipt, reaction, or typing indicator as state-changing. Preview the recipient, sender line, content, and callback/webhook changes, then wait for explicit user confirmation before sending.
170
175
  - Webhook endpoints should be on HTTPS and idempotent — same `message_handle` may arrive more than once.
171
176
  - Sensitive data in message content is visible in lock-screen previews on the recipient's device. Don't embed secrets, tokens, or full PII — link to an authenticated dashboard or shortened payload instead.
172
177
  - Rotate API keys from the Sendblue dashboard if either value is exposed; the old pair is invalidated on rotation.