把任何东西变成 SKILL.md
粘贴网址、文档或一段对话,得到可以直接放进 Claude Code 的 SKILL.md。
使用方法
- 1
粘贴
文档链接、教程、README,或你解释过这项任务的一段对话。
- 2
生成
得到一份 SKILL.md:合法的 name、能触发的 description、步骤和产出格式。
- 3
安装到你的 agent
保存到 ~/.claude/skills/<name>/,下次会话 agent 就会加载它。
mkdir -p ~/.claude/skills/<name> mv SKILL.md ~/.claude/skills/<name>/SKILL.md
生成效果
两份由公开页面生成、未经修改的 SKILL.md。
---
name: stripe-webhook-handler
description: Builds and reviews Stripe webhook endpoints - signature verification, idempotency, event routing and retries. Use when the user adds a Stripe webhook, debugs "No signatures found matching the expected signature", or handles checkout.session.completed / invoice events.
---
# Stripe Webhook Handler
## Non-negotiables
- Verify the signature against the **raw** request body with the endpoint secret (`whsec_…`). Never parse JSON first.
- Return `2xx` quickly; do slow work after acknowledging, or in a queue.
- Make every handler idempotent: store `event.id` (or the object id + state) under a unique key and skip repeats. Stripe retries for up to 3 days.
- Events can arrive out of order. Re-fetch the object from the API when the order matters.
- Check `livemode` and the account so test events never touch production data.
## Steps
1. Read the raw body (`await request.text()` in fetch handlers; `express.raw({ type: 'application/json' })` in Express).
2. `stripe.webhooks.constructEvent(body, sigHeader, secret)`; on failure return 400.
3. `switch (event.type)` over only the events the app needs; return 200 for the rest.
4. Within one database transaction: claim the event id, apply the change.
5. Log `event.id` and `event.type`, never the payload's personal data.
## Events most apps need
| Event | Do |
|---|---|
| `checkout.session.completed` | Mark the order paid (check `payment_status === 'paid'`) |
| `invoice.paid` | Extend the subscription period |
| `invoice.payment_failed` | Flag the account, email the customer |
| `customer.subscription.deleted` | End access at `current_period_end` |
| `charge.refunded` | Revoke what the payment granted |
## Testing
`stripe listen --forward-to localhost:3000/api/stripe/webhook`, then `stripe trigger checkout.session.completed`.
--- name: meeting-notes-to-actions description: Turns raw meeting transcripts or notes into decisions, action items with owners and dates, and open questions. Use when the user pastes a transcript, call recording text, or messy notes and wants a summary or follow-ups. --- # Meeting Notes to Actions ## Extract 1. **Decisions** – things agreed; quote the deciding line when ambiguous. 2. **Action items** – verb-first task, one owner, a due date. If no owner or date was said, write `owner: ?` / `due: ?` rather than guessing. 3. **Open questions** – raised but not resolved, with who should answer. 4. **Risks / blockers** mentioned. ## Rules - Attribute by name as spoken; don't infer who "we" is. - Drop small talk and repeated points. - Keep numbers, dates and names exactly as said. ## Output format ```markdown ## Summary Two or three sentences. ## Decisions - … ## Action items - [ ] Ship pricing page copy — @Dana — due Fri 6 Dec ## Open questions - … ``` Offer a version formatted as a follow-up email when asked.
常见问题
关于 SKILL.md 文件和本生成器的简短解答。