Brand Skill
One-time personalization: replace template tokens (mysite, My Site, my-site) with your project's name throughout the codebase.
Usage
/brand
No subcommands — just run /brand and follow the prompts.
Conversation Flow
Step 1: Ask for the project name
Ask the user for their project's display name (e.g., "Acme Dashboard").
Step 2: Derive variants
From the display name, derive two other variants:
- •kebab: lowercase, spaces → hyphens (e.g.,
acme-dashboard) — replacesmy-site - •infra: lowercase, strip all non-alphanumeric characters (e.g.,
acmedashboard) — replacesmysite
Step 3: Confirm with the user
Show all three values and the list of files that will be modified. Let the user confirm or override any value.
Display: Acme Dashboard Kebab: acme-dashboard Infra: acmedashboard Files that will be modified: - .env.example - .env (if exists) - docker-compose.yml - backend/pyproject.toml - backend/app/core/config.py - backend/app/main.py - frontend/package.json - frontend/app/layout.tsx - frontend/app/page.tsx - CLAUDE.md - .github/workflows/build_and_deploy_prod.yml
Step 4: Check git status
Run git status --short and warn if the working tree is dirty. Recommend committing or stashing first, but let the user proceed if they choose.
Step 5: Execute replacements
Order matters — replace most-specific tokens first to avoid partial-match corruption (my-site contains parts of mysite):
| Pass | Old token | New token | Files |
|---|---|---|---|
| 1 | my-site | {kebab} | backend/pyproject.toml, frontend/package.json |
| 2 | My Site | {display} | CLAUDE.md, backend/pyproject.toml, backend/app/main.py, frontend/app/layout.tsx, frontend/app/page.tsx |
| 3 | mysite | {infra} | .env.example, .env (if exists), docker-compose.yml, backend/app/core/config.py, backend/app/main.py, CLAUDE.md, .github/workflows/build_and_deploy_prod.yml |
For each file in each pass, use the Read tool to read the file, then the Edit tool (with replace_all: true) to replace all occurrences of the old token with the new token. Skip files that don't contain the token.
Step 6: CLAUDE.md special changes
After the token replacements above, make these additional CLAUDE.md edits:
- •
Remove the "Forking This Template" section entirely (the
## Forking This Templateheading and all content up to the next##heading). This section describes the step the user just completed. - •
Update the Docker Services table container names — they will already be updated by the
mysite→{infra}replacement in pass 3, so just verify. - •
Update the psql command — it will already be updated by the
mysite→{infra}replacement, so just verify.
Step 7: Write brand.json
Write .claude/brand.json with the branding metadata:
{
"display": "<display name>",
"kebab": "<kebab name>",
"infra": "<infra name>",
"brandedFiles": [
".env.example",
"docker-compose.yml",
"backend/pyproject.toml",
"backend/app/core/config.py",
"backend/app/main.py",
"frontend/package.json",
"frontend/app/layout.tsx",
"frontend/app/page.tsx",
"CLAUDE.md",
".github/workflows/build_and_deploy_prod.yml"
]
}
Note: .env is intentionally excluded from brandedFiles since it's gitignored.
Step 8: Post-branding tasks
- •
Regenerate the backend lock file:
bashcd backend && uv lock 2>&1 | tail -n 5
- •
Handle .env:
- •If
.envdoesn't exist, copy from the updated.env.example - •If
.envexists, it was already updated in pass 3
- •If
Step 9: Report summary
Show a summary of what was done:
Branding complete! Display: Acme Dashboard Kebab: acme-dashboard Infra: acmedashboard Modified X files, wrote .claude/brand.json Regenerated backend/uv.lock Next steps: 1. Review the changes: git diff 2. Commit: git add -A && git commit -m "Brand as Acme Dashboard" 3. If you forked from the template, run /upstream to set up upstream tracking
Important Notes
- •This skill should only be run once. If
.claude/brand.jsonalready exists, warn the user and ask if they want to re-brand (which will replace the current branded tokens). - •Always read files before editing them.
- •Use
replace_all: trueon Edit calls to replace all occurrences in a file. - •Protect the context window — use
2>&1 | tail -n 5on lock file regeneration.