AI Store Development
How I Use Claude to Build Shopify Sections: My Exact GitHub Process
Learn how to connect Claude Cowork directly to a local Shopify theme repository on GitHub using fine-grained tokens—allowing Claude to write, revise, and push section files directly into your theme.
·
- Claude Cowork (Claude Pro+)
- GitHub Desktop
- GitHub Repository
- Fine-Grained Personal Access Token
- Shopify Theme Customizer
What it does
Prompting AI to generate a custom Shopify section is a great starting point, but transferring that code into production has traditionally been a bottleneck. There are three core ways to approach AI section creation: 1. **Shopify’s Built-in AI Generator**: Inside the theme customizer, clicking "Add section -> Generate" offers a fast starting point. However, when you want deep control over code structure, complex schema options, or custom JavaScript behaviors, the built-in generator quickly feels limiting. 2. **Copying Code from Claude into Shopify**: The standard habit is prompting Claude in a web chat, copying the generated Liquid code, navigating to Shopify admin > Edit code, creating a `.liquid` file inside the `sections` folder, and pasting the text manually. While effective initially, every small design iteration or syntax revision forces you to repeat this tedious copy-find-paste-save loop. 3. **Connecting Claude to the Theme via GitHub (The Upgrade)**: By placing a downloaded Shopify theme into a private GitHub repository and linking that local project folder to Claude Cowork, you bridge the gap entirely. Claude gains direct filesystem access to write `.liquid` files and run Git commands autonomously—pushing new sections right to your repository so they appear natively inside Shopify’s theme customizer. Credit to WebExp for originally demonstrating this seamless GitHub and Claude Cowork integration approach.
How it works
1. Local Theme & Private Git Repository Architecture
You download your live or staging Shopify theme (`assets/`, `blocks/`, `sections/`, `snippets/`, etc.), place the files in a clean local folder (e.g., `~/Documents/themes/`), and publish them as a private GitHub repository using GitHub Desktop.
2. Fine-Grained Token Authentication
Instead of exposing broad account credentials, you generate a highly restricted GitHub fine-grained personal access token locked specifically to your single theme repository with `Read and write` access on `Contents`.
3. Direct Code Generation & Automated Git Pushes
Inside a Claude Cowork project pointed to your local theme directory, you bind the authenticated remote URL (`git remote set-url origin TOKEN@github.com/USER/REPO.git`). Claude writes `.liquid` section files locally, commits the changes, and pushes directly to origin so your Shopify theme customizer updates immediately.
What you need
- A Claude Pro plan or higher (since Claude Cowork desktop access is required to interact with local directories and run git commands)
- GitHub Desktop installed on your local machine to easily initialize, track, and publish your theme repository
- A downloaded Shopify theme archive (.zip) from your store admin containing folders like `sections`, `snippets`, and `config`
- A GitHub account to host your private theme code repository securely
Setup walkthrough
1. Download Your Shopify Theme Locally
Open your Shopify admin, navigate to Online Store > Themes, click the three dots next to the theme you want to work on, and select "Download theme file". Unzip the archive sent by email and place the folder somewhere organized on your computer (for example, inside a `~/Documents/themes/` folder). Confirm you see directories like `assets`, `sections`, and `config`.
2. Create & Publish a Private GitHub Repository
Open GitHub Desktop, click Add > Add Existing Repository, and choose your local theme folder. When prompted, select the option to create a new repository (no need to re-initialize since your theme files are already present). Publish the repository to GitHub, making sure to keep the repository option checked as PRIVATE so your store source code remains secure.
3. Generate a Scoped Fine-Grained GitHub Token
Log into GitHub in your browser, open Settings > Developer settings > Personal access tokens > Fine-grained tokens, and click "Generate new token". Name it after your theme, set an expiration date, restrict repository access strictly to your newly published theme repo, and under Repository permissions, set "Contents" to "Read and write". Click Generate and copy the token immediately.

4. Initialize a Claude Cowork Project for Your Theme
Open the Claude desktop application, go to the Cowork tab, open Projects, and click "Create a new project". Name the project after your theme and select your local theme directory as the project root folder so Claude has full visibility over all theme files.
5. Connect the Local Project Remote to GitHub
In your Claude Cowork project chat, instruct Claude to set the authenticated remote URL by providing the command: `git remote set-url origin YOUR_GITHUB_TOKEN@github.com/YOUR_USERNAME/YOUR_REPOSITORY.git` (replacing your token, username, and private repository name). Note: use `.gitignore` best practices and avoid storing raw tokens inside tracked codebase files.
6. Prompt Claude to Build & Push a New Section
With the Git connection established, give Claude a natural language prompt: "Create a simple call to action section that says 'We created this with Claude' and push it to the main theme in GitHub." Claude will create `sections/claude-cta.liquid` locally, stage the file, create a commit, and push directly to your remote `main` branch.
7. Find and Customize the New Section in Shopify
Return to the Shopify theme attached to your repository and open the Theme Customizer. Click "Add section", search for your newly created section (`Claude CTA`), and place it on your page. Verify that the heading and button render correctly and that all options appear cleanly in the right-hand editor panel.

Example workflow
Repository Initialization & Token Scoping
An agency developer downloads a client’s Dawn-based staging theme to `~/themes/staging-store`, publishes it as a private repo in GitHub Desktop, and creates a fine-grained GitHub access token scoped exclusively to that single repository with `Contents: Read and write`.
Cowork Project Binding & Authentication
The developer creates a Claude Cowork project targeting `~/themes/staging-store` and enters the `git remote set-url origin TOKEN@github.com/...` command to grant Claude push capabilities.
Autonomous Section Generation & Push
The developer prompts: "Create a responsive customer testimonial grid (`sections/testimonial-grid.liquid`) with 3 review cards, star ratings, and editable schema text, then push to main." Claude generates the complete file, commits, and pushes to origin in seconds.
Instant Theme Customizer Verification
Opening Shopify Online Store > Theme Customizer, the developer clicks "Add section", selects `Testimonial Grid`, and adjusts card backgrounds right inside the sidebar—without ever opening Shopify’s code editor or copying a single line of text.
What you get
- Total elimination of the tedious copy-find-paste-save loop inside Shopify’s manual web code editor
- Direct, automated delivery of complex `.liquid` section files straight from your AI prompt into your GitHub repository
- Enhanced version control and auditability—every AI-generated section is tracked with clean Git commits
- Fine-grained security isolation ensuring your AI assistant only pushes code to explicitly authorized, private theme repositories
- Massive time savings for freelancers and agencies iterating on multi-section Shopify theme custom builds daily
Tips
- Always generate a separate fine-grained GitHub access token for every individual repository rather than using broad personal tokens; this keeps security scopes tightly contained.
- When testing experimental or highly complex sections, ask Claude to create and push to a separate development git branch (e.g., `git checkout -b feature-ai-sections`) before merging into `main`.
- If you need to revise an existing section, simply tell Claude: "Update `sections/claude-cta.liquid` to include a customizable background color picker in the schema, and push the update to main."
- Keep GitHub Desktop open alongside Claude Cowork so you can instantly verify commit histories and track exactly which files Claude added or modified.
Frequently asked questions
Want this installed on your store?
We handle skill setup, MCP connectors, Shopify app scopes, and brand context — so you can publish SEO blogs from Claude without the technical overhead.
Book a free setup callMore Claude scripts
Content & SEO
Blog Publisher — Organic Traffic on Autopilot
A full blog publishing pipeline: keyword research, AI-optimized outlines, image generation, and draft publishing to Shopify — all from Claude Desktop.
Read more →Content & SEO
How to Use Claude Code AI for Shopify Product Descriptions
Step-by-step guide for Shopify merchants: install the Shopify AI Toolkit in Claude Code, connect your store, optimize product titles and descriptions for Google SEO, add metafields for LLMs, create smart collections, and support rankings with blog internal links.
Read more →
Free Shopify Store Audit
Find what is holding your Shopify store back
Get a practical audit covering SEO, speed, conversion issues, and visible app friction—with clear recommendations you can act on.
Get your free Shopify store audit