> ## Documentation Index
> Fetch the complete documentation index at: https://cj-teaches.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Check your docs against a style guide

> Use Claude to check your docs against a style guide. Index the HashiCorp style guide into Grounded Docs, install two skills, and catch every style violation.

Using a style guide for your documents and tutorials keeps your content consistent and easier for your users to follow.
When you manually check your content against a style guide, you might catch some issues but miss others.

This tutorial shows you how to give Claude a style guide so its feedback is grounded in actual rules, not general writing preferences.

You index the HashiCorp style guide into Grounded Docs, a local documentation indexer, and install two skills that know how to run checks against it.
Then you run a check on a document with intentional violations and have Claude identify every violation,
explain the rule it breaks, and suggest a fix.

## When to use each skill

In this tutorial, you will install two skills. The following is a quick reference for when to use each one:

| Skill                | When to use                                                            |
| -------------------- | ---------------------------------------------------------------------- |
| `/quick-style-guide` | Fast pass while writing content. Catches common violations in seconds. |
| `/full-style-guide`  | In-depth review. Takes longer and uses more tokens.                    |

## Prerequisites

Before starting, complete the following setup:

<Card title="Set up Grounded Docs" icon="database" href="/guides/setup-grounded-docs">
  Grounded Docs must be installed and the Claude skills must be in place.
</Card>

## Set up the tutorial file

<Steps>
  <Step title="Create a working directory">
    In your terminal, create a directory for this tutorial and download the demo document:

    ```shell-session theme={null}
    mkdir -p style-guide-tutorial
    cd style-guide-tutorial
    curl -O https://raw.githubusercontent.com/cjobermaier/public-resources/main/style-guide/test-style-guide.md
    ```

    Open `test-style-guide.md` in your editor to skim the seeded violations before you let Claude check it.
  </Step>

  <Step title="Launch Claude Code from this directory">
    The `cd style-guide-tutorial` command placed you in `style-guide-tutorial/`. Later commands reference `test-style-guide.md` as a relative path, so Claude must be running from this directory.

    Start Claude Code:

    ```shell-session theme={null}
    claude
    ```
  </Step>
</Steps>

## Index the style guides

The HashiCorp style guide ships in two forms: a full reference with detailed rationale and examples,
and a machine-optimized quick reference with rules tagged by priority and fix type.

You index both so you can use whichever is appropriate for the task. The quick reference is best for fast checks, and is cheaper
for Claude to run. The full guide is for in-depth reviews, takes longer, and costs more than the quick guide.

<Steps>
  <Step title="Index both style guide versions">
    Run the following command to index both documents:

    ```plaintext theme={null}
    /docs-manage Index the following style guide documentation:
    - https://raw.githubusercontent.com/cjobermaier/public-resources/main/style-guide/style-guide.md --library full-style-guide
    - https://raw.githubusercontent.com/cjobermaier/public-resources/main/style-guide/style-guide-quick-reference.md --library quick-style-guide
    ```

    Claude crawls both URLs and stores the content locally. The quick reference indexes in seconds. The full guide takes slightly longer.
  </Step>

  <Step title="Verify both are indexed">
    Confirm the index contains both libraries:

    ```plaintext theme={null}
    /docs-manage List the full-style-guide and quick-style-guide libraries
    ```

    You see both style guide libraries in the output:

    ```plaintext theme={null}
    ⏺ Here are the two style guide libraries:

      full-style-guide
      - Status: ✅ completed
      - Documents: 30 chunks from 1 page
      - Indexed: 2026-05-27
      - Source: style-guide.md (GitHub raw)

      quick-style-guide
      - Status: ✅ completed
      - Documents: 8 chunks from 1 page
      - Indexed: 2026-05-27
      - Source: style-guide-quick-reference.md (GitHub raw)
    ```
  </Step>
</Steps>

## Install the skills

Skills teach Claude how to use indexed documentation. You install one skill for quick checks and one for in-depth reviews.

Claude will ask permission to download the files and write to `~/.claude/skills/`. Approve both prompts.

<Note>
  This tutorial demonstrates the quick check. You install both skills so the full-style-guide is ready when you need an in-depth review.
</Note>

<Steps>
  <Step title="Install the quick-style-guide skill">
    Ask Claude to download the skill file:

    ```plaintext theme={null}
    Download https://raw.githubusercontent.com/cjobermaier/public-resources/main/skills/quick-style-guide/SKILL.md to ~/.claude/skills/quick-style-guide/SKILL.md
    ```
  </Step>

  <Step title="Install the full-style-guide skill">
    Ask Claude to download the skill file:

    ```plaintext theme={null}
    Download https://raw.githubusercontent.com/cjobermaier/public-resources/main/skills/full-style-guide/SKILL.md to ~/.claude/skills/full-style-guide/SKILL.md
    ```
  </Step>

  <Step title="Reset Claude to load the skills">
    Exit and open another session to load the skills:

    ```shell-session theme={null}
    exit
    ```

    Then start Claude again:

    ```shell-session theme={null}
    claude
    ```
  </Step>
</Steps>

## Run the quick style guide

To check a document, run `/quick-style-guide <filename>`. Claude searches the indexed style guide for applicable rules, scans your document line by line, and returns findings grouped by severity — each with the line number, the rule it violates, and a suggested fix. Every finding traces back to a specific rule in the indexed style guide.

With the index and skills in place, you run the quick check against a document that contains intentional violations. The file `test-style-guide.md` contains seeded violations across all different severity levels.

<Steps>
  <Step title="Run the quick style check">
    Ask Claude to check the test document:

    ```plaintext theme={null}
    /quick-style-guide test-style-guide.md
    ```

    Claude searches the `quick-style-guide` index for the relevant rules, scans the document, and returns findings grouped by severity.

    ```plaintext theme={null}
    Critical issues

    - Line 1 — Heading sentence case: "Fact-Checking Your React Tutorials with AI" uses title case → Fact-checking your React tutorials with AI ("React" and "AI" stay capitalized as proper
    noun/abbreviation)
    - Line 8 — Simplest word: "utilize" → use
    - Line 29 — Present tense: "Claude will crawl both sites and store the results locally" → Claude crawls both sites and stores the results locally
    - Line 42 — Present tense: "Claude will return findings with citations" → Claude returns findings with citations
    - Line 44 — "Lets" not "enables/allows": "This approach enables you to verify accuracy" → This approach lets you verify accuracy
    - Line 45 — "Lets" not "enables/allows": "It also allows you to catch deprecated patterns" → It also lets you catch deprecated patterns

    ---
    Important issues

    - Line 3 — No Latin/foreign words: "via automated analysis" → through automated analysis
    - Line 9 — Avoid unnecessary words: "Simply follow the steps below" → Follow the steps below (delete "Simply"; also "below" should be "following" per content-flows-forward rule)
    - Line 17 — Present tense in headings (gerund): "## Indexing the React docs" → ## Index the React docs
    - Line 21 — Avoid unnecessary words: "in order to index" → to index
    - Line 29 — No Latin abbreviations: "e.g. as searchable chunks" → for example, as searchable chunks
    - Line 33 — Present tense in headings (gerund): "## Running the fact-check" → ## Run the fact-check
    ```

    Notice that each finding includes the line number, the rule it violates, and a suggested fix. You can trace every finding back to a specific rule in the indexed style guide.
  </Step>

  <Step title="Review the auto-fixable summary">
    At the end of the report, Claude lists all auto-fixable violations and asks if you want to apply the fixes.

    ```plaintext theme={null}
    Apply all the auto-fixes to test-style-guide.md
    ```
  </Step>

  <Step title="Re-run the check to confirm the fixes">
    Run the quick style check a second time against the same file:

    ```plaintext theme={null}
    /quick-style-guide test-style-guide.md
    ```
  </Step>
</Steps>

## Next steps

In this tutorial, you learned how to index a style guide into Grounded Docs, install skills that know how to use it,
and run a check against a document with seeded violations.

* Learn how to [fact-check your content against versioned documentation](/tutorials/increase-content-accuracy).

***

Found an issue with this tutorial? [Open a GitHub issue](https://github.com/cjobermaier/ai-docs-and-tutorials/issues).
