Add a Landing Page to an Existing Repo Using Its Own Components with Claude Code

Get Claude Code to build a landing page inside your existing codebase using your components and styles, with a section plan, file list, checks and a TODO list for copy.

Agent prompt for Cursor and Codex

You get: Repo findings, page plan table and files created or changed

The prompt

Prompt
Act as a senior front-end engineer working inside this repository.

Job: add a new landing page at  whose purpose is: . Build it from the components, layouts, styles and design tokens that already exist here.

Before writing code, inspect the repo: framework and router, how existing marketing pages are structured, the component library, the styling approach and the scripts in the package manifest. Then ask me up to 3 short numbered questions about anything you cannot find in the code, and wait for my answers.

Rules:
1. Reuse existing components first. For any new component, name the existing one you considered and why it did not fit.
2. Add no new dependencies without asking me.
3. Never invent testimonials, customer names, logos, statistics or prices. Use clearly marked TODO placeholders instead.
4. Exactly one h1, page title and meta description set the way other pages do it, alt text on every image, visible keyboard focus on every link and button.
5. Never invent CLI flags, config keys or framework features; check the docs for the installed version when unsure.
6. Never commit, push or deploy. Leave changes for my review.

Output format:
1. Repo findings (5-8 bullets)
2. Page plan table: Section | Component (reused or new) | File | Content source
3. Files created or changed, one line each on what changed
4. Verification: each existing lint, typecheck and test command, and whether it passed, failed or was not run
5. TODO list of copy and assets I must supply

Finish by stating your assumptions and any risks.

Example output

Example for: route_path = /for-agencies, page_purpose = pitch our invoicing app to small design agencies and get them to start a 14-day free trial; answers: 1) CTA goes to /signup?plan=agency, 2) use the existing marketing layout, 3) no final copy yet. Fictional Next.js App Router repo "billfold-web".

1. Repo findings
  • Next.js App Router; marketing pages live in app/(marketing)/.
  • Shared layout app/(marketing)/layout.tsx adds SiteHeader and SiteFooter.
  • UI components in components/ui/ (Button, Card, Badge) and components/marketing/ (Hero, FeatureGrid, CtaBanner, FaqList).
  • Styling is Tailwind; tokens in tailwind.config.ts (brand-600, radius-lg).
  • Metadata uses the exported metadata object, as in app/(marketing)/pricing/page.tsx.
  • Scripts in package.json: lint, typecheck, test (Vitest).
2. Page plan
SectionComponent (reused or new)FileContent source
Hero with h1 and CTAHero (reused)app/(marketing)/for-agencies/page.tsxTODO headline
Agency pain pointsFeatureGrid (reused)sameTODO 3 items
How billing works for projectsStepList (new)components/marketing/StepList.tsxTODO 3 steps
FAQFaqList (reused)sameTODO 4 questions
Trial CTACtaBanner (reused)same/signup?plan=agency

StepList is new: I considered FeatureGrid, but it has no numbered order or connecting line, which the step section needs.

3. Files created or changed
  • app/(marketing)/for-agencies/page.tsx: new page, metadata title and description with TODO text, one h1 in Hero.
  • components/marketing/StepList.tsx: new ordered-list component using brand-600 and existing focus ring classes.
  • components/marketing/index.ts: exports StepList.
4. Verification
  • npm run lint: not run in this example; run it and check for errors in the new files.
  • npm run typecheck: not run; StepList props are typed, confirm locally.
  • npm run test: not run; no existing tests cover marketing pages.
5. TODO copy and assets
  • Hero headline and subheadline
  • 3 agency pain points
  • 3 billing steps
  • 4 FAQ questions and answers
  • Hero image with alt text, or confirm text-only hero
  • Meta description (under 160 characters)

Assumptions and risks: I assumed the agency plan exists at /signup?plan=agency; if not, the CTA will land on a generic form. No analytics event is attached to the CTA because I found no tracking pattern on other pages; check whether you need one.

Written by AI from this prompt. Your results will vary.

How to use this prompt

  1. Fill {route_path} with the URL the page should live at and {page_purpose} with who it is for and the action you want.
  2. Open Claude Code in your repo root and paste the prompt.
  3. Answer its numbered questions about CTA targets, layout or copy it could not find in the code.
  4. Review the page plan table before it writes files; push back on any new component that duplicates an existing one.
  5. Run the dev server, check the page yourself, then fill the TODO copy before you commit.
Who it’s for:
Developers using Claude Code to add marketing pages to existing apps
What you get:
An uncommitted landing page built from your own components, plus a section plan, change list, verification status and a list of copy and assets still needed.

Use cases

  • Adding a /for-agencies page to a Next.js SaaS app that already has a marketing layout and button library
  • Shipping a campaign page for a product launch without pulling in a new UI kit
  • Creating a segment page for nonprofits that matches existing pricing page styles
  • Letting a junior dev scaffold a landing page that a designer can later fill with final copy

Works well with

  • Claude Code: reads the repo and package scripts itself before planning the page
  • Cursor agent mode: good when you want to review each file diff inline

Try another example

The same prompt filled in for a different situation.

Act as a senior front-end engineer working inside this repository.

Job: add a new landing page at /nonprofits whose purpose is: explain our 50% nonprofit discount on the volunteer scheduling app and collect discount applications. Build it from the components, layouts, styles and design tokens that already exist here.

Before writing code, inspect the repo: framework and router, how existing marketing pages are structured, the component library, the styling approach and the scripts in the package manifest. Then ask me up to 3 short numbered questions about anything you cannot find in the code, and wait for my answers.

Rules:
1. Reuse existing components first. For any new component, name the existing one you considered and why it did not fit.
2. Add no new dependencies without asking me.
3. Never invent testimonials, customer names, logos, statistics or prices. Use clearly marked TODO placeholders instead.
4. Exactly one h1, page title and meta description set the way other pages do it, alt text on every image, visible keyboard focus on every link and button.
5. Never invent CLI flags, config keys or framework features; check the docs for the installed version when unsure.
6. Never commit, push or deploy. Leave changes for my review.

Output format:
1. Repo findings (5-8 bullets)
2. Page plan table: Section | Component (reused or new) | File | Content source
3. Files created or changed, one line each on what changed
4. Verification: each existing lint, typecheck and test command, and whether it passed, failed or was not run
5. TODO list of copy and assets I must supply

Finish by stating your assumptions and any risks.

Tips and common edits

Why this works

  • Forcing repo inspection first keeps the page in your framework, layout and styling instead of a generic standalone template.
  • Requiring a reason for each new component stops the agent from rebuilding buttons and cards you already have.
  • TODO placeholders instead of invented testimonials or stats keep fake social proof out of production.

Use when you need a new marketing page inside an existing app, not a standalone site. Have the route and goal ready. Suits Claude Code, Cursor and Codex working in your repo.

Common edits

  • Add a rule to wire the CTA to your analytics helper, naming the file where tracking lives.
  • Ask for a responsive check at specific breakpoints, such as 375px and 1280px, in the verification section.

Reuse it: Use in a workflowAdapt in the builder

More in Claude Code

Automated Dead Code Cleanup Plan for Codex Repositories

Get a systematic plan to identify and safely remove unused exports and dead code from your codebase using characterization tests to prevent regressions.

DesignClaude Code

Audit Front-End Code Against Web Interface Guidelines

A SKILL.md that reviews your React, Vue, Svelte or HTML components against 15 checkable interface rules and lists each problem as file:line with a suggested fix.

Sync Test Factories and Fixtures with Database Migrations

This prompt updates your test factories, JSON fixtures, and contract tests to match new database schema changes, ensuring your test suite remains consistent with production code.

Coding

Port a Function or Module to Another Language With Tests Proving Same Behavior

Lists the source code's behaviors and edge cases, writes tests in the target language first, ports the code idiomatically, and gives a table of library mappings and semantics that differ.

Design

Build a Testimonial and Logo Social-Proof Section in a Single HTML File

You get one HTML file with a social-proof section: CSS-drawn customer logos, headline stats and testimonial cards that switch between a grid and an accessible carousel.

Cursor Characterization-Test-First Refactor of a Legacy Module

Has Cursor lock in current behavior with characterization tests before restructuring a legacy module in small steps, so you can decide whether the refactor preserved behavior and is safe to merge.