webiny-project-structure
What it does
Explains the folder layout of a Webiny project and the role of its main config file. It is for developers who are new to Webiny and need to know where to put their code.
When to use it
- βWhen a developer asks where custom code should go in a Webiny project.
- βWhen a developer wants to know what the webiny.config.tsx file does.
- βWhen a developer needs to register a new extension in a Webiny project.
Skill link
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/project-structure/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWhere should I put my custom code in my Webiny project?β
5 new skills a week. 1 minute to read.
How it works
The skill explains the main folders and the config file, where all extensions are registered. The AI uses this to place new code in the right spot.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Webiny Project Structure
TL;DR
A Webiny project has a flat structure centered around webiny.config.tsx -- the single configuration file where all extensions are registered. Custom code lives in the extensions/ folder. Extensions are registered as React components (<Api.Extension>, <Admin.Extension>, <Infra.*>, <Cli.Command>) and can be conditionally loaded per environment.
Project Layout
my-webiny-project/
βββ extensions/ # All custom code -- API, Admin, Infra, CLI extensions
β βββ README.md
βββ public/ # Static assets for the Admin app
β βββ favicon.ico
β βββ global.css
β βββ index.html
β βββ robots.txt
βββ package.json # Single package.json for the whole project
βββ tsconfig.json # Single TypeScript config
βββ webiny.config.tsx # Main configuration -- all extensions registered here
βββ webiny-env.d.ts # TypeScript environment types
βββ yarn.lock
Key points:
- Single
package.json-- no monorepo, no workspaces needed. - Single
tsconfig.json-- straightforward TypeScript setup. webiny.config.tsx-- the entry point for everything. All extensions, infrastructure options, and project settings are declared here.extensions/-- where all your custom code lives. Organize with subfolders as needed (e.g.,extensions/contactSubmission/,extensions/AdminBranding/).
The webiny.config.tsx File
This file exports a single React component called Extensions. It uses JSX to declaratively register all configuration:
// webiny.config.tsx
import React from "react";
import { Admin, Api, Cli, Infra, Project, Security } from "webiny/extensions";
import { Cognito } from "@webiny/cognito";
export const Extensions = () => {
return (
<>
{/* Infrastructure configuration */}
<Infra.Aws.DefaultRegion name={"us-east-1"} />
<Infra.Core.OpenSearch enabled={true} />
<Infra.Aws.Tags tags={{ OWNER: "me", PROJECT: "my-project" }} />
{/* Identity provider */}
<Cognito />
{/* API extensions (backend) */}
<Api.Extension src={"/extensions/ProductCategoryModel.ts"} />
<Api.Extension src={"/extensions/ProductModel.ts"} />
<Api.Extension src={"/extensions/contactSubmission/ContactSubmissionHook.ts"} />
{/* Security hooks */}
<Api.Extension src={"/extensions/MyApiKey.ts"} />
<Security.ApiKey.AfterUpdate src={"/extensions/MyApiKeyAfterUpdate.ts"} />
{/* Admin extensions (frontend) */}
<Admin.Extension src={"/extensions/AdminTheme/AdminTheme.tsx"} />
<Admin.Extension src={"/extensions/AdminTitleLogo/AdminTitleLogo.tsx"} />
<Admin.Extension src={"/extensions/contactSubmission/EmailEntryListColumn.tsx"} />
{/* Infrastructure / Pulumi extensions */}
<Infra.Core.Pulumi src={"/extensions/MyCorePulumiHandler.ts"} />
{/* CLI extensions */}
<Cli.Command src={"/extensions/MyCustomCommand.ts"} />
{/* Project settings */}
<Project.Telemetry enabled={false} />
</>
);
};
Extension Types
| JSX Element | What It Does | File Type |
|---|---|---|
<Api.Extension src="..." /> |
Registers a backend extension (GraphQL schemas, content models, lifecycle hooks) | .ts |
<Admin.Extension src="..." /> |
Registers a frontend Admin UI extension (themes, branding, custom columns, custom forms) | .tsx |
<Infra.Core.Pulumi src="..." /> |
Registers a Pulumi infrastructure handler | .ts |
<Cli.Command src="..." /> |
Registers a custom CLI command | .ts |
<Security.ApiKey.AfterUpdate src="..." /> |
Registers a security lifecycle hook | .ts |
YOU MUST include the full file path with the .ts or .tsx extension in every src prop. For example, use src={"/extensions/MyModel.ts"}, NOT src={"/extensions/MyModel"}. Omitting the file extension will cause a build failure.
YOU MUST use export default for the createImplementation() call when the file is targeted directly by an Extensio
FAQ
What is the extensions folder for?
It holds custom code for the API, admin, infrastructure and command-line parts of a project.
Does a Webiny project use several package files?
No. The skill says a project has one package.json and one tsconfig.json, with no monorepo setup.
What kinds of extensions are registered?
The skill lists API, admin, infrastructure and command-line extensions, which are added as components in the config file.
Details
Original description by the author
Webiny project layout, webiny.config.tsx anatomy, and extension registration. Use this skill when the developer asks about folder structure, where custom code goes, how to register extensions, what webiny.config.tsx does, or how the project is organized. Also use when they need to understand the relationship between extensions/, webiny.config.tsx, and the different extension types (Api, Admin, Infra, CLI).
repo: webiny/webiny-js
Popularity
- GitHub stars
- 8.1k
- Ranking position
- #12616
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
prd-to-plan
8.1kHelps your agent turn a product requirements document into a phased plan of small end-to-end slices, saved as a Markdown file.
webiny-admin-architect
8.1kTeaches your agent how to build admin screens for the Webiny platform, using its business logic layers and presenter pattern.
webiny-admin-permissions
8.1kTeaches your agent to add permission controls to Webiny admin screens, including auto-generated permission forms and hide-or-show checks.
webiny-form-model
8.1kTeaches your agent to build forms in Webiny using a declarative field builder, layouts, validation and conditional rules.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.