11 KiB
Skill: Convert This Website Builder For A New Website
Human prompt to complete this skill:
Use this skill to convert a copied static website builder repo into a clean new website repo for a different domain, brand, content set, and deployment target.
Overview
This skill resets a copied website-builder repo so it can become a new static public website without carrying over stale content, generated artifacts, old domain URLs, old analytics IDs, old semantic JSON, old navigation, old logos, or old deployment assumptions.
The goal is not only to clean visible pages.
The goal is to clean:
- source content;
- Hugo builder config and templates;
- semantic discovery and JSON-LD generation;
- AI/discovery scripts;
- generated public artifacts;
- deployment notes;
- contact form notes;
- future process instructions.
This is important because a copied builder can look clean in /public/ while scripts and templates still regenerate the old website identity on the next build.
Required Inputs
Before executing, identify:
- new repo root path;
- new public domain;
- new site title and brand name;
- new publisher/organization name;
- new Google Analytics measurement ID, if any;
- new favicon/logo/social preview image paths;
- source content directory to preserve, usually
/content/; - image asset directory to preserve, usually
/public/assets/images/; - root verification files to preserve, such as
BingSiteAuth.xml; - whether contact form/API work is in scope now or explicitly deferred;
- deployment model, for example static-only VM, Caddy edge proxy, Docker, object storage, or CDN.
Preserve Rules
Preserve these unless the human explicitly says otherwise:
/content/authored source content;/public/assets/images/approved image assets;- root verification files such as
/public/BingSiteAuth.xml; /skills-scripts/scripts and skill docs, after rebranding/updating;/hugo-html-builder/layouts/templates, after rebranding/updating;/api/source code, if contact/API work exists;- README, changelog, task/workflow docs, after rebranding/updating.
Do not preserve generated artifacts just because they are currently in git. A copied repo often has generated output from the old site.
Cleanup Targets
Remove old generated and copied-site artifacts, after confirming paths resolve inside the repo:
/public/index.html;/public/robots.txt;/public/sitemap.xml;/public/llms.txt;/public/agents.md;/public/skills.md;/public/ai-index.json;- stale
/public/.well-known/poppy.json; regenerate it for the new domain; /public/data/;- old public section directories from the copied site;
/public/healthz/;/hugo-html-builder/public/;- stale
/hugo-html-builder/content/mirror content; - old copied-site archive content such as
_original/, unless the human wants to keep it as an unpublished archive.
Keep /public/assets/images/ and explicitly preserved verification files.
Conversion Steps
1. Inventory The Repo
List the top-level repo directories and files.
Inspect:
README.md;- update/task notes such as
UPDATES.md; /content/;/public/;/hugo-html-builder/hugo.toml;/hugo-html-builder/layouts/_default/baseof.html;/hugo-html-builder/layouts/partials/semantic-discovery.html;/skills-scripts/build_ai_index.py;/skills-scripts/build_discovery_files.py;/skills-scripts/sync_content_to_hugo.py;- contact form files, if present.
Search for old identity references:
rg -n "old-domain|Old Brand|old-logo|old analytics ID|old section slug" .
Use the actual old domain, old brand, old logo filenames, analytics IDs, and old section names.
2. Establish A Cleanup Boundary
Write down what will be preserved and what will be removed before deleting anything.
Treat generated output as disposable.
Treat authored source content and approved assets as source of truth.
When deleting recursively, verify resolved absolute target paths are inside the repo root.
3. Clean Generated Output
Remove stale output and semantic data from /public/, while preserving approved assets and verification files.
Remove Hugo generated output and stale Hugo content mirror:
/hugo-html-builder/public/;/hugo-html-builder/content/.
Do not remove Hugo layouts, static assets, config, or scripts.
4. Rebrand Hugo
Update hugo-html-builder/hugo.toml:
baseURL;title;- language settings if needed;
- URL mode if needed.
Update hugo-html-builder/layouts/_default/baseof.html:
<title>behavior;- meta description behavior;
- canonical link;
- Open Graph metadata;
- Twitter/X preview metadata;
- favicon and apple-touch-icon;
- social preview image;
- analytics script and measurement ID;
- logo image and alt text;
- nav links;
- footer copyright;
- contact form JS inclusion if needed.
Use one page <h1> in source content; use template/nav for repeated header/footer UI.
5. Rebrand Semantic Discovery
Update hugo-html-builder/layouts/partials/semantic-discovery.html:
- site URL assumptions;
- organization name;
- publisher/author identity if needed;
- page type rules;
- artifact path rules;
- license and usageInfo URLs;
- JSON-LD nodes.
Avoid hardcoding one old content section such as community-summaries unless the new site actually has that section.
Generic artifact path pattern:
- home page:
/data/open/pages/home; - normal page:
/data/open/pages/{section}/{slug}; - root normal page:
/data/open/pages/{slug}.
6. Update Build Scripts
Update skills-scripts/build_ai_index.py:
SITE_URL;PUBLISHER;ORGANIZATION;LICENSE_URL;USAGE_INFO_URL;- title and description of the index;
- route rules for content pages;
- any old section-specific assumptions;
- any external resource helpers that mention the old brand.
Update skills-scripts/build_discovery_files.py:
SITE_URL;SITE_TITLE;PUBLISHER;- security contact;
- sitemap collection rules;
- robots sitemap URL;
- llms.txt summary;
- agents.md entry points;
- skills.md title;
.well-knownoutputs if used.
Recommended .well-known files:
/public/.well-known/security.txt;/public/.well-known/agent-card.json;/public/.well-known/poppy.json(draft 0.1 ordinary-web discovery; seedocs/poppy.md);- optionally
/public/.well-known/agent-skills.json.
Update skills-scripts/sync_content_to_hugo.py:
- generated section indexes;
- contact form injection;
- healthz page;
- URL special cases;
- old section assumptions.
7. Update Workflow Docs And Skills
Update:
README.md;- skill files in
/skills-scripts/; - deployment docs;
- contact form docs;
- any task/workflow notes that future agents will follow.
Replace old:
- domains;
- paths;
- usageInfo URLs;
- sitemap examples;
- section-index examples;
- deployment server names;
- Docker/Caddy assumptions;
- analytics IDs;
- brand names.
Keep parent-platform references only when they are intentionally part of the new site’s legal or explanatory content.
8. Structure Source Content
For every active authored markdown page in /content/, add or repair:
- YAML front matter;
document_id;title;date;slug;summary;tags;author;document_type;status;- semantic chunk markers.
Use chunk markers:
<!-- CHUNK START
chunk_id="chk-UUID"
knowledge_id="kid-UUID"
chunk_label="human-readable-label"
knowledge_label="human-readable-knowledge-label"
-->
[content]
<!-- CHUNK END -->
Preserve author meaning and voice.
Do not publish layout notes such as "Page header", "Horizontal line", "Page footer", or logo filenames as visible page content if the template owns those elements.
Normalize headings:
- one page
<h1>; - major sections as
##; - subsections as
###.
9. Privacy, SEO, Security, And Agent Readiness
Fold in these baseline website-readiness items:
- canonical URLs;
- Open Graph metadata;
- Twitter/X metadata;
- privacy policy;
- analytics/cookie disclosure or consent plan;
/.well-known/security.txt;- optional agent card/agent skills files;
- deploy-level security header docs;
- cache-control and compression docs;
- no-cache health check route;
- sitemap with
lastmod,changefreq, andpriority; - visible mojibake cleanup.
Security headers are usually deployed at the hosting/proxy layer:
- Content-Security-Policy;
- Strict-Transport-Security;
- X-Content-Type-Options;
- Referrer-Policy;
- Permissions-Policy;
- frame-ancestors through CSP.
10. Local Verification
Run script syntax checks:
python -m py_compile skills-scripts/sync_content_to_hugo.py skills-scripts/build_ai_index.py skills-scripts/build_discovery_files.py skills-scripts/publish_hugo_output.py
Run content sync:
python skills-scripts/sync_content_to_hugo.py
Run Hugo if available:
cd hugo-html-builder
hugo --cleanDestinationDir
Then scan:
rg -n "old-domain|old-brand|old-logo|old analytics ID|mojibake-patterns" .
Check:
- Poppy organization name/domain match the new SITE_TITLE/SITE_URL and advertise only ordinary website access;
- no old domain in generated HTML/JSON/discovery files;
- no old logo references;
- no old analytics ID;
- no stale section paths;
- no visible mojibake;
public/preserves only intended pre-build files before the final build;BingSiteAuth.xmlor equivalent verification files are unchanged;- Hugo content mirror matches source content;
- scripts compile.
Contact Form Handling
If the copied builder includes a contact form, handle it after static-site conversion unless the human explicitly asks to do it now.
Check:
- frontend form action;
- JavaScript fetch path;
- API source;
- requirements file;
- environment variables;
- SMTP provider;
- captcha/anti-spam plan;
- deployment route from proxy to internal API port.
Do not treat a copied virtual environment as source of truth. Rebuild dependencies from a requirements file for deployment.
Deployment Notes
Adjust deployment docs to the actual hosting model.
For a static-only Ubuntu VM with edge Caddy elsewhere:
- repo/build path might be
/srv/apps/{site-name}; - published web root might be
/srv/www/{domain}or repo/public/; - Caddyfile is managed on the edge server;
- contact API can run later on an internal port with a systemd service;
- edge Caddy routes the hostname and
/api/contact*when ready.
Do not leave copied Docker instructions unless Docker is truly part of the new deployment.
Completion Criteria
The conversion is complete when:
- old generated content has been removed;
- preserved files remain intact;
- source content has front matter and chunk markers;
- templates and scripts use the new domain and brand;
- process docs describe the new site and deployment model;
- no stale old-domain references remain except intentional parent-platform/legal references;
- sync script runs;
- Python scripts compile;
- Hugo build is either successful or clearly blocked by missing local Hugo installation.
Final Response Template
Report:
- what was cleaned;
- what was preserved;
- what was rebranded;
- what source content was structured;
- what scripts/docs were updated;
- what verification passed;
- what could not be verified;
- any intentional old-brand references left in legal/parent-platform context.