[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M719R5BFDMX8W3V8J2RRZC4J":3,"skill-same:01M719R5BFDMX8W3V8J2RRZC4J":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M719R5BFDMX8W3V8J2RRZC4J","stripe-integration",null,"dahaliztupe-sketch\u002FKalmeron-Two","dahaliztupe-sketch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F271085317?v=4","01M719765Q83P08JCQ1SWNQR0N","01M719766HQBGF44W90MPJKTD2",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstripe-integration\u002FSKILL.md",[],[17,18,19],"integration","stripe integration","stripe","2026-11-10 10:12:30",false,"---\nname: stripe-integration\ndescription: Stripe payment integration patterns for Next.js App Router. Use when implementing payment flows, subscription management, webhook handling, or billing features. Note: Kalmeron uses Fawry (Egypt) as primary payment processor — use this skill when adding Stripe as an alternative.\n---\n\n# Stripe Integration Patterns for Next.js\n\nOfficial patterns from Stripe engineering.\n\n## Setup\n```bash\nnpm install stripe @stripe\u002Fstripe-js\n```\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fpayments\u002Fstripe.ts — server-side client\nimport Stripe from 'stripe';\nexport const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {\n  apiVersion: '2024-12-18.acacia',\n  typescript: true,\n});\n\n\u002F\u002F src\u002Flib\u002Fpayments\u002Fstripe-client.ts — client-side\nimport { loadStripe } from '@stripe\u002Fstripe-js';\nexport const stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n```\n\n## Checkout Session Pattern\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fcheckout\u002Froute.ts\nimport { stripe } from '@\u002Flib\u002Fpayments\u002Fstripe';\nimport { getServerSession } from '@\u002Flib\u002Fauth\u002Fsession';\n\nexport async function POST(req: NextRequest) {\n  const session = await getServerSession();\n  if (!session) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });\n\n  const checkoutSession = await stripe.checkout.sessions.create({\n    mode: 'subscription',\n    customer_email: session.user.email,\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling?success=true`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling`,\n    metadata: { userId: session.user.id },\n  });\n\n  return NextResponse.json({ url: checkoutSession.url });\n}\n```\n\n## Webhook Handler (Critical)\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fwebhook\u002Froute.ts\nimport { stripe } from '@\u002Flib\u002Fpayments\u002Fstripe';\nimport { headers } from 'next\u002Fheaders';\n\nexport async function POST(req: NextRequest) {\n  const body = await req.text();\n  const signature = headers().get('stripe-signature')!;\n\n  let event: Stripe.Event;\n  try {\n    event = stripe.webhooks.constructEvent(\n      body,\n      signature,\n      process.env.STRIPE_WEBHOOK_SECRET!\n    );\n  } catch {\n    return NextResponse.json({ error: 'Invalid signature' }, { status: 400 });\n  }\n\n  switch (event.type) {\n    case 'checkout.session.completed':\n      await handleCheckoutCompleted(event.data.object);\n      break;\n    case 'customer.subscription.updated':\n      await handleSubscriptionUpdated(event.data.object);\n      break;\n    case 'customer.subscription.deleted':\n      await handleSubscriptionCanceled(event.data.object);\n      break;\n  }\n\n  return NextResponse.json({ received: true });\n}\n```\n\n## Subscription Plans (Kalmeron mapping)\n```typescript\n\u002F\u002F Map Kalmeron plans to Stripe price IDs\nconst PLAN_PRICE_MAP = {\n  starter: process.env.STRIPE_PRICE_STARTER!,\n  pro: process.env.STRIPE_PRICE_PRO!,\n  enterprise: process.env.STRIPE_PRICE_ENTERPRISE!,\n} as const;\n```\n\n## Customer Portal\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fportal\u002Froute.ts\nconst portalSession = await stripe.billingPortal.sessions.create({\n  customer: stripeCustomerId,\n  return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling`,\n});\nreturn NextResponse.redirect(portalSession.url);\n```\n\n## Kalmeron Context\n\nKalmeron's primary payment processor is **Fawry** (Egypt-specific).\nStripe is a secondary option for international users.\n\nExisting Fawry integration: `app\u002Fapi\u002Fbilling\u002Ffawry\u002Fcheckout\u002Froute.ts`\nFawry dialog component: `components\u002Fbilling\u002FFawryDialog.tsx`\n\nWhen adding Stripe:\n1. Add to Replit Secrets: `STRIPE_SECRET_KEY`, `STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET`\n2. Create new routes under `app\u002Fapi\u002Fbilling\u002Fstripe\u002F`\n3. Add Stripe option to `FawryDialog.tsx` or create `StripeDialog.tsx`\n4. Update `registry.ts` — add `stripe-integration` to `cfo_agent`\n\n## Security Notes\n- Never log full Stripe events (contain PII)\n- Always verify webhook signatures with `constructEvent()`\n- Store `stripeCustomerId` in Firestore, never in client state\n- Use `stripe.webhooks.constructEvent()` with raw body (not parsed JSON)\n","# Stripe Integration Patterns for Next.js\n\nOfficial patterns from Stripe engineering.\n\n## Setup\n```bash\nnpm install stripe @stripe\u002Fstripe-js\n```\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fpayments\u002Fstripe.ts — server-side client\nimport Stripe from 'stripe';\nexport const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {\n  apiVersion: '2024-12-18.acacia',\n  typescript: true,\n});\n\n\u002F\u002F src\u002Flib\u002Fpayments\u002Fstripe-client.ts — client-side\nimport { loadStripe } from '@stripe\u002Fstripe-js';\nexport const stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n```\n\n## Checkout Session Pattern\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fcheckout\u002Froute.ts\nimport { stripe } from '@\u002Flib\u002Fpayments\u002Fstripe';\nimport { getServerSession } from '@\u002Flib\u002Fauth\u002Fsession';\n\nexport async function POST(req: NextRequest) {\n  const session = await getServerSession();\n  if (!session) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });\n\n  const checkoutSession = await stripe.checkout.sessions.create({\n    mode: 'subscription',\n    customer_email: session.user.email,\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling?success=true`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling`,\n    metadata: { userId: session.user.id },\n  });\n\n  return NextResponse.json({ url: checkoutSession.url });\n}\n```\n\n## Webhook Handler (Critical)\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fwebhook\u002Froute.ts\nimport { stripe } from '@\u002Flib\u002Fpayments\u002Fstripe';\nimport { headers } from 'next\u002Fheaders';\n\nexport async function POST(req: NextRequest) {\n  const body = await req.text();\n  const signature = headers().get('stripe-signature')!;\n\n  let event: Stripe.Event;\n  try {\n    event = stripe.webhooks.constructEvent(\n      body,\n      signature,\n      process.env.STRIPE_WEBHOOK_SECRET!\n    );\n  } catch {\n    return NextResponse.json({ error: 'Invalid signature' }, { status: 400 });\n  }\n\n  switch (event.type) {\n    case 'checkout.session.completed':\n      await handleCheckoutCompleted(event.data.object);\n      break;\n    case 'customer.subscription.updated':\n      await handleSubscriptionUpdated(event.data.object);\n      break;\n    case 'customer.subscription.deleted':\n      await handleSubscriptionCanceled(event.data.object);\n      break;\n  }\n\n  return NextResponse.json({ received: true });\n}\n```\n\n## Subscription Plans (Kalmeron mapping)\n```typescript\n\u002F\u002F Map Kalmeron plans to Stripe price IDs\nconst PLAN_PRICE_MAP = {\n  starter: process.env.STRIPE_PRICE_STARTER!,\n  pro: process.env.STRIPE_PRICE_PRO!,\n  enterprise: process.env.STRIPE_PRICE_ENTERPRISE!,\n} as const;\n```\n\n## Customer Portal\n```typescript\n\u002F\u002F app\u002Fapi\u002Fbilling\u002Fstripe\u002Fportal\u002Froute.ts\nconst portalSession = await stripe.billingPortal.sessions.create({\n  customer: stripeCustomerId,\n  return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fbilling`,\n});\nreturn NextResponse.redirect(portalSession.url);\n```\n\n## Kalmeron Context\n\nKalmeron's primary payment processor is **Fawry** (Egypt-specific).\nStripe is a secondary option for international users.\n\nExisting Fawry integration: `app\u002Fapi\u002Fbilling\u002Ffawry\u002Fcheckout\u002Froute.ts`\nFawry dialog component: `components\u002Fbilling\u002FFawryDialog.tsx`\n\nWhen adding Stripe:\n1. Add to Replit Secrets: `STRIPE_SECRET_KEY`, `STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET`\n2. Create new routes under `app\u002Fapi\u002Fbilling\u002Fstripe\u002F`\n3. Add Stripe option to `FawryDialog.tsx` or create `StripeDialog.tsx`\n4. Update `registry.ts` — add `stripe-integration` to `cfo_agent`\n\n## Security Notes\n- Never log full Stripe events (contain PII)\n- Always verify webhook signatures with `constructEvent()`\n- Store `stripeCustomerId` in Firestore, never in client state\n- Use `stripe.webhooks.constructEvent()` with raw body (not parsed JSON)\n",{},"main","13d9afadbb6a87d6209fe4bd6ca2bbe4553119ac",".agents\u002Fskills\u002Fstripe-integration",0,"https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two","https:\u002F\u002Fkalmeron-two.vercel.app","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch","2026-10-05 12:24:53",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add dahaliztupe-sketch\u002FKalmeron-Two --skill stripe-integration",{"tool":39,"command":40},"bunx","bunx skills add dahaliztupe-sketch\u002FKalmeron-Two --skill stripe-integration",{"tool":42,"command":43},"pnpm","pnpm dlx skills add dahaliztupe-sketch\u002FKalmeron-Two --skill stripe-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstripe-integration\u002FSKILL.md",true,[],[48,57,64,76,91,108],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":52,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":56},"01M73HK3SBGDHWYP2ZTMJHSJ33","skill-creator","To create new CLI skills following Anthropic's official best practices with zero manual configuration. This skill automates brainstorming, template application, validation, and installation processes while maintaining progressive disclosure patterns and writing style standards.","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-creator\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-creator\u002Fskill-creator\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":56},"01M73HA3PK4C7YS0D3VD9FQ8QA","business-investment-advisor","Business investment analysis and capital allocation advisor. Use when evaluating whether to invest in equipment, real estate, a new business, hiring, technology, or any capital expenditure. Also use for ROI calculations, IRR, NPV, payback period, build vs buy decisions, lease vs buy analysis, vendor evaluation, or deciding where to allocate limited budget for maximum return.","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffinance-skills\u002Fbusiness-investment-advisor\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":68,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":20},"01M719SWYD9RGS97HJ69PXWY62","add-new-agent","خطوات تفصيليّة لإضافة وكيل ذكاء اصطناعي جديد إلى منصّة Kalmeron من الفكرة إلى الإنتاج","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002FSKILL.md",[],[72,73,74,75],"add","add new agent","new","new agent",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":20},"01M719SSKNBA7T5NS7V6DP0PX4","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[83,84,74,85,86,87,88,89,90],"writing skills","writing","when","work","editing","deployment","use","Existing",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M719SRFDNKA3044QD3FYZ05R","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[98,84,99,100,101,102,103,104,105,89,85,106,107],"writing plans","plans","task","code","multi","spec","multi-step task","for","you","requirements",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M719SPN5FM1JYJSR9DGJQPZ0","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Fdahaliztupe-sketch\u002FKalmeron-Two\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[115,116,117,118,119,120,105,121,122,123,101,124,125,126,127,128,85,89,129,130],"design","guidelines","web","web design guidelines","web design","vercel","accessibility","best practices","file","review","check","compliance","audit","ux","web interface guidelines","interface"]