// This skill generates a complete, production-ready AI writing SaaS website called "Inkling" with full front-end and back-end functionality, deployed to EdgeOne Pages. It creates a premium, cinematic landing page with liquid glass design, interactive demos, waitlist, user authentication, payment integration, AI customer service (requires explicit **AI_API_KEY** / **AI_MODEL** on deploy), and Edge KV-backed data persistence, with a step-by-step operator setup guide for AI environment variables. Use when the user asks to "build an AI writing SaaS", "create Inkling", "generate a premium SaaS landing page", "deploy a full-stack web app to EdgeOne", or any request involving AI writing tools, SaaS website generation, or EdgeOne Pages deployment with complex features.
This skill generates a complete, production-ready AI writing SaaS website called "Inkling" with full front-end and back-end functionality, deployed to EdgeOne Pages. It creates a premium, cinematic landing page with liquid glass design, interactive demos, waitlist, user authentication, payment integration, AI customer service (requires explicit **AI_API_KEY** / **AI_MODEL** on deploy), and Edge KV-backed data persistence, with a step-by-step operator setup guide for AI environment variables. Use when the user asks to "build an AI writing SaaS", "create Inkling", "generate a premium SaaS landing page", "deploy a full-stack web app to EdgeOne", or any request involving AI writing tools, SaaS website generation, or EdgeOne Pages deployment with complex features.
agent_created
true
Inkling Generator Skill
Generate a complete, production-ready AI writing SaaS website with full-stack capabilities.
Purpose
This skill creates "Inkling" — a premium AI writing workspace SaaS website for marketers, founders, technical writers, and creative professionals. The generated project includes:
Asks to build an AI writing SaaS or similar premium web application
Wants to deploy a full-stack project to EdgeOne Pages
Needs a complete project skeleton from a single description
Requests login/payment/AI features in a web application
Mentions "Inkling", "AI writing workspace", or "premium SaaS landing page"
Prerequisites
Before generating the project, verify:
EdgeOne CLI is installed (version ≥ 1.2.30):
edgeone -v
If not installed: npm install -g edgeone@latest
Node.js is available (v18+ recommended)
User has EdgeOne Pages account (will need login during deployment)
AI customer chat — mandatory disclosure (secrets)
The floating chat is not a working product assistant until the operator configures model credentials. The Edge Function POST /api/chat calls an OpenAI-compatible Chat Completions endpoint when AI_API_KEY is set. If it is missing, the API returns ok: false, code: "AI_NOT_CONFIGURED", and a reply that explains required environment variables.
When generating or handing off Inkling, you must tell the user explicitly:
Set AI_API_KEY (required for live replies) in EdgeOne Pages environment secrets (or local Edge env).
Set AI_MODEL (required for live replies; e.g. gpt-4o-mini, gpt-4o) — do not assume a default is “good enough” without the user choosing a model for their account and quota.
Optionally set AI_API_URL if the provider is not the default https://api.openai.com/v1/chat/completions.
Redeploy after saving secrets, then verify /api/chat returns ok: true and a real reply.
Until those steps are done, the UI only shows the configuration guidance message (no hidden mock conversational backend).
AI configuration playbook (must include in handoff)
When generating or handing off Inkling, provide this exact setup flow so users can configure quickly with minimal confusion:
Collect values first
Provider type (OpenAI-compatible endpoint)
AI_API_KEY
AI_MODEL (explicit model id chosen by the user)
Optional AI_API_URL (only if non-default endpoint)
Success criteria: response includes ok: true and a non-empty reply.
Troubleshoot in order
AI_NOT_CONFIGURED => missing AI_API_KEY or no redeploy after setting variables
model request failed => verify AI_MODEL and provider compatibility
connection errors => verify AI_API_URL and provider availability
Mandatory handoff rule: the final response must include a numbered environment setup checklist (local optional + EdgeOne required + redeploy + verification), not only a generic reminder.
Project Generation Workflow
Step 1: Gather Requirements
Ask the user for:
Product name (default: "Inkling")
Tagline (default: "Where words meet intelligence.")
Feature scope (default: full — auth, payment, AI chat, demos, waitlist)
Deployment site (China or Global — always ask, never assume)
AI chat configuration inputs:
AI_API_KEY (required for real replies)
AI_MODEL (required; user must choose explicitly)
AI_API_URL (optional custom endpoint)
Whether local .env guidance is also needed
Always disclose that /api/chat stays in setup-guidance mode until required variables are configured and redeployed (see AI customer chat — mandatory disclosure).
If the user provides a single-sentence description, parse it and use sensible defaults for unspecified options.
PricingSection — 3-tier pricing with featured highlight and wired plan CTAs:
Start Free (Studio) opens auth flow when logged out, or dashboard when logged in.
Choose Momentum (featured plan) opens auth flow when logged out, or dashboard when logged in.
Talk to Sales (Signal/enterprise-style plan) opens the floating ChatWidget.
TestimonialsSection — 3 testimonial cards
FinalCta — Waitlist form + share buttons + footer
AuthModal — User login/register modal
Dashboard — User dashboard (post-login)
ChatWidget — Floating AI support chat (see Floating AI support chat (ChatWidget) below)
Floating AI support chat (ChatWidget)
The customer-service UI must be a viewport-level overlay, not normal in-flow content inside main. On pages that use Framer Motion (transform), glass effects (backdrop-filter), or similar, a non-portaled position: fixed panel can resolve against the wrong containing block, so the panel may appear on the side of the page instead of above the bottom-right FAB.
Implementation requirements
Render the whole widget (FAB + panel) with createPortal(..., document.body) from react-dom so fixed is always relative to the browser viewport.
Use a mounted flag set in useEffect before portaling; return null on the server / first client pass to avoid hydration edge cases.
Layout: circular FAB at fixed bottom-6 right-6; panel at fixed bottom-24 right-6; z-index above page chrome (e.g. z-[95]) but below full-screen modals such as auth / dashboard (e.g. z-[100]).
Interaction: open defaults to false; the FAB toggles the panel; the FAB shows a close icon when open and a message icon when closed.
Styling: prefer an explicit translucent panel (backdrop-blur + border + background) on the portal root. If you reuse .glass-shell, verify borders, shadows, and clipping with overflow-hidden.
Markdown rendering is required: assistant replies in the floating chat must be rendered as Markdown (not plain text), supporting at least paragraphs, lists, emphasis, inline code, and code fences. User messages can remain plain text. If a Markdown renderer component exists (for example ChatMarkdown), reuse it consistently for assistant bubbles.
External open trigger: the widget must support being opened by external UI actions (for example the hero Talk to Sales button), not only by clicking the floating action button itself.
AI chat is inactive until the operator configures secrets
You MUST disclose this when generating or handing off the project. The widget calls POST /api/chat, which does not use canned keyword mock replies in the shipped handler: if AI_API_KEY is unset, the handler returns ok: false, code: "AI_NOT_CONFIGURED", and a reply that lists the required environment variables.
Variable
Required for live model replies
Purpose
AI_API_KEY
Yes
Bearer secret for an OpenAI-compatible Chat Completions API.
AI_MODEL
Yes
Model id (e.g. gpt-4o-mini, gpt-4o). The operator must choose and set this explicitly per deployment.
AI_API_URL
No
Defaults to https://api.openai.com/v1/chat/completions.
After secrets are saved on EdgeOne Pages (or in local Edge Function env), the operator must redeploy and verify /api/chat returns ok: true with a non-empty reply.
Agent checklist: In your final message to the user, include explicit steps to set AI_API_KEY and AI_MODEL, redeploy, and test chat.
Design System
Colors:
Background: #050816
Deep surface: #0b1020
Primary: #7c3aed (violet)
Secondary: #22d3ee (cyan)
Accent: #f59e0b (amber)
Highlight: #ec4899 (pink)
Typography:
Hero display: Cormorant Garamond (600, 700)
Supporting headings: Sora (400-700)
Body/UI: Manrope (400-800)
Technical labels: IBM Plex Mono (500, 600)
Glass System:
.glass-shell — Primary glass container
.glass-pill — Compact glass element
.glass-editor — Editor-specific glass
.glass-float — Floating overlay glass
.glass-metric — Metric display glass
Animation Patterns
Hero headline: gradient shimmer + load-in reveal
Product scene: pointer-reactive 3D tilt
Demo carousel: auto-rotate with progress indicators
Image showcase: infinite horizontal drift
Metrics: count-up animation on scroll
Cards: hover lift + glow effects
Step 4: Generate Back-end (Edge Functions)
All Edge Functions use the EdgeOne Pages Functions format with KV storage.
API Endpoints
Method
Route
Purpose
GET
/api/site
Full site content (brand, nav, hero, demos, showcase)
GET
/api/features
Feature card data
GET
/api/pricing
Pricing plan data
GET
/api/testimonials
Testimonial data
GET
/api/stats
Live metrics + waitlist/share counts
GET
/api/health
Health check
POST
/api/waitlist
Waitlist signup (validates email, stores in KV)
POST
/api/share
Share tracking (increments counter)
POST
/api/auth/login
User login (JWT token)
POST
/api/auth/register
User registration
GET
/api/auth/me
Get current user
POST
/api/payment/create-checkout
Create Stripe checkout session
POST
/api/payment/webhook
Stripe webhook handler
POST
/api/chat
AI support chat (OpenAI-compatible Chat Completions; requires AI_API_KEY + AI_MODEL; assistant reply text is Markdown-renderable in UI)
KV Storage Keys
waitlist:count # Total waitlist subscribers
waitlist:{email} # Individual subscriber records
share:count # Total share actions
share:last:{channel} # Last share per channel
user:{id} # User profiles
user:email:{email} # Email-to-ID mapping
session:{token} # Active sessions
showcase:metadata # Showcase image metadata
chat:{sessionId} # Chat history
subscription:{userId} # User subscriptions
Middleware
Auth Middleware — Validates JWT tokens, attaches user to request
Rate Limiter — Limits requests per IP (configurable per route)
Step 5: Generate Node Functions
For complex operations that need Node.js runtime:
Stripe Webhook Handler — Processes payment events, updates user subscriptions
Email Service — Sends waitlist confirmation emails (optional)
Step 6: Build and Deploy
Follow the deployment workflow from the edgeone-pages-deploy skill:
# Browser login (default)
edgeone pages deploy -n inkling
# Or with token
edgeone pages deploy -n inkling -t <token>
Parse deploy output and return the public URL.
After first deploy: Provide a concrete setup checklist: add AI_API_KEY and AI_MODEL in EdgeOne Pages environment variables, optionally set AI_API_URL, redeploy, and test POST /api/chat so the floating assistant returns real model text instead of AI_NOT_CONFIGURED.
Customization Guide
Changing Brand Content
Edit edge-functions/_lib/content.js to update:
Brand name and tagline
Navigation links
Hero copy
Demo scenarios
Showcase images
Feature descriptions
Pricing plans
Testimonials
Stats seed values
Changing Design
Edit src/styles.css to modify:
Color palette (CSS custom properties)
Glass morphism effects
Animation keyframes
Typography scale
Adding Features
To add new API endpoints:
Create handler in edge-functions/_lib/handlers.js
Create route file in edge-functions/api/{name}.js
Add route to .edgeone/edge-functions/config.json
Add frontend API method in src/lib/api.ts
Add fallback data in src/lib/fallbacks.ts
Quality Checklist
Before declaring the project complete, verify:
Hero is visually striking with liquid glass effects
Typography uses correct font stack (Cormorant Garamond, Sora, Manrope, IBM Plex Mono)
Hero headline has subtle gradient shimmer animation
Product scene has 3D perspective tilt on hover
Demo auto-rotates through exactly 5 scenarios
Image showcase scrolls automatically
Feature grid is balanced 3x2 layout
Waitlist form works through Edge Functions + KV
Share buttons update counts
Stats are wired into the UI
No horizontal overflow on mobile
Responsive at 390px, 768px, 1024px, 1440px
Auth modal works (login/register)
Auth persistence works: token is stored after login/register, sent to /api/auth/me via Authorization: Bearer <token>, and session is restored on reload
Dashboard loads user data
Hero Start Free CTA opens auth flow when logged out and dashboard when logged in
Hero Talk to Sales CTA opens the floating chat panel
Pricing Start Free CTA opens auth flow when logged out and dashboard when logged in
Pricing Choose Momentum CTA opens auth flow when logged out and dashboard when logged in
Pricing Talk to Sales CTA opens the floating chat panel
Chat widget is portal-mounted to document.body, fixed bottom-right, toggles with FAB (not in normal document flow)
Assistant messages in chat are rendered as Markdown (including lists/code blocks), while user messages remain plain text
After AI_API_KEY / AI_MODEL are set and redeployed, chat sends user messages and receives model replies via POST /api/chat
Operator has been told to set AI_API_KEY and AI_MODEL, redeploy, and verify /api/chat for real replies (until then, AI_NOT_CONFIGURED is expected)
Payment flow creates checkout session
All Edge Functions have proper error handling
KV storage is used for persistence
Project is deployed to EdgeOne Pages
Public URL is returned
Output Contract
After building and deploying, return:
Public EdgeOne Pages URL (complete with auth params)
Visual concept summary (2-3 sentences)
Implemented API routes (list all endpoints)
KV storage usage (which keys, what data)
Demo scenarios (list all 5)
Feature scope (auth, payment, AI chat with explicit env-based model setup and Markdown-rendered assistant replies, etc.)
Customization points (where to change content/design)