Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

promo-banner

БесплатноБез исполняемых скриптовНе проверен

Configure and verify promotional campaigns using the shared banner system. Use when enabling or reusing seasonal offers, setting bonus credits, selecting…

gianpajот gianpaj★ 28 звёзд на GitHub16 установок в других каталогах

Об этом скилле

Promo banner setup

Configure a promotional banner through the shared banner registry. Existing placements already resolve and render the highest-priority active banner.

Inspect the campaign

Inspect apps/web/lib/banners/registry.ts, existing copy under promos in apps/web/messages/*.json, relevant environment values, and apps/web/lib/stripe/pricing.ts before editing. Reuse a registered banner when its offer, placements, and dismissal behavior fit; add an entry only when needed.

Confirm the target environment (local, preview, or production), offer type, package bonuses, and campaign end time. Inspect only relevant configuration; do not print secrets. Do not deploy, modify Stripe resources, or make a payment unless the user requests it.

For campaign copy, follow the positioning and claims guidance in .agents/product-marketing.md as required by AGENTS.md.

Configure the campaign

Set the active registry entry in apps/web/.env.local or the deployment environment:

# Required
NEXT_PUBLIC_PROMO_ENABLED=true
NEXT_PUBLIC_ACTIVE_PROMO_BANNER=winterSaleBanner

# Optional presentation
NEXT_PUBLIC_PROMO_THEME=pink
# Only if the selected registry entry supports a countdown
# NEXT_PUBLIC_PROMO_COUNTDOWN_END_DATE=2027-01-31T23:59:59Z

# Only for Stripe metadata and bonus-credit campaigns
NEXT_PUBLIC_PROMO_ID=winter_sale_2027
NEXT_PUBLIC_PROMO_BONUS_STARTER=2000
NEXT_PUBLIC_PROMO_BONUS_STANDARD=7500
NEXT_PUBLIC_PROMO_BONUS_PRO=105000

Set NEXT_PUBLIC_ACTIVE_PROMO_BANNER explicitly to select a promo banner. When it is unset or empty, no promo banner is selected. NEXT_PUBLIC_PROMO_ID does not select the banner or name its dismissal cookie.

Offer behavior and expiry

Control Effect
NEXT_PUBLIC_PROMO_ENABLED Enables promo banner selection, bonus-credit pricing, and promo metadata; does not control announcements.
NEXT_PUBLIC_ACTIVE_PROMO_BANNER Selects the banner, not the financial offer.
NEXT_PUBLIC_PROMO_BONUS_* Adds credits without reducing the payment amount.
Stripe first-month coupon Separately discounts eligible subscribers' checkout prices; see Stripe configuration.

Banner absence or dismissal does not disable bonus-credit pricing. The Stripe coupon is independent of the promo flag; verify its validity and eligibility when a campaign advertises a price discount. Do not treat the displayed discount percentage as proof of the coupon's actual terms.

Check advertised percentages against package totals from apps/web/lib/stripe/pricing.ts. Subscription credits are Math.round((baseCredits + promoBonus) * SUBSCRIPTION_BONUS_MULTIPLIER); the multiplier is 1.15. The displayed monthly bonus includes both the promo and subscription bonuses. For example, a 25,000-credit package with 7,500 promo credits yields 32,500 one-time credits or 37,375 monthly credits. Extra credits are not a percentage reduction in price.

A countdown controls banner presentation, not offer eligibility. It requires a registry countdown definition, localized countdown labels, and an end-date environment value. Setting the environment value alone does not add a timer. The server resolver excludes expired countdown banners when it runs; the client also checks expiry when resolving visibility and while a displayed timer runs. Shared expiry logic lives in apps/web/lib/banners/countdown.ts. This only ends banner display, not the financial offer.

Confirm the shutdown procedure: disable the promo flag in the target environment to stop promo bonuses and banner selection, and end any Stripe coupon offer independently. Follow the deployment workflow for environment changes in deployment guidance. Do not promise automatic expiry unless the billing path enforces it.

Register the banner

For a new banner, add an entry to apps/web/lib/banners/registry.ts. The id must match the active environment value and the translation key. Give each banner a stable, unique dismissal cookie.

yourPromoBanner: {
  countdown: {
    endDateEnvVar: 'NEXT_PUBLIC_PROMO_COUNTDOWN_END_DATE',
  },
  cta: {
    loggedInHref: creditsHref,
    loggedOutHref: signupHref,
  },
  dismiss: {
    cookieKey: 'banner-your-promo-dismissed',
    days: 30,
  },
  id: 'yourPromoBanner',
  kind: 'promo',
  placements: ['landing', 'dashboard', 'blog'],
  priority: 100,
},

Omit countdown when the banner has no deadline. Choose only the placements where the banner belongs.

Add localized cop

Полный SKILL.md на GitHub

Установить promo-banner в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл promo-banner?

Configure and verify promotional campaigns using the shared banner system. Use when enabling or reusing seasonal offers, setting bonus credits, selecting banner themes and placements, or testing promo pricing, countdowns, and dismissal across the homepage, dashboard, and blog.

Как установить скилл promo-banner?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл promo-banner запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить promo-banner с