clarity-site

Add Microsoft Clarity monitoring to Hugo documentation sites via head partials.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/garrardkitchen/skills --skill clarity-site
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clarity-site
Source: https://github.com/garrardkitchen/skills/tree/main/clarity-site
Command: npx skills add https://github.com/garrardkitchen/skills --skill clarity-site

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Microsoft Clarity provides free user behavior analytics for Hugo documentation sites, enabling you to observe how visitors interact with docs pages and identify areas for improvement without heavy analytics setup.

Core Features & Use Cases

  • Clarity integration: Injects a production-guarded Clarity snippet into both the landing page head and the docs head partials.
  • Compatibility: Works with Hugo sites using the Lotus Docs theme or other themes with a separate docs/head partial.
  • Use Case: A documentation site owner wants to understand user navigation and engagement to optimize content and layout.

Quick Start

Provide your Clarity script tag (including the project ID) and I will apply the snippet to both landing and docs head partials as described.

Frequently Asked Questions about clarity-site

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Microsoft Clarity analytics to a Hugo documentation site?

Adding Microsoft Clarity to a Hugo documentation site requires injecting a production-guarded Clarity snippet into the landing page head and a separate docs head partial using your Clarity project ID.

Can I use Clarity analytics with the Lotus Docs Hugo theme?

Yes, Clarity analytics works with Hugo sites using the Lotus Docs theme. The integration patches the correct head partial overrides to inject the production-guarded script using your Clarity project ID.

What do I need to integrate Clarity into Hugo head partials?

To integrate Clarity into Hugo head partials, you need your Clarity project ID and a Hugo setup using a separate docs head partial. You must identify the site root and docs path to patch both layouts.

How does the Clarity snippet stay out of my staging or local Hugo environment?

The Clarity snippet is production-guarded when injected into Hugo head partials, ensuring the analytics script only loads and tracks user navigation in the production environment.

What is the best way to track user behavior on Hugo docs without heavy analytics setup?

Using Microsoft Clarity provides free user behavior analytics for Hugo documentation sites, enabling you to observe visitor navigation and optimize content layout without heavy analytics setup.