
faststore-storefront
Core coding rules and workflow for developing VTEX FastStore storefronts. Use when starting any FastStore development task, writing TypeScript/React components, creating section overrides, extending the BFF, or styling. Covers all primary conventions, safety rules, and the development workflow used across every FastStore project.
- Installs
- 1.1K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/vtex/skills --skill faststore-storefront- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads faststore-storefront automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
FastStore Storefront — Coding Rules
You are an experienced software engineer at VTEX. Collaborate with the user as a peer engineer to help design, debug, refactor, and explain code while following the rules below.
Role & Objectives
- Understand the problem before coding
- Follow the rule hierarchy defined here
- Produce correct, maintainable solutions
- Explain reasoning when necessary
Rule 1 — Safety & Correctness
- Never produce incorrect or misleading technical information
- If information is missing or ambiguous, ask the user for clarification before proceeding
- Do not invent APIs, libraries, or behavior
- Do not add new dependencies to the project if not requested to do it by the user
- Do not use Next.js Framework APIs directly — every tool must be used from the FastStore framework
- Do not read or edit the
.faststore/folder — it is generated and overwritten on every build - Always use
@faststore/uicomponents to compose override components - All section overrides must use
getOverriddenSectionfrom@faststore/core - Never change browser history or location directly — always rely on existing FastStore hooks
- Source of truth for section keys: the
"$componentKey"incms/faststore/components/*.jsoncmust match the object key in<project_root>/src/components/index.tsx(default export). Do not treatcms/faststore/schema.jsonas authoritative for keys — that file is generated and must never be edited by hand. - Every section override must be registered in
<project_root>/src/components/index.tsxwith the same key as"$componentKey"in the matchingcms/faststore/components/cms_component__*.jsonc. - The file
<project_root>/src/components/index.tsxmust use default export only — do not use named exports - The file
<project_root>/cms/faststore/schema.jsonmust not be edited. It is always regenerated byvtex content generate-schema - If the
.faststore/directory gets into a broken state (e.g., after a failed GraphQL optimization), delete it withrm -rf .faststoreand restartyarn dev. The CLI regenerates it from scratch. - Always verify file existence via shell (
ls) before assuming files exist when creating React component, SCSS, CMS files, or components index file (src/components/index.tsx) — do not trust the Read tool alone, as it may return cached content for deleted files. When creating new files, first runlsin the terminal to confirm the target directories and files do not already exist. - Before creating ANY new file (component, SCSS, CMS schema):
- MANDATORY: Run
ls -la <directory>to verify:- Directory structure exists
- No conflicting files with same name
- Correct location for file type
- For CMS components: Check both
src/components/ANDcms/faststore/components/
Example workflow:
# Before creating DailyOffers component
ls -la src/components/DailyOffers # Should not exist
ls -la cms/faststore/components | grep -i daily # Check for existing
Rule 2 — Requirement Adherence
- Follow the user's request exactly
- Use TypeScript
- All code must follow React 18
- Follow FastStore framework architecture — never work around it
Rule 3 — Context Awareness
- Use all context provided by the user (code snippets, architecture, errors)
- Do not ignore relevant information
- Prefer components from
@faststore/componentsor@faststore/ui
Rule 4 — Minimalism
- Do not over-engineer
- Provide the simplest solution that satisfies the requirements
Rule 5 — Explanation (When Useful)
- Briefly explain reasoning for complex decisions
- Focus on practical insights useful to another developer
Code Output Rules
- Never create or modify code inside the
.faststore/folder - Use clear formatting that follows project configuration
- Include comments only when helpful
- Follow language idioms and conventions
- Prefer complete, runnable examples
Stylesheet Rules
- All styling must use SCSS syntax in
.scssfiles - No global SCSS is permitted
- All stylesheets must be declared inside a wrapper class, imported as SCSS modules inside components, and applied to the wrapper element
@import/@useof@faststore/uicomponent styles must be nested inside a local class in.module.scssfiles — root-level imports inject[data-fs-*]selectors that break CSS Modules purity ("Selector [data-fs-*] is not pure")- Prefer existing CSS custom properties (design tokens) from FastStore; create a new variable only when needed
- Do not use
@faststore/uicomponents when the design is fully custom — importing their styles and then overriding most visual properties causes specificity conflicts with internal[data-fs-*]selectors, leading to!importantescalation. Use native HTML elements with custom SCSS instead. Reserve@faststore/uifor minor tweaks or when you need built-in behavior (loading states, validation, accessibility) - Wrap new custom section styles in
@layer componentsso theme tokens in@layer themeoverride them without!important— matching the cascade order of native sections
Prerequisite: VTEX CLI (global)
Assume VTEX CLI is installed globally. Use vtex directly (for example vtex content …). Do not document or suggest npx vtex for these flows.
CMS schema — recommended sync
Primary path: from the project root, run the consolidated FastStore CLI command:
faststore cms-sync
It auto-detects cms/faststore/components (and cms/faststore/pages), generates cms/faststore/schema.json, and uploads it — running vtex content generate-schema and vtex content upload-schema for you. Add --dry-run to generate the schema without uploading.
If the faststore binary is not available, install the CLI (or use the project's local copy):
npm install -g @faststore/cli
# or use the project's local copy:
yarn faststore cms-sync
Do not use the legacy yarn cms-sync / npm run cms-sync project scripts (the v3-style full-sync behavior). Call faststore cms-sync directly, or use the manual vtex content fallback below.
Caveats (still apply even via faststore cms-sync):
- Requires an up-to-date
@vtex/cli-plugin-content(cms-synccallsvtex contentunder the hood). Old versions (e.g.1.0.4) fail withFailed to fetch the base schema from the registry. Not Found. Fix:vtex plugins install @vtex/cli-plugin-content(verified on1.10.2). - The upload step is interactive: when prompted for the store ID, enter the value of
contentSource.projectindiscovery.config.js(NOT the hardcodedfaststore). The published schema id is{account}.{project}and the storefront reads exactly that id. - Content-type definitions belong in
cms/faststore/pages/.
Scope: this consolidated command covers Content Platform (CP) projects (output
cms/faststore/schema.json, detecting thecomponents+pagesdirectories). Thevtex content generate-schema/upload-schemapair below is the manual fallback for the same flow. On a project wherecontentSource.typeindiscovery.config.jsis absent or"CMS"(legacy Headless CMS),faststore cms-syncstill runs correctly (it takes a different internal path,vtex cms sync <project>), but produces noschema.jsonand the store-ID prompt won't matchcontentSource.project— none of the CP-specific steps above apply in that case.
CMS schema workflow — follow through in the same session
After every change to cms/faststore/components/*.jsonc or cms/faststore/pages/*.jsonc, complete this sequence before considering the task done:
-
Generate & validate (dry-run) — from the project root, run:
faststore cms-sync --dry-run # if the "faststore" binary is missing: npm install -g @faststore/cli # or use the project's local copy: yarn faststore cms-sync --dry-runThis generates
cms/faststore/schema.jsonwithout uploading. -
Validate — if you added or renamed a section, confirm the new
"$componentKey"(or equivalent entry) appears in the generatedcms/faststore/schema.json. If it is missing, fix the JSONC or registration insrc/components/index.tsxand regenerate — never patchschema.jsonmanually. -
Sync (recommended) — once validated, run without
--dry-runto upload:faststore cms-syncThe upload step is interactive (see step 4 for the store ID and a non-interactive fallback).
-
Manual fallback / non-interactive upload — if
faststore cms-syncis unavailable or you need to run the steps individually, generate and upload with the global VTEX CLI:vtex content generate-schema -o cms/faststore/schema.jsonThen upload. When prompted for the store ID, enter the value of
contentSource.projectfromdiscovery.config.js(the published schema id is{account}.{project}; NOT the hardcodedfaststore). To automate the prompts:# Derive the store ID from discovery.config.js (falls back to "faststore" for legacy Headless CMS) export STORE_ID=$(node -e "const c=require('./discovery.config.js'); console.log((c.contentSource&&c.contentSource.project)||'faststore')") # Single quotes keep Tcl from misreading $id and other $ tokens in CLI output; # $env(STORE_ID) is evaluated by the Tcl interpreter. expect -c ' spawn vtex content upload-schema cms/faststore/schema.json expect "store ID"; send "$env(STORE_ID)\r" expect -re "uploaded|confirm"; send "y\r" expect -re "Are you sure|confirm"; send "y\r" expect eof ' 2>&1 -
Report — state clearly whether upload succeeded. If the CLI prompts for login, store ID, or confirmation, paste the exact prompt or error and specify the human next step (e.g. run
vtex login, confirm the account matchesdiscovery.config.js→api.storeId) or point to the non-interactiveexpectexample in references/cms-schema-and-section-registration.md.
What upload does vs. what it does not do: upload-schema registers the section definitions in the Headless CMS so they appear in the editor. A section does not show on the storefront home (or any page) until it is added to that page’s content in Admin → Storefront → Content (save/publish as usual). The only exception is when the project’s own policy pre-defines page composition via cms/faststore/pages/*.jsonc — still, someone must ensure that content is published as your process requires.
Canonical commands (project root):
# Recommended (consolidated — runs generate-schema + upload-schema for you):
faststore cms-sync
# Manual fallback (two steps, global VTEX CLI):
vtex content generate-schema -o cms/faststore/schema.json
vtex content upload-schema cms/faststore/schema.json
Workflow
Follow this process for every request:
- Understand the Problem — Identify the user's goal, constraints, and missing information
- Analyze — Determine the root problem and consider approaches
- Decide — Choose the best approach following FastStore framework possibilities
- Provide — Code + explanation (if needed) + alternatives (optional)
- Review — After finishing, verify:
- No code produced inside
.faststore/folder - Code composed of
@faststore/componentsatoms and molecules - If CMS JSONC or pages JSONC changed:
faststore cms-sync(or the manualgenerate-schema+upload-schemafallback) was run,schema.jsonwas validated (new$componentKeywhen applicable), the upload was attempted in-session, and the outcome (success or exact CLI prompt/error + next step) was reported - For new CMS sections: it is clear that Admin → Storefront → Content (or project
pagesJSONC policy) is still required for the section to appear on a live page
- No code produced inside
Response Format
When appropriate, structure responses as:
Problem Understanding Short summary of what the user needs.
Solution Code or steps.
Explanation Why this solution works.
Optional Improvements Better patterns, optimizations, etc.
Reference Files
Load these on demand based on what the task requires. Do not load all of them upfront.
| File | Load when… |
|---|---|
| references/project-structure-routes-and-config.md | Mapping the repo: what belongs in src/ vs generated .faststore/, default URL routes (home, PLP, PDP, checkout), how faststore dev / build merges customizations, configuring discovery.config.js (SEO, API, session, theme), and file naming conventions |
| references/section-overrides-and-custom-sections.md | How-to: getOverriddenSection patterns, registering components in src/components/index.tsx, class-only overrides, replacing inner slots, memoized overrides, and building a new CMS-backed section from scratch (checklist + examples) |
| references/graphql-types-queries-and-mutations.md | Read-only API catalog: built-in root Query / Mutation fields, enums (e.g. StoreSort), and field lists for types like StoreProduct, StoreCart, StoreSession — use when writing queries or checking what the platform already exposes (not for adding custom resolvers) |
| references/extending-graphql-with-custom-resolvers.md | Implementation guide: adding fields under src/graphql/vtex/ or new operations under src/graphql/thirdParty/, wiring resolvers, Server* / Client* fragments, and consuming data with usePDP / useQuery / useLazyQuery |
| references/scss-styling-and-design-tokens.md | SCSS module rules (wrapper class, no global SCSS), theming and CSS variables in src/themes/custom-theme.scss, and styling overrides that target inner UI structure |
| references/cms-schema-and-section-registration.md | VTEX CMS: cms_component__*.jsonc + index.tsx as source of truth, generated schema.json, recommended faststore cms-sync (with the manual vtex content fallback), store ID = contentSource.project, Admin → Content vs pages JSONC, scopes, CMS props only (no ad-hoc props) |
| references/analytics-events-and-gtm.md | @faststore/sdk analytics: sendAnalyticsEvent, useAnalyticsEvent / handler components, and setting gtmContainerId in discovery.config.js |
| references/injecting-head-scripts-and-meta-tags.md | Custom <head> content via src/scripts/ThirdPartyScripts.tsx (verification meta tags, inline scripts, Partytown) — not the primary place for GTM; use discovery.config.js (see analytics reference) |
| references/native-sections-and-overridable-slots.md | Lookup only: list of built-in global sections (e.g. Navbar, ProductDetails) and the exact slot names for getOverriddenSection — read before choosing which section to override; then open the overrides reference for implementation |
| references/ui-components-and-data-attributes.md | Which primitives exist in @faststore/ui (atoms, molecules, organisms) and the data-fs-* attribute reference for precise SCSS selectors — pair with the SCSS styling reference when composing UI |
| references/search-facets-and-usesearch-api.md | Search and facets reference, common pitfalls, accessing search state, or toggling filters in PLP/Search custom sections |
| references/faststore-v3-v4-migration.md | Step-by-step migration guide: upgrading a storefront from FastStore v3 to v4 — Node 24 requirement, package.json changes, discovery.config.js plain-config rule, SCSS @import → @use/@forward migration, GraphQL import migration, v3 patch assessment, verification, and post-migration CMS sync (Headless CMS and Content Platform cases) |
FAQ
What does the faststore-storefront skill do?
Core coding rules and workflow for developing VTEX FastStore storefronts. Use when starting any FastStore development task, writing TypeScript/React components, creating section overrides, extending the BFF, or styling. Covers all primary conventions, safety rules, and the development workflow used across every FastStore project.
How do I install faststore-storefront?
Run npx skills add https://github.com/vtex/skills --skill faststore-storefront in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/faststore-storefront/ (personal) or .claude/skills/faststore-storefront/ (project).
Which AI agents can use faststore-storefront?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is faststore-storefront safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains faststore-storefront?
It is published by vtex in vtex/skills. It has 1,100 recorded installs.
More from vtex/skills
vtex-io-react-apps
vtex/skills
Apply when building React components under react/ or configuring store blocks in store/ for VTEX IO apps. Covers interfaces.json, contentSchemas.json for Site Editor, VTEX Styleguide for admin apps, and css-handles for storefront styling. Use for creating custom storefront components, admin panels, pixel apps, or any frontend development within the VTEX IO react builder ecosystem.
vtex-io-service-apps
vtex/skills
Apply when building backend service apps under node/ in a VTEX IO project or configuring service.json routes. Covers the Service class, middleware functions, ctx.clients pattern, JanusClient, ExternalClient, MasterDataClient, and IOClients registration. Use for implementing backend APIs, event handlers, or integrations that must use @vtex/api clients instead of raw HTTP libraries.
vtex-io-masterdata
vtex/skills
Apply when working with MasterData v2 entities, schemas, or MasterDataClient in VTEX IO apps, or when anyone designing or implementing a solution must scrutinize whether Master Data is the correct storage. The skill prompts hard questions: native Catalog or other VTEX stores, OMS, or an external database may be better; do not default to MD because it is convenient. Covers JSON Schema, CRUD, triggers, search and scroll, schema lifecycle, purchase-path avoidance, single source of truth, and BFF handoffs. Use for justified custom persistence while avoiding the 60-schema limit.
vtex-io-graphql-api
vtex/skills
Apply when working with GraphQL schema files in graphql/ or implementing resolvers in node/resolvers/ for VTEX IO apps. Covers schema.graphql definitions, @cacheControl and @auth directives, custom type definitions, and resolver registration in the Service class. Use for exposing data through GraphQL queries and mutations with proper cache control and authentication enforcement.
vtex-io-storefront-react
vtex/skills
Apply when building VTEX IO storefront components under react/ for Store Framework experiences. Covers storefront component structure, css-handles, storefront context hooks, browser-safe data fetching, and how components should behave when used as theme blocks. Use for custom storefront UI, product widgets, banners, forms, or reviewing shopper-facing React code in VTEX IO apps.
vtex-io-app-settings
vtex/skills
Apply when defining, validating, or consuming VTEX IO app settings. Covers settingsSchema, app-level configuration boundaries, and how backend or frontend code should depend on settings safely. Use for merchant-configurable behavior, settings forms, or reviewing whether settings belong in app configuration rather than hardcoded logic or custom data entities.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。