activity-campaign-from-ui
Generate a new campaign from campaign UI references, then deliver an H5/Web visual-first front-end draft on a fixed stack.
Use when
Use this skill when the user:
- provides one or more campaign/activity page screenshots
- provides a campaign design preview and wants a new campaign generated from it
- wants campaign references turned into a proposal, page architecture, or H5/Web high-fidelity draft code
- wants a structured handoff for an activity page on a fixed stack
Do not use when
Do not use this skill when:
- the request is unrelated to campaign/activity pages
- the user only wants raw OCR
- the task requires exact locked-design export
- the user wants production-ready backend logic or hidden business rules not visible from the reference
- the user wants a delivery stack outside this skill's fixed target
Fixed platform and stack
Always stay on this fixed delivery target:
- Platform: H5 / Web
- Stack: HTML + CSS + JavaScript
Do not output code in other stacks.
Modes
This skill supports one skill with multiple modes.
analysis
Use when the user wants to understand the reference.
Return:
- observed UI structure
- visible text
- gameplay clues
- user flow clues
- uncertainty notes
proposal
Use when the user wants a new campaign idea from the reference.
Return:
- reference summary
- gameplay abstraction
- new campaign concept
- target users
- goals
- rewards and participation path
- anti-copy explanation
- visual proposal direction that reads more like an operations campaign deck than a plain memo
architecture
Use when the user wants implementation planning without full code.
Return:
- page module list
- module order
- popup system
- state flow
- tracking suggestions
- delivery schema
delivery
Use when the user wants code on the fixed stack.
Return:
- file structure
index.html
styles.css
main.js
mock-data.js
- visual extraction summary
- implementation notes
full
Use when the user wants the full flow.
Return:
- reference analysis
- gameplay abstraction
- new campaign proposal
- page architecture
- delivery schema
- visual direction
- H5/Web high-fidelity draft code
Default mode rules
If the user does not specify a mode:
- default to
proposal if they want a new campaign/event idea
- default to
delivery if they explicitly ask for code
- default to
full if they ask for both plan and code
For delivery and full, when the brief implies poster-style character focus and the page would otherwise become too long, default to a female-led, launch-ready, tab-first H5 front-end draft.
Core job
Given one or more campaign references, do all relevant parts of the following:
- Identify observable UI patterns
- Separate what is observed vs inferred vs assumed
- Abstract the gameplay and module patterns
- Propose a new campaign instead of copying the reference
- Design a buildable H5/Web page architecture
- Generate a buildable activity mechanic and visual preset when the brief is under-specified
- Output fixed-stack high-fidelity draft code when requested
Output rules
Prefer practical output over broad commentary.
When possible, organize the answer using these sections:
- Reference analysis
- Observed
- Inferred
- Assumed
- Gameplay abstraction
- New campaign proposal
- Page architecture
- Delivery schema
- Visual direction
- H5/Web starter files
- Uncertainties
Proposal presentation rule
For proposal, the result should feel closer to an operations campaign visual deck than a plain strategy memo.
Preferred structure:
- strong campaign name and one-line hook
- visual theme and mood direction
- hero concept and key selling point
- participation path
- reward design
- module highlights
- timeline or rollout rhythm when relevant
If the user explicitly asks for a local proposal deck and the host environment supports local execution, the skill may generate a local .pptx file with Python.
Intelligent activity generation rule
When the user does not pin a specific activity family, reward interaction, or theme, do not stop at the reference activity types.
Default behavior:
- infer the target engagement goal from the reference and user brief, then generate a new but buildable campaign mechanic
- support activity families such as wheel draw, split red packet, sign-in relay, scratch reveal, flip-card memory, treasure chest unlock, collection merge, timed rush, quiz challenge, or mixed mechanics
- choose one primary mechanic and at most two supporting mechanics so the page still reads cleanly on mobile
- keep the mechanic editable through data/config instead of burying the logic only in prose copy
- avoid limiting the generated campaign to the exact activity family shown in the reference when the brief is open
Required output additions when the activity is newly generated:
- name the generated activity family clearly
- explain why it fits the brief and how it differs from the reference
- expose configurable parameters such as duration, chance count, reward cadence, milestone count, animation preset, and visual preset
- keep the page shell reusable so another generated activity can replace the current one without rewriting the whole structure
File handoff rules
Do not append executable local file-write commands.
If the user explicitly asks for local files and the host environment supports local execution, the skill should use Python to generate artifacts on disk instead of stopping at a file structure or code-only response.
The goal is to keep the handoff clear without asking the model to generate shell or terminal instructions from screenshot-derived content.
Local delivery root:
- place all final generated files under the current execution environment's
project/ directory
- create
project/ automatically if it does not already exist
- create one additional delivery bundle directory under it, using
project/<delivery-slug>/... rather than writing files directly into project/
- derive
delivery-slug from campaignMeta.id, a sanitized campaign title, or a stable fallback such as campaign-delivery
- do not scatter final files across the workspace root, temporary folders, mixed output directories, or directly under
project/
Mode-specific file targets:
analysis: present the main result as one Markdown document such as project/<delivery-slug>/campaign-analysis.md when local artifacts are written
proposal: present the main result as one Markdown document such as project/<delivery-slug>/campaign-proposal.md when local artifacts are written
proposal optional local artifact: project/<delivery-slug>/campaign-proposal.pptx when the user explicitly asks for a local visual deck and Python execution is available
architecture: present the main result as one Markdown document such as project/<delivery-slug>/campaign-architecture.md when local artifacts are written
delivery: present the generated front-end files as project/<delivery-slug>/index.html, project/<delivery-slug>/styles.css, project/<delivery-slug>/main.js, and project/<delivery-slug>/mock-data.js
full: present the planning content as one Markdown document such as project/<delivery-slug>/campaign-full.md, and present the front-end files as project/<delivery-slug>/index.html, project/<delivery-slug>/styles.css, project/<delivery-slug>/main.js, and project/<delivery-slug>/mock-data.js
- when a hero image asset is used in
delivery or full, reserve project/<delivery-slug>/image/ and point the code to ./image/bg.png
Handoff requirements:
- label each file clearly in the response body
- keep file names and section order aligned with the response body
- when the mode includes multiple files, provide each file's full content in its own clearly labeled section
- when local artifacts are generated with Python, report the exact file names and paths in plain language
- when the user explicitly asked for local output, do not stop after showing file structure or code blocks; confirm that the files were actually written under
project/<delivery-slug>/
- if the user explicitly asks how to save the files locally, describe the file names and where the content belongs in plain language rather than generating executable commands
- when the delivery uses a generated hero image, include an explicit asset note that tells the user to rename the generated image to
bg.png, keep it as PNG, and place it in project/<delivery-slug>/image/
Python local output contract
When local artifacts are generated with Python:
- resolve the final output root as
project/<delivery-slug>/
- create
project/ first, then create project/<delivery-slug>/, then create project/<delivery-slug>/image/, for example with Path(exec_root, "project", delivery_slug, "image").mkdir(parents=True, exist_ok=True)
- place every final delivery file under
project/<delivery-slug>/
- keep front-end image references at
./image/bg.png
- save, move, or copy the generated hero asset into
<output_root>/image/bg.png before reporting success
- do not leave the generated image only in a temporary directory, the workspace root, under bare
project/, or outside project/<delivery-slug>/
- when additional generated images are needed, keep them under the same
project/<delivery-slug>/image/ directory with stable names
- ensure the generated files are readable by default and that directory creation does not depend on manual pre-setup
- if
project/ was not created, or project/<delivery-slug>/ was not created, or project/<delivery-slug>/image/ was not created, or bg.png was not saved into it, treat the Python local delivery as incomplete
Anti-copy rules
Do not simply restyle the reference.
The new campaign must change at least 2 of these 4 dimensions:
- campaign theme
- reward design
- task structure
- module order or core interaction
Do not preserve all of the following at the same time:
- same hero structure
- same gameplay loop
- same reward chain
Call out the main changes briefly in the proposal.
Reference-to-theme translation rules
Treat the reference as a source for structure, interaction pattern, density, and campaign rhythm first, and as a source for visual style only when it fits the user's target theme.
Use this decision rule:
- If the target campaign theme is close to the reference theme, you may inherit the reference's palette and styling direction.
- If the target campaign theme is different from the reference theme, keep the useful structure and interaction cues, but rebuild the visual style around the target theme.
When the target theme and reference theme conflict:
- prioritize the target festival, season, brand tone, and audience mood
- borrow layout logic, gameplay framing, and information hierarchy from the reference
- do not carry over mismatched seasonal colors or decorative symbols by default
Example:
- if the reference looks like a Spring Festival page with red and gold styling, but the new brief is for a Dragon Boat Festival campaign, do not keep the page red by default
- instead, keep the helpful campaign structure, then shift the visual direction toward Dragon Boat Festival cues such as bamboo green, jade green, lake blue, rice dumpling motifs, rope textures, water-wave shapes, or cooler early-summer contrast
Confidence rules
Always separate content into these layers when relevant:
- Observed: directly visible from the reference
- Inferred: likely based on common campaign patterns
- Assumed: filled in because the reference is incomplete
If text is blurry or a state is hidden, say so directly.
Delivery file rules
For delivery and full, default to this file set:
index.html
styles.css
main.js
mock-data.js
Project-root asset directory when the page uses generated imagery:
project/<delivery-slug>/image/
Default first-screen visual artifact when the page is poster-led or character-led and image generation is available:
project/<delivery-slug>/image/bg.png
If the user explicitly asks for local front-end files and the host environment supports local execution, the skill should use Python to write these files directly to project/<delivery-slug>/.
File responsibilities:
index.html: page structure, visible module internals, decorative wrappers, and realistic launch-style copy
styles.css: design tokens, background atmosphere, section chrome, CTA styling, popup styling, and responsive behavior
main.js: render repeating data, event binding, state updates, popup control, activity-specific triggers, and lightweight view-state changes
mock-data.js: campaign meta, tasks, prizes, CTA text, popup data, activity config, animation preset data, and enough mock content to render a visually complete first screen
image/bg.png: generated hero visual asset focused on the woman and theme atmosphere, without embedding lower-page reward modules, task grids, or rule panels
Top visual asset generation
For delivery and full, when the page depends on a poster-style first screen and the user does not provide a finished key visual, the skill should generate one original top visual asset before front-end delivery if the host environment supports image generation.
Mandatory trigger:
- set
need_image = true when the brief, references, or user wording clearly imply a poster-led first screen, a female-led hero, a generated first-screen visual, or an image-first activity page
- do not treat poster-led hero generation as optional once
need_image = true
Default contract:
- generate one real hero visual asset for the woman and use
./image/bg.png as the code-facing path
- if the host image tool only emits a flat file such as
image.png, treat that as a temporary output and convert the handoff target to ./image/bg.png
- the generated asset should focus on the adult female lead, theme-matched props, lighting, and festive atmosphere instead of reproducing page modules from the reference
- when the user provides festive campaign references, borrow their palette, density, wardrobe direction, and decorative mood for the hero background atmosphere, but do not copy their prize panels, invitation boards, task modules, or page text into the generated image
- place
./image/bg.png in the first visible hero block at the top of the page
Execution gate:
- before writing
index.html, styles.css, main.js, or mock-data.js, call the host image generation tool to create the hero image asset
- if the host exposes a concrete tool such as
image_generate, call it directly instead of describing the step abstractly
- do not claim success just by mentioning
./image/bg.png in code or prose
- the run is incomplete unless the hero image asset for
./image/bg.png was generated in the current run when need_image = true
Regeneration policy:
- default to
regenerate_each_run
- if the same input is run again and
need_image = true, generate a new hero image again by default
- reuse an existing
./image/bg.png only when the user explicitly asks to reuse the existing asset
Constraints:
- generate one original adult female hero image
- prioritize a photorealistic commercial-poster result rather than an illustrated, anime, or plastic-CGI result
- image direction should prioritize theme-matched wardrobe, dominant colors, accessories, props, styling, and background atmosphere
- emphasize realistic skin texture, natural facial asymmetry, believable hand anatomy, fabric folds, hair strands, and coherent light direction
- keep the asset focused on the woman and atmosphere, not on page UI modules
- use a glamorous, attractive, stylish, slightly sexy commercial campaign poster direction
- do not generate a male hero by default
- default to one adult woman unless the user explicitly asks for multiple figures
- do not generate explicit sexual content, nudity, fetish styling, or pornographic framing
- do not embed readable prize tables, invitation reward boards, task cards, rules sections, or full-page screenshot layouts into the generated hero asset
- do not reproduce the reference woman's exact face, hairstyle, expression, pose, camera angle, or outfit details
- treat the reference as styling inspiration, not as an identity template
- do not imitate a recognizable spokesperson or celebrity-like likeness from the reference
- if image generation is unavailable or the image tool fails when
need_image = true, clearly report that the run is blocked and stop instead of downgrading to placeholders, gradient-only heroes, or image slots without a generated asset
Quality gate:
- if the generated woman has uncanny anatomy, broken hands, duplicated props, waxy skin, incorrect eye direction, or obviously synthetic poster artifacts, regenerate before treating the run as complete
- prefer prompt language that pushes toward photorealistic commercial photography, cinematic rim light, realistic textile detail, and believable facial depth
- avoid prompt language that biases toward cartoon, illustration, doll-like beauty filters, flat 3D render, or over-smoothed skin
Required handoff note:
- after delivering code that references
./image/bg.png, include a clear plain-language note such as 需要把生成好的图片,改名为bg,图片类型为 png,放到 project/<delivery-slug>/image 目录下
Female-led hero default
For character-led campaign delivery, the default first-screen visual should use one adult female hero figure as the dominant visual focus.
Requirements:
- the hero figure must be an adult woman
- the first visible block in the page should be the hero image rather than a text-only header placed above it
- do not replace the hero with a male figure by default
- do not generate mixed-gender hero focus unless the user explicitly asks for it
- the wardrobe, dominant colors, accessories, props, and styling must match the campaign theme
- if the campaign is festival-based, the character styling should visibly reflect that festival rather than using a generic outfit
- prioritize glamour, attractiveness, confidence, and poster-like visual appeal
- allow stylish and slightly sexy commercial-fashion styling for stronger attention
- keep the result within public campaign standards: no nudity, no explicit sexual pose, no fetish styling, and no pornographic framing
- the female figure should remain the main first-screen anchor, with
./image/bg.png or an equivalent top poster block placed above summary modules, tabs, and lower content
Character innovation rule
When generating a new female hero from campaign references:
- use the reference for color mood, seasonal styling, ornament density, and glamour level
- generate a new woman with distinct facial features, hair treatment, pose, expression, and outfit detail changes
- do not preserve the same face, same pose, same camera crop, or same two-person composition unless the user explicitly asks for that structure
- when the reference contains two women but the user only asks for a female hero image, default to one new woman instead of recreating the dual-character arrangement
Theme examples:
- Spring Festival: red as the dominant color, with gold accents, festive dress or qipao-inspired styling, lanterns, knots, and warm holiday accessories
- Dragon Boat Festival: bamboo green, jade green, lake blue, lighter summer styling, rope knots, leaf textures, and seasonal props
- Valentine-style campaign: rose red, wine red, blush pink, elegant fitted styling, floral or gift-box props
H5 length control rule
Do not default to a full top-to-bottom stack for every module.
Prefer a tab-first H5 layout when any of the following is true:
- there are more than 5 major modules
- the page includes task lists, prize pools, records, and long rules together
- the default layout would likely become an overly long mobile page
In these cases:
- keep the first screen focused on hero + core action + one key summary module
- move secondary content into sticky tabs
- render only the active tab panel by default
- place verbose rules, records, and explanations in popups, drawers, or accordions when appropriate
- use tabs as a page-shortening strategy, not as a cosmetic decoration
Animation choreography rule
For reward-led and interactive campaign pages, motion is part of the delivery contract rather than a last-minute decoration.
Minimum choreography:
- include 1 signature interaction animation tied to the main activity mechanic
- include 2 supporting ambient or feedback motion layers
- keep motion performant with transform/opacity-first implementation where possible
- provide a
prefers-reduced-motion fallback or equivalent lower-motion behavior
Activity-specific defaults:
- wheel draw / lottery: wheel acceleration and deceleration, pointer bounce, winning sector glow, result popup rise-in
- split red packet: envelope crack or unfold, coin burst, amount count-up, sparkle or confetti drift
- sign-in / check-in: stamp press, calendar highlight or flip, streak beam, reward badge pop-up
- generic reward reveal: card flip, gift-box open, ribbon sweep, badge settle, counter roll-up
Creative interaction options when the brief is open:
- scratch-card reveal
- flip-card memory combo
- treasure chest unlock
- lantern or wish-drop release
- route runner or treasure-map advance
- puzzle merge or collection synthesis
Do not add motion randomly; tie it to reward feedback, task progress, CTA emphasis, and popup states.
Delivery schema guidance
Prefer a schema that covers both campaign config and page delivery contract.
Typical sections:
campaignMeta
hero
activityFactory
activityConfig
tasks
rewards
lottery
modules
popups
animationSystem
visualPreset
assetOutput
stateMachine
tracking
Important constraints
- Stay on H5/Web + HTML/CSS/JS only
- Never pretend uncertain text is exact
- Never invent backend endpoints
- Never claim pixel-perfect parity from a blurry image
- Favor reusable modules and editable data structures
Visual fidelity rules
For delivery and full, default to a high-fidelity visual draft, not a low-fidelity wireframe.
Before writing code, extract the screenshot's likely visual language in 4 to 8 short bullets:
- palette and contrast style
- hero composition
- decoration density
- card or panel treatment
- CTA style
- icon/badge/tag style
- popup tone
- overall mood keywords
Then make the code reflect that visual language directly.
When the reference clearly uses poster-led artwork or rich scene imagery, explicitly decide whether the first screen should rely on a real image asset, a background plate, or both. Do not downgrade that into a text-first hero with only gradient fills.
But do not follow the screenshot's visual language blindly.
Use this priority order for visual decisions:
- explicit user brief and target campaign theme
- target holiday/season/brand tone
- reference layout and interaction cues
- reference palette and decorative styling
If the reference palette conflicts with the new campaign brief, say so briefly and switch to a target-appropriate palette.
In that case, the visual extraction summary should separate:
- reusable structural cues from the reference
- replaced visual cues that should be rebuilt for the new theme
Launch-ready front-end quality rule
For delivery and full, the generated result should feel like a launch-ready H5 front-end deliverable rather than a starter scaffold, plain wireframe, or demo shell.
Requirements:
- render a visually complete mobile-first first screen with strong hierarchy, atmosphere, and branded tone
- when the brief is image-led, render or reference a real hero visual at
./image/bg.png rather than a placeholder asset slot
- when
need_image = true, ensure the asset used for ./image/bg.png was generated in the current run before delivering the front-end files
- include representative internal structure for each major module instead of empty containers
- use realistic mock copy, labels, badges, numbers, CTA text, and popup content
- cover key front-end states such as active, selected, disabled, claimed, exhausted, popup-open, and tab-selected when relevant
- prefer compact, production-like H5 information architecture instead of excessive vertical stacking
- include responsive behavior, stable spacing, and usable touch targets for mobile rendering
- make CTA areas, popup layers, tab bars, and reward/task states feel polished enough for design review or front-end handoff
- for festival or reward-led campaigns, include one signature interaction animation plus supporting ambient motion so the result feels closer to an online activity page than a static poster slice
- when the brief is open-ended, expose the chosen activity family and its configurable parameters in the delivery schema and mock data
- keep the code editable and data-driven without inventing backend APIs or hidden business logic
Boundary:
- this means production-like front-end finish, not a fully backend-connected production deployment
HTML expectations
- Do not output only empty section containers.
- Include representative nested content for the hero, progress/task/reward modules, active tab panels, and popup shells.
- When a female-led or poster-led hero is used, render
./image/bg.png inside the first visible hero block at the top of the page.
- Keep the main hero image above summary chips, tabs, task modules, and rules.
- For tab-first pages, include a sticky tab bar and representative nested content inside each tab panel.
- Use realistic wrappers such as badges, ribbons, tabs, stat chips, progress nodes, reward cards, glow layers, floating ornaments, celebratory particles, and richer festive framing when the reference implies them.
- Keep the structure editable, but visually expressive on first render.
CSS expectations
- Start with
:root tokens for major colors, gradients, shadows, radii, and spacing.
- Build atmosphere first: page background, hero backdrop, decorative light/shapes, panel chrome, and CTA emphasis.
- Prefer layered gradients, image-free ornaments, shadows, strokes, masks, and glow treatments over flat white cards.
- Style sections as distinct visual modules instead of repeating the same generic card everywhere.
- Support sticky mobile tabs, active tab states, and compact tab-panel switching for long H5 pages.
- When the references imply rich festive posters, let the hero rely on
./image/bg.png and reference-driven backdrop styling rather than a plain gradient-only header.
- When a female-led hero is used, style the figure area as a real visual focal point with framing, light, depth, and theme-specific ornaments.
- Include at least 1 signature interaction animation and 2 supporting layers for festive or reward-led pages, such as wheel spin, red-packet burst, stamp press, sparkle drift, ribbon shimmer, CTA pulse, marquee movement, or popup rise-in.
- Add reduced-motion handling when the animation system is richer than a simple CTA pulse.
- Include responsive handling for mobile-first rendering.
JavaScript expectations
- Render repeated lists from data, but avoid reducing the whole page to blank placeholders.
- Support interactive states that help sell the concept visually, such as active tabs, selected rewards, progress states, countdown text, and popup opening.
- Support lightweight tab switching and active panel state when the delivery uses a tab-first layout.
- Support configurable activity triggers and simple front-end motion such as popup entrance, tab fade/slide, countdown refresh, wheel start/stop, red-packet burst, sign-in stamp, marquee movement, or reward highlight state when they help the page feel launch-ready.
- Keep the animation state machine data-driven so a different generated activity type can reuse the same page shell.
- Keep interactions lightweight and front-end only unless the user provides real APIs.
Mock data expectations
- Provide enough titles, subtitles, badges, numbers, CTA text, activity config, animation preset data, and asset references to make the page look complete.
- Use mock labels that match the proposed campaign tone instead of filler text.
Delivery anti-patterns
Avoid these default outputs unless the user explicitly asks for minimal scaffolding:
Arial plus gray background plus white rounded cards for every module
- repetitive
.section-card wrappers with empty containers
- only one-line
<h1> and <p> placeholders in the hero
- visually neutral buttons with no hierarchy
- a page that reads like a wireframe rather than a campaign landing page
- a character-led brief solved with a text-only hero and no figure slot
- a character-led brief solved with a placeholder image slot or a
./image/bg.png mention that never becomes the top visual
- a required photorealistic hero delivered as an illustration-like, doll-like, or obviously broken figure
- a rerun that quietly reuses an old hero image even though the user did not ask to reuse it
- saying the page uses a generated image even though no image tool was called in the current run
- a generated hero image that contains copied prize modules, invitation boards, page text, or lower-page layouts from the reference
- a generated hero image that recreates the same woman's face or pose from the reference instead of producing a new character
- an open-ended brief that still gets locked to only wheel/check-in/red-packet options with no attempt to generate a fresher mechanic
- a long H5 page created by vertically stacking every module by default
- a text-first header or summary strip placed above the main hero image
- a festive campaign page that stays almost fully static and under-decorated
- a Python local delivery that writes HTML/CSS/JS but forgets to create
project/, project/<delivery-slug>/, or project/<delivery-slug>/image/
- rules, records, and prize details all expanded on the main page without tabs or progressive disclosure
- output that looks like a bare demo, starter, or wireframe instead of a near-launch H5 front-end draft
- placeholder-only sections with weak hierarchy and incomplete module internals
- visually finished hero areas paired with unfinished lower modules that break the sense of a shippable page
Example user requests
- “参考这几个活动页,给我出一个新的 H5 活动方案。”
- “根据这个参考图,先做玩法抽象,再给我页面架构。”
- “按这个活动参考,输出 HTML + CSS + JS 版本。”
- “我想同时要策划和代码,你走 full mode。”
1---2name: activity-campaign-from-ui3description: activity-campaign-from-ui skill. Activity Campaign From Ui skill from the marketing-event-planning-team expert package.4---56# activity-campaign-from-ui78Generate a **new** campaign from campaign UI references, then deliver an H5/Web visual-first front-end draft on a fixed stack.910## Use when11Use this skill when the user:12- provides one or more campaign/activity page screenshots13- provides a campaign design preview and wants a new campaign generated from it14- wants campaign references turned into a proposal, page architecture, or H5/Web high-fidelity draft code15- wants a structured handoff for an activity page on a fixed stack1617## Do not use when18Do not use this skill when:19- the request is unrelated to campaign/activity pages20- the user only wants raw OCR21- the task requires exact locked-design export22- the user wants production-ready backend logic or hidden business rules not visible from the reference23- the user wants a delivery stack outside this skill's fixed target2425## Fixed platform and stack26Always stay on this fixed delivery target:27- Platform: **H5 / Web**28- Stack: **HTML + CSS + JavaScript**2930Do not output code in other stacks.3132## Modes33This skill supports one skill with multiple modes.3435### `analysis`36Use when the user wants to understand the reference.37Return:38- observed UI structure39- visible text40- gameplay clues41- user flow clues42- uncertainty notes4344### `proposal`45Use when the user wants a new campaign idea from the reference.46Return:47- reference summary48- gameplay abstraction49- new campaign concept50- target users51- goals52- rewards and participation path53- anti-copy explanation54- visual proposal direction that reads more like an operations campaign deck than a plain memo5556### `architecture`57Use when the user wants implementation planning without full code.58Return:59- page module list60- module order61- popup system62- state flow63- tracking suggestions64- delivery schema6566### `delivery`67Use when the user wants code on the fixed stack.68Return:69- file structure70- `index.html`71- `styles.css`72- `main.js`73- `mock-data.js`74- visual extraction summary75- implementation notes7677### `full`78Use when the user wants the full flow.79Return:801. reference analysis812. gameplay abstraction823. new campaign proposal834. page architecture845. delivery schema856. visual direction867. H5/Web high-fidelity draft code8788## Default mode rules89If the user does not specify a mode:90- default to `proposal` if they want a new campaign/event idea91- default to `delivery` if they explicitly ask for code92- default to `full` if they ask for both plan and code9394For `delivery` and `full`, when the brief implies poster-style character focus and the page would otherwise become too long, default to a female-led, launch-ready, tab-first H5 front-end draft.9596## Core job97Given one or more campaign references, do all relevant parts of the following:981. Identify observable UI patterns992. Separate what is observed vs inferred vs assumed1003. Abstract the gameplay and module patterns1014. Propose a **new** campaign instead of copying the reference1025. Design a buildable H5/Web page architecture1036. Generate a buildable activity mechanic and visual preset when the brief is under-specified1047. Output fixed-stack high-fidelity draft code when requested105106## Output rules107Prefer practical output over broad commentary.108109When possible, organize the answer using these sections:110- Reference analysis111- Observed112- Inferred113- Assumed114- Gameplay abstraction115- New campaign proposal116- Page architecture117- Delivery schema118- Visual direction119- H5/Web starter files120- Uncertainties121122## Proposal presentation rule123For `proposal`, the result should feel closer to an operations campaign visual deck than a plain strategy memo.124125Preferred structure:126- strong campaign name and one-line hook127- visual theme and mood direction128- hero concept and key selling point129- participation path130- reward design131- module highlights132- timeline or rollout rhythm when relevant133134If the user explicitly asks for a local proposal deck and the host environment supports local execution, the skill may generate a local `.pptx` file with Python.135136## Intelligent activity generation rule137When the user does not pin a specific activity family, reward interaction, or theme, do not stop at the reference activity types.138139Default behavior:140- infer the target engagement goal from the reference and user brief, then generate a new but buildable campaign mechanic141- support activity families such as wheel draw, split red packet, sign-in relay, scratch reveal, flip-card memory, treasure chest unlock, collection merge, timed rush, quiz challenge, or mixed mechanics142- choose one primary mechanic and at most two supporting mechanics so the page still reads cleanly on mobile143- keep the mechanic editable through data/config instead of burying the logic only in prose copy144- avoid limiting the generated campaign to the exact activity family shown in the reference when the brief is open145146Required output additions when the activity is newly generated:147- name the generated activity family clearly148- explain why it fits the brief and how it differs from the reference149- expose configurable parameters such as duration, chance count, reward cadence, milestone count, animation preset, and visual preset150- keep the page shell reusable so another generated activity can replace the current one without rewriting the whole structure151152## File handoff rules153Do not append executable local file-write commands.154155If the user explicitly asks for local files and the host environment supports local execution, the skill should use Python to generate artifacts on disk instead of stopping at a file structure or code-only response.156157The goal is to keep the handoff clear without asking the model to generate shell or terminal instructions from screenshot-derived content.158159Local delivery root:160- place all final generated files under the current execution environment's `project/` directory161- create `project/` automatically if it does not already exist162- create one additional delivery bundle directory under it, using `project/<delivery-slug>/...` rather than writing files directly into `project/`163- derive `delivery-slug` from `campaignMeta.id`, a sanitized campaign title, or a stable fallback such as `campaign-delivery`164- do not scatter final files across the workspace root, temporary folders, mixed output directories, or directly under `project/`165166Mode-specific file targets:167- `analysis`: present the main result as one Markdown document such as `project/<delivery-slug>/campaign-analysis.md` when local artifacts are written168- `proposal`: present the main result as one Markdown document such as `project/<delivery-slug>/campaign-proposal.md` when local artifacts are written169- `proposal` optional local artifact: `project/<delivery-slug>/campaign-proposal.pptx` when the user explicitly asks for a local visual deck and Python execution is available170- `architecture`: present the main result as one Markdown document such as `project/<delivery-slug>/campaign-architecture.md` when local artifacts are written171- `delivery`: present the generated front-end files as `project/<delivery-slug>/index.html`, `project/<delivery-slug>/styles.css`, `project/<delivery-slug>/main.js`, and `project/<delivery-slug>/mock-data.js`172- `full`: present the planning content as one Markdown document such as `project/<delivery-slug>/campaign-full.md`, and present the front-end files as `project/<delivery-slug>/index.html`, `project/<delivery-slug>/styles.css`, `project/<delivery-slug>/main.js`, and `project/<delivery-slug>/mock-data.js`173- when a hero image asset is used in `delivery` or `full`, reserve `project/<delivery-slug>/image/` and point the code to `./image/bg.png`174175Handoff requirements:176- label each file clearly in the response body177- keep file names and section order aligned with the response body178- when the mode includes multiple files, provide each file's full content in its own clearly labeled section179- when local artifacts are generated with Python, report the exact file names and paths in plain language180- when the user explicitly asked for local output, do not stop after showing file structure or code blocks; confirm that the files were actually written under `project/<delivery-slug>/`181- if the user explicitly asks how to save the files locally, describe the file names and where the content belongs in plain language rather than generating executable commands182- when the delivery uses a generated hero image, include an explicit asset note that tells the user to rename the generated image to `bg.png`, keep it as PNG, and place it in `project/<delivery-slug>/image/`183184## Python local output contract185When local artifacts are generated with Python:186- resolve the final output root as `project/<delivery-slug>/`187- create `project/` first, then create `project/<delivery-slug>/`, then create `project/<delivery-slug>/image/`, for example with `Path(exec_root, "project", delivery_slug, "image").mkdir(parents=True, exist_ok=True)`188- place every final delivery file under `project/<delivery-slug>/`189- keep front-end image references at `./image/bg.png`190- save, move, or copy the generated hero asset into `<output_root>/image/bg.png` before reporting success191- do not leave the generated image only in a temporary directory, the workspace root, under bare `project/`, or outside `project/<delivery-slug>/`192- when additional generated images are needed, keep them under the same `project/<delivery-slug>/image/` directory with stable names193- ensure the generated files are readable by default and that directory creation does not depend on manual pre-setup194- if `project/` was not created, or `project/<delivery-slug>/` was not created, or `project/<delivery-slug>/image/` was not created, or `bg.png` was not saved into it, treat the Python local delivery as incomplete195196## Anti-copy rules197Do not simply restyle the reference.198199The new campaign must change at least **2 of these 4 dimensions**:2001. campaign theme2012. reward design2023. task structure2034. module order or core interaction204205Do not preserve all of the following at the same time:206- same hero structure207- same gameplay loop208- same reward chain209210Call out the main changes briefly in the proposal.211212## Reference-to-theme translation rules213Treat the reference as a source for **structure, interaction pattern, density, and campaign rhythm** first, and as a source for **visual style** only when it fits the user's target theme.214215Use this decision rule:216- If the target campaign theme is close to the reference theme, you may inherit the reference's palette and styling direction.217- If the target campaign theme is different from the reference theme, keep the useful structure and interaction cues, but rebuild the visual style around the **target** theme.218219When the target theme and reference theme conflict:220- prioritize the target festival, season, brand tone, and audience mood221- borrow layout logic, gameplay framing, and information hierarchy from the reference222- do not carry over mismatched seasonal colors or decorative symbols by default223224Example:225- if the reference looks like a Spring Festival page with red and gold styling, but the new brief is for a Dragon Boat Festival campaign, do **not** keep the page red by default226- instead, keep the helpful campaign structure, then shift the visual direction toward Dragon Boat Festival cues such as bamboo green, jade green, lake blue, rice dumpling motifs, rope textures, water-wave shapes, or cooler early-summer contrast227228## Confidence rules229Always separate content into these layers when relevant:230- **Observed**: directly visible from the reference231- **Inferred**: likely based on common campaign patterns232- **Assumed**: filled in because the reference is incomplete233234If text is blurry or a state is hidden, say so directly.235236## Delivery file rules237For `delivery` and `full`, default to this file set:238- `index.html`239- `styles.css`240- `main.js`241- `mock-data.js`242243Project-root asset directory when the page uses generated imagery:244- `project/<delivery-slug>/image/`245246Default first-screen visual artifact when the page is poster-led or character-led and image generation is available:247- `project/<delivery-slug>/image/bg.png`248249If the user explicitly asks for local front-end files and the host environment supports local execution, the skill should use Python to write these files directly to `project/<delivery-slug>/`.250251File responsibilities:252- `index.html`: page structure, visible module internals, decorative wrappers, and realistic launch-style copy253- `styles.css`: design tokens, background atmosphere, section chrome, CTA styling, popup styling, and responsive behavior254- `main.js`: render repeating data, event binding, state updates, popup control, activity-specific triggers, and lightweight view-state changes255- `mock-data.js`: campaign meta, tasks, prizes, CTA text, popup data, activity config, animation preset data, and enough mock content to render a visually complete first screen256- `image/bg.png`: generated hero visual asset focused on the woman and theme atmosphere, without embedding lower-page reward modules, task grids, or rule panels257258## Top visual asset generation259260For `delivery` and `full`, when the page depends on a poster-style first screen and the user does not provide a finished key visual, the skill should generate one original top visual asset before front-end delivery if the host environment supports image generation.261262Mandatory trigger:263- set `need_image = true` when the brief, references, or user wording clearly imply a poster-led first screen, a female-led hero, a generated first-screen visual, or an image-first activity page264- do not treat poster-led hero generation as optional once `need_image = true`265266Default contract:267- generate one real hero visual asset for the woman and use `./image/bg.png` as the code-facing path268- if the host image tool only emits a flat file such as `image.png`, treat that as a temporary output and convert the handoff target to `./image/bg.png`269- the generated asset should focus on the adult female lead, theme-matched props, lighting, and festive atmosphere instead of reproducing page modules from the reference270- when the user provides festive campaign references, borrow their palette, density, wardrobe direction, and decorative mood for the hero background atmosphere, but do not copy their prize panels, invitation boards, task modules, or page text into the generated image271- place `./image/bg.png` in the first visible hero block at the top of the page272273Execution gate:274- before writing `index.html`, `styles.css`, `main.js`, or `mock-data.js`, call the host image generation tool to create the hero image asset275- if the host exposes a concrete tool such as `image_generate`, call it directly instead of describing the step abstractly276- do not claim success just by mentioning `./image/bg.png` in code or prose277- the run is incomplete unless the hero image asset for `./image/bg.png` was generated in the current run when `need_image = true`278279Regeneration policy:280- default to `regenerate_each_run`281- if the same input is run again and `need_image = true`, generate a new hero image again by default282- reuse an existing `./image/bg.png` only when the user explicitly asks to reuse the existing asset283284Constraints:285- generate one original adult female hero image286- prioritize a photorealistic commercial-poster result rather than an illustrated, anime, or plastic-CGI result287- image direction should prioritize theme-matched wardrobe, dominant colors, accessories, props, styling, and background atmosphere288- emphasize realistic skin texture, natural facial asymmetry, believable hand anatomy, fabric folds, hair strands, and coherent light direction289- keep the asset focused on the woman and atmosphere, not on page UI modules290- use a glamorous, attractive, stylish, slightly sexy commercial campaign poster direction291- do not generate a male hero by default292- default to one adult woman unless the user explicitly asks for multiple figures293- do not generate explicit sexual content, nudity, fetish styling, or pornographic framing294- do not embed readable prize tables, invitation reward boards, task cards, rules sections, or full-page screenshot layouts into the generated hero asset295- do not reproduce the reference woman's exact face, hairstyle, expression, pose, camera angle, or outfit details296- treat the reference as styling inspiration, not as an identity template297- do not imitate a recognizable spokesperson or celebrity-like likeness from the reference298- if image generation is unavailable or the image tool fails when `need_image = true`, clearly report that the run is blocked and stop instead of downgrading to placeholders, gradient-only heroes, or image slots without a generated asset299300Quality gate:301- if the generated woman has uncanny anatomy, broken hands, duplicated props, waxy skin, incorrect eye direction, or obviously synthetic poster artifacts, regenerate before treating the run as complete302- prefer prompt language that pushes toward photorealistic commercial photography, cinematic rim light, realistic textile detail, and believable facial depth303- avoid prompt language that biases toward cartoon, illustration, doll-like beauty filters, flat 3D render, or over-smoothed skin304305Required handoff note:306- after delivering code that references `./image/bg.png`, include a clear plain-language note such as `需要把生成好的图片,改名为bg,图片类型为 png,放到 project/<delivery-slug>/image 目录下`307308## Female-led hero default309310For character-led campaign delivery, the default first-screen visual should use one adult female hero figure as the dominant visual focus.311312Requirements:313- the hero figure must be an adult woman314- the first visible block in the page should be the hero image rather than a text-only header placed above it315- do not replace the hero with a male figure by default316- do not generate mixed-gender hero focus unless the user explicitly asks for it317- the wardrobe, dominant colors, accessories, props, and styling must match the campaign theme318- if the campaign is festival-based, the character styling should visibly reflect that festival rather than using a generic outfit319- prioritize glamour, attractiveness, confidence, and poster-like visual appeal320- allow stylish and slightly sexy commercial-fashion styling for stronger attention321- keep the result within public campaign standards: no nudity, no explicit sexual pose, no fetish styling, and no pornographic framing322- the female figure should remain the main first-screen anchor, with `./image/bg.png` or an equivalent top poster block placed above summary modules, tabs, and lower content323324## Character innovation rule325326When generating a new female hero from campaign references:327- use the reference for color mood, seasonal styling, ornament density, and glamour level328- generate a new woman with distinct facial features, hair treatment, pose, expression, and outfit detail changes329- do not preserve the same face, same pose, same camera crop, or same two-person composition unless the user explicitly asks for that structure330- when the reference contains two women but the user only asks for a female hero image, default to one new woman instead of recreating the dual-character arrangement331332Theme examples:333- Spring Festival: red as the dominant color, with gold accents, festive dress or qipao-inspired styling, lanterns, knots, and warm holiday accessories334- Dragon Boat Festival: bamboo green, jade green, lake blue, lighter summer styling, rope knots, leaf textures, and seasonal props335- Valentine-style campaign: rose red, wine red, blush pink, elegant fitted styling, floral or gift-box props336337## H5 length control rule338339Do not default to a full top-to-bottom stack for every module.340341Prefer a tab-first H5 layout when any of the following is true:342- there are more than 5 major modules343- the page includes task lists, prize pools, records, and long rules together344- the default layout would likely become an overly long mobile page345346In these cases:347- keep the first screen focused on hero + core action + one key summary module348- move secondary content into sticky tabs349- render only the active tab panel by default350- place verbose rules, records, and explanations in popups, drawers, or accordions when appropriate351- use tabs as a page-shortening strategy, not as a cosmetic decoration352353## Animation choreography rule354For reward-led and interactive campaign pages, motion is part of the delivery contract rather than a last-minute decoration.355356Minimum choreography:357- include 1 signature interaction animation tied to the main activity mechanic358- include 2 supporting ambient or feedback motion layers359- keep motion performant with transform/opacity-first implementation where possible360- provide a `prefers-reduced-motion` fallback or equivalent lower-motion behavior361362Activity-specific defaults:363- wheel draw / lottery: wheel acceleration and deceleration, pointer bounce, winning sector glow, result popup rise-in364- split red packet: envelope crack or unfold, coin burst, amount count-up, sparkle or confetti drift365- sign-in / check-in: stamp press, calendar highlight or flip, streak beam, reward badge pop-up366- generic reward reveal: card flip, gift-box open, ribbon sweep, badge settle, counter roll-up367368Creative interaction options when the brief is open:369- scratch-card reveal370- flip-card memory combo371- treasure chest unlock372- lantern or wish-drop release373- route runner or treasure-map advance374- puzzle merge or collection synthesis375376Do not add motion randomly; tie it to reward feedback, task progress, CTA emphasis, and popup states.377378## Delivery schema guidance379Prefer a schema that covers both campaign config and page delivery contract.380381Typical sections:382- `campaignMeta`383- `hero`384- `activityFactory`385- `activityConfig`386- `tasks`387- `rewards`388- `lottery`389- `modules`390- `popups`391- `animationSystem`392- `visualPreset`393- `assetOutput`394- `stateMachine`395- `tracking`396397## Important constraints398- Stay on H5/Web + HTML/CSS/JS only399- Never pretend uncertain text is exact400- Never invent backend endpoints401- Never claim pixel-perfect parity from a blurry image402- Favor reusable modules and editable data structures403404## Visual fidelity rules405For `delivery` and `full`, default to a **high-fidelity visual draft**, not a low-fidelity wireframe.406407Before writing code, extract the screenshot's likely visual language in 4 to 8 short bullets:408- palette and contrast style409- hero composition410- decoration density411- card or panel treatment412- CTA style413- icon/badge/tag style414- popup tone415- overall mood keywords416417Then make the code reflect that visual language directly.418419When the reference clearly uses poster-led artwork or rich scene imagery, explicitly decide whether the first screen should rely on a real image asset, a background plate, or both. Do not downgrade that into a text-first hero with only gradient fills.420421But do not follow the screenshot's visual language blindly.422423Use this priority order for visual decisions:4241. explicit user brief and target campaign theme4252. target holiday/season/brand tone4263. reference layout and interaction cues4274. reference palette and decorative styling428429If the reference palette conflicts with the new campaign brief, say so briefly and switch to a target-appropriate palette.430In that case, the visual extraction summary should separate:431- reusable structural cues from the reference432- replaced visual cues that should be rebuilt for the new theme433434## Launch-ready front-end quality rule435436For `delivery` and `full`, the generated result should feel like a launch-ready H5 front-end deliverable rather than a starter scaffold, plain wireframe, or demo shell.437438Requirements:439- render a visually complete mobile-first first screen with strong hierarchy, atmosphere, and branded tone440- when the brief is image-led, render or reference a real hero visual at `./image/bg.png` rather than a placeholder asset slot441- when `need_image = true`, ensure the asset used for `./image/bg.png` was generated in the current run before delivering the front-end files442- include representative internal structure for each major module instead of empty containers443- use realistic mock copy, labels, badges, numbers, CTA text, and popup content444- cover key front-end states such as active, selected, disabled, claimed, exhausted, popup-open, and tab-selected when relevant445- prefer compact, production-like H5 information architecture instead of excessive vertical stacking446- include responsive behavior, stable spacing, and usable touch targets for mobile rendering447- make CTA areas, popup layers, tab bars, and reward/task states feel polished enough for design review or front-end handoff448- for festival or reward-led campaigns, include one signature interaction animation plus supporting ambient motion so the result feels closer to an online activity page than a static poster slice449- when the brief is open-ended, expose the chosen activity family and its configurable parameters in the delivery schema and mock data450- keep the code editable and data-driven without inventing backend APIs or hidden business logic451452Boundary:453- this means production-like front-end finish, not a fully backend-connected production deployment454455### HTML expectations456- Do not output only empty section containers.457- Include representative nested content for the hero, progress/task/reward modules, active tab panels, and popup shells.458- When a female-led or poster-led hero is used, render `./image/bg.png` inside the first visible hero block at the top of the page.459- Keep the main hero image above summary chips, tabs, task modules, and rules.460- For tab-first pages, include a sticky tab bar and representative nested content inside each tab panel.461- Use realistic wrappers such as badges, ribbons, tabs, stat chips, progress nodes, reward cards, glow layers, floating ornaments, celebratory particles, and richer festive framing when the reference implies them.462- Keep the structure editable, but visually expressive on first render.463464### CSS expectations465- Start with `:root` tokens for major colors, gradients, shadows, radii, and spacing.466- Build atmosphere first: page background, hero backdrop, decorative light/shapes, panel chrome, and CTA emphasis.467- Prefer layered gradients, image-free ornaments, shadows, strokes, masks, and glow treatments over flat white cards.468- Style sections as distinct visual modules instead of repeating the same generic card everywhere.469- Support sticky mobile tabs, active tab states, and compact tab-panel switching for long H5 pages.470- When the references imply rich festive posters, let the hero rely on `./image/bg.png` and reference-driven backdrop styling rather than a plain gradient-only header.471- When a female-led hero is used, style the figure area as a real visual focal point with framing, light, depth, and theme-specific ornaments.472- Include at least 1 signature interaction animation and 2 supporting layers for festive or reward-led pages, such as wheel spin, red-packet burst, stamp press, sparkle drift, ribbon shimmer, CTA pulse, marquee movement, or popup rise-in.473- Add reduced-motion handling when the animation system is richer than a simple CTA pulse.474- Include responsive handling for mobile-first rendering.475476### JavaScript expectations477- Render repeated lists from data, but avoid reducing the whole page to blank placeholders.478- Support interactive states that help sell the concept visually, such as active tabs, selected rewards, progress states, countdown text, and popup opening.479- Support lightweight tab switching and active panel state when the delivery uses a tab-first layout.480- Support configurable activity triggers and simple front-end motion such as popup entrance, tab fade/slide, countdown refresh, wheel start/stop, red-packet burst, sign-in stamp, marquee movement, or reward highlight state when they help the page feel launch-ready.481- Keep the animation state machine data-driven so a different generated activity type can reuse the same page shell.482- Keep interactions lightweight and front-end only unless the user provides real APIs.483484### Mock data expectations485- Provide enough titles, subtitles, badges, numbers, CTA text, activity config, animation preset data, and asset references to make the page look complete.486- Use mock labels that match the proposed campaign tone instead of filler text.487488## Delivery anti-patterns489Avoid these default outputs unless the user explicitly asks for minimal scaffolding:490- `Arial` plus gray background plus white rounded cards for every module491- repetitive `.section-card` wrappers with empty containers492- only one-line `<h1>` and `<p>` placeholders in the hero493- visually neutral buttons with no hierarchy494- a page that reads like a wireframe rather than a campaign landing page495- a character-led brief solved with a text-only hero and no figure slot496- a character-led brief solved with a placeholder image slot or a `./image/bg.png` mention that never becomes the top visual497- a required photorealistic hero delivered as an illustration-like, doll-like, or obviously broken figure498- a rerun that quietly reuses an old hero image even though the user did not ask to reuse it499- saying the page uses a generated image even though no image tool was called in the current run500- a generated hero image that contains copied prize modules, invitation boards, page text, or lower-page layouts from the reference501- a generated hero image that recreates the same woman's face or pose from the reference instead of producing a new character502- an open-ended brief that still gets locked to only wheel/check-in/red-packet options with no attempt to generate a fresher mechanic503- a long H5 page created by vertically stacking every module by default504- a text-first header or summary strip placed above the main hero image505- a festive campaign page that stays almost fully static and under-decorated506- a Python local delivery that writes HTML/CSS/JS but forgets to create `project/`, `project/<delivery-slug>/`, or `project/<delivery-slug>/image/`507- rules, records, and prize details all expanded on the main page without tabs or progressive disclosure508- output that looks like a bare demo, starter, or wireframe instead of a near-launch H5 front-end draft509- placeholder-only sections with weak hierarchy and incomplete module internals510- visually finished hero areas paired with unfinished lower modules that break the sense of a shippable page511512## Example user requests513- “参考这几个活动页,给我出一个新的 H5 活动方案。”514- “根据这个参考图,先做玩法抽象,再给我页面架构。”515- “按这个活动参考,输出 HTML + CSS + JS 版本。”516- “我想同时要策划和代码,你走 full mode。”