Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sfnext-site-audit

БесплатноБез исполняемых скриптовНе проверен

Run a pre-launch site audit of a Storefront Next storefront with `sfnext audit`: measure the deployed home, category (PLP) and product (PDP) pages with…

SalesforceCommerceCloudот SalesforceCommerceCloud★ 58 звёзд на GitHub

Об этом скилле

Storefront Next Site Audit

The audit is a CLI workflow that you drive. sfnext audit prepare collects the evidence and decides every rule that a script can decide. You (and your subagents) evaluate the remaining rules and write one small JSON file per rule. sfnext audit finalize validates your files and compiles the report. A local dashboard shows progress the whole time and serves the final report.

check prerequisites → find the pages → serve (background) → install + prepare (15–30 min)
  → evaluate AI rules in parallel batches → write summary.json → finalize → review with the user

A full audit of three pages takes about 30 minutes. Tell the user that before you start.

Ground rules

  • Don't edit the project during the audit. Dependency installation (step 3) and prepare run project scripts that can generate files outside build/. Inspect those scripts first; get the user's approval for those writes before running them. If build writes aren't approved, offer --no-build and disclose the bundle coverage gap. Don't fix findings during the audit; offer to fix them afterwards.
  • In the project, write only inside the audit workspace, <project>/.site-audit/ (command logs go in the system temp directory). Never commit the workspace: it holds measured page data.
  • Never record secrets: no cookies, authorization headers, tokens or response bodies in any file you write.
  • Run every command from the project root. All sfnext audit commands then default to the project and to .site-audit/, so the commands below need no -d or --workspace flags.
  • Use pnpm exec sfnext audit …, which runs the project's own SDK version.

1. Check prerequisites

  1. Storefront Next project. package.json lists @salesforce/storefront-next-dev. If it doesn't, stop and tell the user this skill only audits Storefront Next storefronts.

  2. SDK version. The sfnext audit commands ship in @salesforce/storefront-next-dev 1.5.0 and later. Check:

    pnpm exec sfnext audit prepare --help
    

    The five audit commands are prepare, serve, progress, finalize and catalog. They are intentionally hidden from the parent sfnext audit --help and top-level sfnext --help lists, so use prepare --help as the availability check. If it prints Command audit:prepare not found, or pnpm exec sfnext --version reports an older version, stop and tell the user the audit needs @salesforce/storefront-next-dev 1.5.0 or later. Upgrading changes package.json and the lockfile and can bring other SDK changes, so it is the user's decision: point them to docs/COMPATIBILITY.md in the project, and run an upgrade only if they ask you to. If node_modules is missing, run step 3's install first and check again.

  3. Workspace ignored and untracked by git. Run git check-ignore -q .site-audit and git ls-files -- .site-audit. If it isn't ignored (projects created before 1.5.0), stop and tell the user to add .site-audit/ to .gitignore; don't edit it yourself. If any workspace files are tracked, stop and ask the user to remove them from tracking without deleting their local copies. Recheck both conditions before collection.

2. Find the pages

The audit measures three pages of the deployed storefront over HTTPS: the home page (home), a category listing page (plp) and a product page (pdp). It doesn't measure a local dev server. Users usually give only the storefront's address. Treat that address as the home page and find the other two pages yourself. If the user does give a page URL, use it. If the user has no deployed storefront yet, stop: the audit needs one.

Check every URL you'll use with:

curl -sL -o /dev/null -w '%{http_code} %{url_effective}\n' <url>

Expect 200 and a final URL on the same host, and use that final URL in the audit: product links often redirect to their canonical address. A redirect to a login, password or maintenance page also returns 200, so look at the final URL too.

  1. Home. Check the address the user gave.

  2. PLP. List the home page's links, most repeated first. The navigation's category links are usually among them:

    curl -sL <home url> | grep -oE '<a [^>]*href="[^"#?]*"' | grep -oE 'href="[^"]*"$' | sort | uniq -c | sort -rn | head -40
    

    Skip links to other hosts, files, account, cart, search and content pages. Then try likely category links one at a time. A Storefront Next category page embeds its product list as structured data. This prints the number of products in it, or nothing if the page has none:

    curl -sL <candidate url> | sed -n 's/.*<script id="category-schema"[^>]*>\([^<]*\)<\/script>.*/\1/p' | jq '.mainEntity.numberOfItems'
    

    Use the first candidate that lists several products.

  3. PDP. Take an in-stock product from that category's list:

    curl -sL <plp url> | sed -n 's/.*<script id="category-schema"[^>]*>\([^<]*\)<\/sc
    
Полный SKILL.md на GitHub

Установить sfnext-site-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/trigger-evals.json

FAQ

Что делает скилл sfnext-site-audit?

Run a pre-launch site audit of a Storefront Next storefront with `sfnext audit`: measure the deployed home, category (PLP) and product (PDP) pages with Playhouse (Lighthouse), break down the JavaScript bundle, check performance, SEO, security and best-practice rules (scripts decide some, you evaluate the rest), and report launch readiness in a live local dashboard. Use when asked to "audit my storefront", "run a site audit", "pre-launch check", "go-live check", "launch readiness", or "is my storefront ready to launch". Needs `@salesforce/storefront-next-dev` 1.5.0 or later in the project.

Как установить скилл sfnext-site-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sfnext-site-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sfnext-site-audit с