This skill should be used when the user asks to "add SEO", "add meta tags", "add robots.txt", "add sitemap", "improve SEO", "search engine optimization", "add open graph tags", "add favicon", "make site searchable", or wants to add SEO essentials (robots.txt, sitemap.xml, meta tags) to their Power Pages code site after creating it with /power-pages:create-site.
Install with Tessl CLI
npx tessl i github:microsoft/power-platform-skills --skill add-seo85
Quality
83%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Add essential SEO assets to a Power Pages code site: robots.txt, sitemap.xml, and meta tags.
Prerequisite: This skill expects an existing Power Pages code site created via
/power-pages:create-site. Run that skill first if the site does not exist yet.
robots.txt and sitemap.xml before any other SEO work matters.Initial request: $ARGUMENTS
Goal: Confirm a Power Pages code site exists and understand its structure.
Look for powerpages.config.json in the current directory or immediate subdirectories to find the project root.
# Check current directory and subdirectories
Get-ChildItem -Path . -Filter "powerpages.config.json" -Recurse -Depth 1If not found: Tell the user to create a site first with /power-pages:create-site.
Read powerpages.config.json to get the site name and config:
Get-Content "<PROJECT_ROOT>/powerpages.config.json" | ConvertFrom-JsonRead package.json to determine the framework and locate key files. See ${CLAUDE_PLUGIN_ROOT}/references/framework-conventions.md for the full framework → public directory → index HTML mapping and route discovery patterns.
Build a list of all routes (e.g., /, /about, /contact, /blog).
Goal: Collect all SEO preferences from the user before making any changes.
Use AskUserQuestion to collect SEO preferences:
| Question | Header | Options |
|---|---|---|
| What is the production URL for your site? (e.g., https://contoso.powerappsportals.com) | Site URL | (free text — use single generic option so user types via "Other") |
| Which pages should be excluded from search engine indexing? | Exclusions | None — index all pages (Recommended), Admin/auth pages only, Let me specify |
| Question | Header | Options |
|---|---|---|
| What meta description should appear in search results? | Description | (free text — use single generic option so user types via "Other") |
| Add Open Graph tags for social media sharing? | OG Tags | Yes — add Open Graph and Twitter Card tags (Recommended), No — skip social tags |
Goal: Present the full SEO plan to the user and get explicit approval before making changes.
Present the SEO additions that will be made as a clear, inline summary:
After presenting the plan, use AskUserQuestion to get approval:
| Question | Header | Options |
|---|---|---|
| Here is the SEO plan. How would you like to proceed? | SEO Plan Approval | Approve and proceed (Recommended), I'd like to make changes |
If the user chooses "I'd like to make changes", ask what they want to change, update the plan accordingly, and present the revised plan for approval again.
Goal: Create a valid robots.txt that tells search engines which pages to crawl.
Create robots.txt in the public directory (<PROJECT_ROOT>/public/robots.txt):
User-agent: *
Allow: /
Sitemap: <PRODUCTION_URL>/sitemap.xmlIf the user specified pages to exclude, add Disallow directives:
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /auth/
Sitemap: <PRODUCTION_URL>/sitemap.xmlpublic/robots.txt created with correct directivesGoal: Generate a complete sitemap.xml listing all discoverable routes with proper priorities.
Create sitemap.xml in the public directory (<PROJECT_ROOT>/public/sitemap.xml).
Generate entries for each discovered route using the production URL:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc><PRODUCTION_URL>/</loc>
<lastmod><TODAY_DATE></lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc><PRODUCTION_URL>/about</loc>
<lastmod><TODAY_DATE></lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<!-- Additional routes... -->
</urlset>Priority rules:
/): 1.00.80.6Exclusions: Do not include routes the user chose to exclude (e.g., /admin/*, /auth/*).
public/sitemap.xml created with all routes, correct URLs, and no placeholdersGoal: Add comprehensive meta tags, Open Graph tags, and a favicon to the site's HTML.
Add or update meta tags in the site's index.html (location depends on framework — see Phase 1.3):
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><SITE_TITLE></title>
<meta name="description" content="<META_DESCRIPTION>" />
<meta name="robots" content="index, follow" />
<link rel="canonical" href="<PRODUCTION_URL>/" />
<link rel="sitemap" type="application/xml" href="/sitemap.xml" />
</head>Add Open Graph and Twitter Card meta tags inside <head>:
<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:title" content="<SITE_TITLE>" />
<meta property="og:description" content="<META_DESCRIPTION>" />
<meta property="og:url" content="<PRODUCTION_URL>/" />
<meta property="og:site_name" content="<SITE_TITLE>" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="<SITE_TITLE>" />
<meta name="twitter:description" content="<META_DESCRIPTION>" />Check if a favicon already exists in the public directory. If not, add a simple SVG favicon link:
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />Create a minimal placeholder public/favicon.svg using the site's primary color:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="<PRIMARY_COLOR>"/>
<text x="50" y="70" font-size="50" text-anchor="middle" fill="white" font-family="system-ui, sans-serif" font-weight="bold"><FIRST_LETTER></text>
</svg>Where <FIRST_LETTER> is the first letter of the site name and <PRIMARY_COLOR> is the primary theme color from the site's configuration.
For Astro sites, meta tags should be added to the base layout component (e.g., src/layouts/Layout.astro) rather than a root index.html. Astro uses component-based <head> management.
index.html (or Astro layout equivalent)Goal: Confirm all SEO assets are in place, verify via Playwright, and commit changes.
Confirm the following files were created/updated:
public/robots.txtpublic/sitemap.xmlpublic/favicon.svg (if created)index.html or equivalent (meta tags added)If a dev server is running (or start one):
browser_snapshot to verify meta tags are present in the page source/robots.txt and verify it loads/sitemap.xml and verify it loadsReference:
${CLAUDE_PLUGIN_ROOT}/references/skill-tracking-reference.md
Follow the skill tracking instructions in the reference to record this skill's usage. Use --skillName "AddSeo".
CRITICAL — This step is MANDATORY. You MUST commit the SEO changes before finishing. Do NOT skip this step.
Stage the specific SEO files and commit:
git add public/robots.txt public/sitemap.xml public/favicon.svg index.html
git commit -m "Add SEO: robots.txt, sitemap.xml, meta tags, favicon"Adjust the file paths based on what was actually created (e.g., include src/layouts/Layout.astro instead of index.html for Astro sites, omit favicon.svg if it was not created). Only stage files that were created or modified by this skill.
Present a summary of what was added:
| Asset | Status | Details |
|---|---|---|
robots.txt | Created | Allows all crawlers, references sitemap |
sitemap.xml | Created | X URLs mapped with priorities |
| Meta tags | Added | title, description, viewport, canonical, robots |
| Open Graph | Added/Skipped | og:title, og:description, og:url, Twitter Card |
| Favicon | Created/Skipped | SVG favicon with site initial |
After the summary, suggest:
/power-pages:deploy-site/power-pages:setup-datamodelUse TaskCreate at the start to track each phase:
| Task | Description |
|---|---|
| Phase 1 | Verify site exists and detect framework |
| Phase 2 | Gather SEO configuration from user |
| Phase 3 | Present plan and get user approval |
| Phase 4 | Create robots.txt |
| Phase 5 | Generate sitemap.xml |
| Phase 6 | Add meta tags, Open Graph, and favicon |
| Phase 7 | Verify via Playwright and commit |
Update each task with TaskUpdate as it is completed.
powerpages.config.json is not found, stop and redirect the user to /power-pages:create-site.index.html.Begin with Phase 1: Verify Site Exists
8ccaae8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.