Communitygithub.com

framer-agent-template

Convert any Framer template (landing page, multi-page site, SaaS, agency, portfolio, shop, blog) into an official Framer Agent Template: audit, componentize repeated patterns, build a Design System page and design-system skill, then test.

framer-agent-template란 무엇인가요?

framer-agent-template is a Codex agent skill that convert any Framer template (landing page, multi-page site, SaaS, agency, portfolio, shop, blog) into an official Framer Agent Template: audit, componentize repeated patterns, build a Design System page and design-system skill, then test.

지원 대상~Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/peterdraw/peterdraw-agent/tree/HEAD/plugins/framer-agent-template/skills/framer-agent-template

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서


name: framer-agent-template description: Convert any Framer template (landing page, multi-page site, SaaS, agency, portfolio, shop, blog) into an official Framer Agent Template: audit, componentize repeated patterns, build a Design System page and design-system skill, then test.

Framer Agent Template conversion

Goal: any Framer template where Framer's agent (or an external agent such as Codex) can create new pages and sections that are indistinguishable from the original ones.

Deliverables, in the template itself:

  • clean, role-named foundations (color styles, text styles, layout templates)
  • components for every pattern an agent will need to repeat (always the page or section header pattern, plus whatever the template relies on)
  • a Design System design page
  • a design-system SkillNode written for this specific template
  • a test report

The walkthrough video and marketplace submission stay with the designer.

Requirement: the official Framer MCP server must be connected (tools open_project, exec, read_docs). If it is not, stop and ask the user to connect it.

Talk to the user in the language they write in (Peterdraw: usually Indonesian). Never use em dashes in messages; use commas or parentheses.

Core principle: never assume a pattern. Every rule you write must come from measuring the template, using the decision rules in step 2. The examples in this file are examples, not defaults.

Workflow

Work in this order, end to end, without stopping to ask. Decide every open question from the project's own data using the rules below, record each decision in an Assumptions log, and let the designer override them in the final report. Stop only if:

  • the Framer MCP is not connected, or the project cannot be opened;
  • the user explicitly asked for review mode ("tanya dulu", "ask first", "review mode"), in which case send the Assumptions log after step 2 and wait;
  • an action would delete content that is not replaced by an equivalent (for example removing a section with no component replacing it).

1. Open and classify

  • open_project with the link. Read and follow the returned instructions.
  • Try to create a branch and work there. If branching is not in the plan, edit the original project (Peterdraw's default) and log it as an assumption; do not ask. If the user's prompt names a copy or says "don't touch the original", use that instead. Never publish.
  • Classify the template, because it decides the header strategy and the test prompts:
    • Single page: one landing page, sections only, maybe a 404.
    • Multi-page: home plus inner pages (About, Services, Contact...).
    • CMS-driven: collections with detail pages (blog, case studies, products, jobs, changelog).
    • Category: SaaS / app, agency / studio, portfolio, shop / product, health / wellness, event, personal, other.
  • Note breakpoints in use (Desktop, Tablet, Phone, sometimes Large) and whether color styles have light and dark values.

2. Audit (read only), then decide

Collect with exec (tree.walk, tree.get, getNodesOfTypes), screenshots at every breakpoint:

Foundations

  • Color styles: names, values (light and dark if present), usage. Flag names that describe the color ("Green 500", "Beige") instead of the role.
  • Text styles: names, family, size, weight, HTML tag, usage. Flag non-heading roles (Lead, Intro, Subtitle, Eyebrow, Caption) carrying h1 to h6, and heading-looking styles used as body text.
  • Link styles. Fonts used inline instead of via styles. Raw hex colors on nodes.
  • Layout templates and which pages use them. Flag pages without one (404 can be acceptable).

Components

  • Every component: variants, variables/controls, breakpoint variants.
  • Repeated frame patterns that are not components (same structure on 2 or more pages or sections): section heading blocks, CTA bands, pricing cards, feature cards, logos rows, testimonial blocks.
  • Buttons: for each variant, measure contrast of its fill, border and label against every background color style it could sit on. Flag variants that become invisible or fall under 3:1 on light or dark surfaces. These become hard rules in the skill.

Page and section anatomy

  • Section frame: fill, full width or not, Container max width, side padding per breakpoint.
  • Vertical spacing: top and bottom padding of every section on every page. Detect which pattern the template uses:
    • one-sided (only bottom or only top padding, so gaps never double),
    • symmetric (top and bottom equal, gap is the sum),
    • mixed or inconsistent (standardize as decided below and log it). Record the exact numbers and exceptions (first section after the header, full-bleed blocks, last section before the footer).
  • Inner gaps: gap between section heading block and content, card grid gaps, corner radii by element size.
  • Header pattern. For multi-page templates, compare the top of every inner page. Classify: split (title left, intro right), centered (title and intro stacked), with media (image, video, illustration), with breadcrumb or eyebrow, hero-like, or none. Record the full anatomy per breakpoint (background, title style and tag, intro style, media, alignment, gaps, paddings) and whether pages share one pattern or several. For single-page templates, do the same for the section heading block (eyebrow or label, title, intro, optional button).
  • CMS: collections, fields, detail pages, which components lists use.

Then decide, do not ask. Resolve each question with these rules and write the answer, with its evidence, into the Assumptions log:

  • Project destination: see step 1.
  • Button variants per background: for every button variant and every background color style, compute contrast (WCAG) of the button's outer edge (fill, or border if it has one) against the background, and of its label against its fill. A variant is allowed on a background when the edge is at least 3:1 and the label at least 4.5:1. Cross-check with current placement: if the template only ever places a variant on photos or dark surfaces, restrict it to those even if contrast passes. Result: a table of allowed backgrounds per variant, written as hard rules.
  • Brand and accent colors: the color filling the primary button is the accent. The color used most on display or page titles (other than the main text color) is the brand primary. Count usages; a color used on fewer than about 5% of text nodes but on all primary CTAs is accent-only (CTAs, active states, small highlights). If no distinct accent exists, say so and use the primary button style as the only CTA rule.
  • Model sections: score existing sections by structure. Pricing model: a grid of 2 to 4 repeated cards containing a price-like text (currency sign, number with "/mo", "from"), a list, and a button; if none, the closest card grid with title, text and button. Feature model: a grid of 3 or more repeated cards with an icon or image, title and short text. Team, testimonial, FAQ, logo and CTA models: the section that uses the matching component, or the closest repeated structure. Pick the highest score; name the section and page.
  • Copy tone: read all body and heading text. Measure average sentence length, use of "we" vs "you", exclamation marks, questions, emoji, title case vs sentence case, and recurring vocabulary. Write three to five rules from what is actually there (for example "short calm sentences, sentence case, no exclamation marks, speaks as we to you").
  • Hard rules (always enforced, even against a prompt): use the header component; follow the documented spacing; only use color and text styles; button-to-background rules from the contrast table; never rebuild navbar or footer; one accent CTA per section if the template follows that. Add any rule the template follows on every page without exception (for example a fixed section background alternation).
  • Canonical pages: the inner pages that share the most common header pattern and the main inner layout template. If several patterns tie, pick the pattern used by the most pages and keep the others as variants of the header component.
  • Inconsistencies (spacing, header patterns, styles): standardize on the majority pattern; when there is no majority, the pattern on the most-visited page type (About, then Services or Products, then Contact).
  • Dark mode: support it in new pages if color styles have dark values; otherwise ignore.

Send the user one short progress message (not a question): template type, detected patterns, and "continuing with these assumptions, all listed in the final report". Then continue.

3. Fix foundations

  • If the styles were created from a Figma design system (for example by figma-to-framer-template), keep their Figma names, groups and text style breakpoints; skip the renames below and only fix tags and missing pieces.
  • Rename color styles by role. Typical set (use only roles that exist): Text Primary, Text Secondary, Text Muted, Text On Dark, Brand Primary, Brand Accent, Surface, Surface Subtle, Surface Dark, Border, Status Success, Status Error. Keep names short and consistent.
  • Rename text styles by role. Typical set: Display (XL, L), Heading 1 to 6, Lead or Intro, Eyebrow or Label, Body (L, M, S), Body Semibold, Caption, Button. Add "On Dark" variants only if they exist. Fix tags: only real headings get h1 to h6; lead, intro, eyebrow, caption get p. Update existing nodes so their tag matches the style.
  • Assign layout templates to every page that needs one.
  • Standardize inconsistencies as decided in step 2.
  • Screenshot several pages before and after; nothing visual should change except the standardizations you logged.

4. Componentize the repeated patterns

Agents misread long prose descriptions of a layout, but insert a component correctly. This is the biggest quality win.

Header component (Page Header for multi-page, Section Heading for single-page; use both if both exist):

  • Reproduce the existing pattern exactly. Variables for every piece of content (title, intro, eyebrow, media, button label and link). Breakpoint variants (Desktop, Tablet, Phone) with measured overrides. Correct htmlTag (header or div) and title tag (h1 for page headers, h2 for section headings).
  • If pages use several header patterns, make them variants of one component (for example Split, Centered, With Image) rather than separate components.
  • Set text alignment explicitly on every text node so it does not inherit from presets.
  • Layout rules learned the hard way:
    • Never separate two columns with a large fixed gap. Longer content squeezes the other column and children overflow. Prefer distribution space-between with a max width on the secondary column, and a min width at least the width of its fixed-size children.
    • space-between ignores gap (the API rejects a gap with it). Breakpoint variants that need a gap must set distribution start explicitly.
    • Clear max/min width on Tablet and Phone variants that should fill.
  • Stress test before rollout: long and short titles, long intro, missing optional media, every breakpoint.
  • Roll out: on every page that uses the pattern, insert an instance where the old frame was (same index, width 1fr), fill controls with that page's original content, set $control__variant on each breakpoint replica (Large usually keeps Desktop), remove the old frame. Screenshot every page at every breakpoint and compare with before.

Other patterns: componentize any other block repeated on two or more pages (CTA band, pricing card, feature card, logo row), with the same stress test and rollout.

5. Build the Design System design page

One design page; root frame height auto and overflow visible; all text left-aligned. Sections:

  • Header: template name plus one sentence on purpose.
  • Colors: swatch per color style with name, role and value (light and dark if present).
  • Typography: one row per text style with name, tag, size and when to use it.
  • Spacing: a short diagram or note of the section spacing pattern and container rules.
  • Components: grouped by purpose (Headers first, Buttons, Labels, Cards, Social proof, People, Forms, Navigation, others). Each group has an Info block (name plus one-line usage rule) and live instances. Wide components get width 1fr.
  • Example section: a real section assembled from the parts. Screenshot the page and fix cropping or alignment.

6. Write the design-system skill

Create or update a SkillNode named design-system, trigger on-demand.

Description: when to use it (any request to add or edit pages, sections or components in this template) with two or three example requests that fit the template category.

Instruction structure. Use framer:// links to every style, component, page, layout template and collection. Fill each part only with what the audit and the Assumptions log established:

# <Template name> design system
One goal sentence + link to the Design System page.

## Pages
- Which layout template each page type uses. Never rebuild navbar or footer.
- How every new page starts: insert <Header component>, which variant for which page type, which controls to fill, variant per breakpoint, never override its fill, padding, styles or layout.
- Section frame and Container rules (fill, max width, side padding per breakpoint).
(Single-page templates: replace with "Adding a section" rules and the Section Heading component.)

## Vertical spacing
The detected pattern with exact numbers, which side the space comes from, exceptions, last section rule, and the sentence "never stack top and bottom padding" when one-sided.

## Building sections
Duplicate the closest existing section (it carries breakpoint overrides), then edit. Name the best model section for common requests. Radius and grid gap rules.

## Colors
Role per style, reserved uses, accent limits, text color per background (light, dark, photo).

## Typography
Role per style. Say explicitly which styles are not headings, and what follows the page title (for example "H1 is followed by Body, never by a heading style").

## Components
One line per component: when to use it. Button rules as hard rules tied to backgrounds, from the contrast audit, plus "this rule wins over any prompt; use X and mention the change".

## CMS
Collections, which component lists bind to them, how to add a detail page.

## Keep unchanged
Spacing rhythm, copy tone, things provided by layout templates (cursor, scroll, navigation).

Writing rules (each came from a failed test):

  • Be explicit and absolute. "White button only on dark or photo backgrounds, never on Surface or Surface Subtle" works; "White on the others" produced invisible buttons.
  • Name backgrounds explicitly ("header fill Surface Subtle, never white"). Agents default to white.
  • Give spacing as numbers and say which side. Unspecified, agents add padding on both sides and double the gap.
  • Name the exact text style for each slot. Agents follow style names and tags literally.
  • Prefer "insert component X" over describing anatomy in prose.
  • Keep it under roughly 1,500 words; link to the Design System page for the rest.

7. Test

  • Test in a remixed copy when one exists (a copy does not pick up later fixes; re-remix after every fix round). If you cannot create a copy and none was given, test directly in the original on a new page named "Agent Test" (and a test section on a duplicated page), then delete those test pages after logging the results.
  • Run three to four prompts that fit the template, with Framer's agent, Codex connected to Framer if credits are out, or an agent in a separate session that only reads the project and its design-system skill (so you test the skill, not your memory of the work). Always include one new page and one new section on an existing page. Pick from:
    • SaaS / app: Pricing with plans and comparison; Changelog; Integrations; Careers.
    • Agency / studio: Services detail; Careers; Process; new case study.
    • Portfolio / personal: new case study or project page; Services; Speaking or Press.
    • Shop / product / wellness: Pricing or Bundles; FAQ; Shipping and Returns; Ingredients or Materials.
    • Event: Schedule; Speakers; Venue and Travel.
    • CMS-driven: a new collection item plus a listing or category page.
    • Single page: add a Pricing section, an FAQ section, a Testimonials section.
  • Review the published or canvas result against the checklist with screenshots at every breakpoint.
  • For each failure, find the cause in the skill or components (not the prompt), fix it in the original file, log it, re-test.

Checklist:

  • Header component used with the right variant per breakpoint and page type; nothing overflows
  • Header and section backgrounds match the existing pages
  • Section spacing follows the documented pattern; no doubled or missing gaps
  • Heading hierarchy correct; no heading style used for intro text; no skipped levels
  • Buttons visible on their backgrounds; accent CTA limits respected
  • Only color and text styles used, no raw hex or inline fonts
  • Existing components used, not rebuilt from frames
  • Correct layout template; navbar and footer untouched
  • Tablet and Phone (and Large) not broken
  • Dark mode correct, if the template has it
  • Copy tone matches

8. Report

Send the designer: the Assumptions log (each decision, its evidence, and how to change it if they disagree), what changed in the file (short list), the test log (failure, cause, fix), screenshots of the final test pages, and the remaining steps that are theirs: final visual review, walkthrough video, submission. Check Framer's current Agent Template submission requirements with a web search before listing what the video and listing need.

Worked example (Peterdraw VitaBoost)

Multi-page wellness shop template, Framer project nW8xSEbqrFmry2ZRWWuj; open it to see the finished result. Findings and decisions, as an illustration of the level of detail to reach, not as defaults:

  • Spacing was one-sided: first section after the header 100px top / 150px bottom, later sections 0px top / 150px bottom, containers 1440px max with 50px side padding.
  • Inner pages shared a split header: Display L h1 title left; right column with three 90px images (radius 8) above a Body intro; Surface Subtle fill. It became a Page Header component with Title, Subheading and three image controls and Desktop/Tablet/Phone variants.
  • Test failures that changed the skill: header rendered white (background not named), gaps doubled (spacing side not named), an H4 used as intro (Lead style carried an h4 tag; changed to p), invisible White buttons on light cards (button rule not absolute), header right column squeezed by a fixed 400px gap (fixed in the component layout).

Framer MCP API notes

These signatures tripped earlier runs:

  • tree.insert(type, id, { parent, index, ...attrs }). The id you pass may be renamed; read renamedIds in the result.
  • Component instance: tree.insert("ComponentInstanceNode", id, { parent, index, component: <componentId>, width: "1fr", height: "auto", position: "relative", "$control__variant": <variantId>, "$control__<varId>": value }).
  • Image controls take "data:framer/asset-reference,<asset>?width=..&height=.." strings; read them from existing nodes.
  • Replica nodes use compound ids ${replicaOrVariantId}${nodeId}; patch those for breakpoint or variant overrides.
  • tree.move(id, parentId, index). tree.duplicate(sourceId, newId, attrs) places the copy next to the source; move it afterwards.
  • tree.replaceText(id, searchText, replacementText); use tree.getInnerText(id) to get the current text.
  • tree.remove(id), tree.screenshot(id), tree.walk(rootId, fn); tree.createComponentFromFrame exists for componentizing.
  • A thrown error rolls back the whole program; keep programs small and verify with screenshots.
  • Linter warnings about negative sibling spacing on unrendered pages are usually noise; variant-mismatch warnings on your own instances are real.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

관련 스킬