How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json.

OfficialMITAuto-check passedAI & LLM Engineering

Install Toc

skills CLI
$ npx skills add MicrosoftDocs/semantic-kernel-docs --skill toc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MicrosoftDocs/semantic-kernel-docs toc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MicrosoftDocs/semantic-kernel-docs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/toc .claude/skills/toc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
toc
GitHub stars
264
Token cost
~2.2k tokens
SKILL.md length
972 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json.

  • AI & LLM Engineering work in your project
  • SKILL.md covers Purpose, Goals for TOCs, YAML TOC Format and docfx.json Configuration, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Toc is an agent skill from MicrosoftDocs/semantic-kernel-docs, published by the product's own GitHub organization. How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering. The repository describes itself as: Semantic Kernel (SK) is a lightweight SDK enabling integration of AI Large Language Models (LLMs) with conventional programming languages. The licence is MIT.

When your agent uses it

  • AI & LLM Engineering work in your project

Example prompts

  • “/toc”

What it can do on your machine

Read from SKILL.md and the folder at commit 6997e10. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com
    • yamllint.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Toc loads about 2.2k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 972 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MicrosoftDocs/semantic-kernel-docs at commit 6997e10, republished under its MIT licence (© MicrosoftDocs). 972 words, ~2,171 tokens.

Download SKILL.mdSave it as .claude/skills/toc/SKILL.md (or your agent's skills folder).
name
toc
description
How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json.

Skill: Table of Contents (TOC) on Microsoft Learn

Purpose

This skill describes how to create, structure, and configure table of contents files (toc.yml) for documentation published on Microsoft Learn. The TOC defines the left-hand navigation structure of a docset.

Goals for TOCs

  • Present a useful amount of content while staying scannable
  • Match the customer's likely use cases for a product or technology
  • Allow rapid zooming in and out among topics
  • Help users form mental models of how a product is organized

YAML TOC Format

TOCs must be YAML (not Markdown). Create a file named toc.yml (always lowercase).

Basic Structure
yaml
items:
- name: Tutorial
  items:
  - name: Introduction
    href: tutorial.md
  - name: Step 1
    href: step-1.md
  - name: Step 2
    href: step-2.md

Parent nodes contain an items list of children. If you add an href to a parent node, the build system automatically creates a duplicate child node with the parent's name and link — the parent itself becomes an expander only.

Node Properties
PropertyRequiredDescription
nameYesDisplay text for the TOC node. Cannot include a colon (:).
hrefNoPath the node leads to. Omit for parent-only nodes.
displayNameNoAdditional search terms for TOC filtering (comma-separated). Not displayed to users.
uidNoIdentifier for reference documentation (e.g., System.String).
itemsNoChild nodes, each with the same available properties.
expandedNoSet to true to expand this node by default on page load. Only one root-level node can be expanded.

[!WARNING] Do not use maintainContext. It is no longer supported. Use contextual TOC links instead (see Contextual TOCs).

Advanced Example
yaml
- name: Dev sandbox
  href: index.md
  displayName: Home
- name: Conceptual pages
  expanded: true
  items:
  - name: Overview
    href: ./conceptual/index.md
  - name: Code samples
    href: ./conceptual/code.md
- name: Reference Pages
  items:
  - name: IDictionary
    href: ./reference/System.Collection.IDictionary.yml
  - name: String
    href: ./reference/System.String.yml

[!TIP] Validate your YAML with YAML Lint. Add items: as the first line to avoid parser errors.

docfx.json Configuration

Ensure "**/**.yml" is listed as a content file type so the build picks up TOC files:

json
"build": {
  "content": [
    {
      "files": ["**/*.md", "**/**.yml"],
      "exclude": ["**/obj/**"]
    }
  ]
}

Single vs. Multiple TOCs

Single TOC

Best for most products and services. One toc.yml plus one landing page. Top-level (L1) nodes represent the main content categories.

Multiple TOCs

For large products with diverse content areas, connect multiple TOCs via a central hub page. The hub page itself has no TOC — it links to landing pages, each with its own focused TOC.

Decision factors:

  • Product complexity and breadth of content
  • Number of files — each TOC should cover a meaningful end-to-end task area
  • Shared content — more sharing favors a single TOC

TOC and Product Directory

The TOC structure should relate to the product directory (the landing/hub page that showcases the product's content areas) but does not need to be a 1:1 match. The TOC may group or split content differently than the product directory to best serve navigation within the docset.

[!TIP] For reference images showing product directory layouts, see the Microsoft Learn static media index.

Nested TOCs

Nest one TOC inside another by pointing href to a child toc.yml:

yaml
items:
- name: Azure overview
  href: azure-overview.md
- name: Extensibility
  href: extensibility/toc.yml
- name: Reference
  href: azure-reference.md

Users stay in the containing TOC when selecting nested links. If the node linked to extensibility/overview.md instead of extensibility/toc.yml, selecting it would navigate the user to a different TOC.

[!NOTE] If a user arrives at a nested TOC article via search, the full parent TOC is displayed, not just the nested portion.

TOC Best Practices

Content and Context
  • All articles in a TOC should display the same TOC — don't surprise users by landing them in a different TOC
  • All links should go to articles, not to other TOCs (use hub pages for that)
  • Selecting the rightmost breadcrumb should always return to the current TOC
Size Guidelines
  • Keep 3–12 items per section. Fewer than 3 may not warrant a section; more than 12 becomes hard to scan.
  • Avoid going more than 3 levels deep.
Show full SKILL.md (398 more words)Show less
  • TOC labels should be short but match the article's H1
  • Parent nodes should expand, not be links (the build duplicates linked parents)
  • External links must live in a Resources node; all other nodes should link to Microsoft Learn content
Common Mistakes to Avoid
❌ Don't✅ Do
Link to the same file more than onceUse a single link per article
Link to a different TOC from within a TOCUse a contextual TOC instead
Duplicate info from hub/landing pagesProvide complementary structure
Include root folder in href (/docs/marketplace/overview.md)Use relative path (marketplace/overview.md)
Begin href with a slash (/collaborate/overview.md)Omit leading slash (collaborate/overview.md)

Contextual TOCs

When your TOC links to articles in another folder or repo, the user's navigation context (TOC, breadcrumbs, header) normally changes. A contextual TOC preserves your docset's context instead.

Three Files Involved
FilePurpose
toc.ymlLinks to external articles with forced context parameters
breadcrumb/toc.ymlMaps external article URLs to your breadcrumb hierarchy
context/context.yml(Optional) Bundles brand, breadcrumb, and TOC references

[!IMPORTANT] Publish breadcrumb and context file changes before publishing TOC changes. Contextual links can't be previewed until these files are live.

Forced TOC and Breadcrumb Paths

Append query parameters to the href in your TOC:

yaml
# Forced TOC only
- name: Secure SQL data
  href: ../sql-database/sql-database-always-encrypted.md?toc=/azure/key-vault/general/toc.json

# Forced TOC + breadcrumb
- name: Secure SQL data
  href: ../sql-database/sql-database-always-encrypted.md?toc=/azure/key-vault/general/toc.json&bc=/azure/key-vault/general/breadcrumb/toc.json
Context Files (Optional Shorthand)

A context file combines brand, breadcrumb, and TOC into a single reference:

yaml
### YamlMime: ContextObject
brand: azure
breadcrumb_path: ../breadcrumb/toc.yml
toc_rel: ../toc.yml

Then reference it in your TOC with a single parameter:

yaml
- name: SCCM Run Scripts
  href: /sccm/apps/deploy-use/create-deploy-scripts?context=/azure/key-vault/context/kv-context

[!NOTE] Context files have limitations with moniker views (e.g., ?view=azurermps-6.2.0). In those cases, use explicit ?toc= and &bc= parameters instead.

Relationship Between TOC and Breadcrumbs

The TOC and breadcrumb are separate navigation systems with different purposes:

  • The TOC (toc.yml) provides left-hand navigation within a docset — showing where the user is and what content is available nearby.
  • The breadcrumb (breadcrumb/toc.yml) provides top-of-page links showing where the docset sits in the overall site hierarchy.

The breadcrumb's tocHref property maps URL paths to breadcrumb entries. When using contextual TOCs, the breadcrumb file must also be updated so that externally linked articles show your product's breadcrumb rather than their own.

For breadcrumb file creation and configuration details, see the breadcrumbs skill.

When to Apply This Skill

  • When creating a new docset and its initial navigation structure
  • When reorganizing content into new sections or sub-products
  • When linking to articles outside your docset while preserving context
  • When deciding between single vs. multiple TOCs for a large product

Reference

© MicrosoftDocs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/toc of MicrosoftDocs/semantic-kernel-docs.

Open the folder on GitHubat commit 6997e10

Compare with similar skills

Toc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Toc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Toc this skillMicrosoftDocs/semantic-kernel-docs264—~2.2kAutomated safety check: PassMIT
Agent BuildershareAI-lab/learn-claude-code78k6 repos~1.2kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
Peft Fine TuningOrchestra-Research/AI-Research-SKILLs13k9 repos~3.1kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k9 repos~3.3kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.8k13 repos~656Automated safety check: PassApache-2.0

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 6 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Peft Fine Tuning

    Orchestra-Research/AI-Research-SKILLs

    Parameter-efficient fine-tuning for LLMs using LoRA, QLoRA, and 25+ methods.

    13k GitHub starsUsed in 9 repos~3.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.8k GitHub starsUsed in 13 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed

More from MicrosoftDocs/semantic-kernel-docs

  • Breadcrumbs

    MicrosoftDocs/semantic-kernel-docs

    Official

    How breadcrumbs work on Microsoft Learn: structure, creation, configuration in docfx.json, and best practices for documentation repos.

    264 GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Code Snippets

    MicrosoftDocs/semantic-kernel-docs

    Official

    How to reference code from sample repos in Agent Framework docs pages using :::code directives, snippet tags, zone pivots, and highlight attributes.

    264 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Cross Repository References

    MicrosoftDocs/semantic-kernel-docs

    Official

    How to configure cross-repository references (CRR) and create API class links for Microsoft Learn docs in this repository.

    264 GitHub stars~1k tokensUpdated 5 days ago
    Auto-check passed
  • Redirection

    MicrosoftDocs/semantic-kernel-docs

    Official

    How to delete, rename, or move articles on Microsoft Learn while preserving Platform IDs, preventing broken links, and managing redirects.

    264 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Sample Structure

    MicrosoftDocs/semantic-kernel-docs

    Official

    Conceptual organization of Agent Framework documentation and samples.

    264 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Per Concept Documentation

    MicrosoftDocs/semantic-kernel-docs

    Official

    Required when reviewing, updating, auditing, or creating any concept documentation page.

    264 GitHub stars~1k tokensUpdated 5 days ago
    Auto-check passed

Questions about Toc

What does Toc do?

How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json. Toc is an agent skill from MicrosoftDocs/semantic-kernel-docs, published by the product's own GitHub organization.json.

When should I use Toc?

Toc fits situations like: AI & LLM Engineering work in your project.

How do I install Toc in Claude Code?

Run `npx skills add MicrosoftDocs/semantic-kernel-docs --skill toc -a claude-code`. Or copy the skill folder (.github/skills/toc in MicrosoftDocs/semantic-kernel-docs) into .claude/skills/toc in your project. Claude Code loads it when a task matches its description.

How do I install Toc in Codex?

Run `npx skills add MicrosoftDocs/semantic-kernel-docs --skill toc -a codex`. Or copy the skill folder (.github/skills/toc in MicrosoftDocs/semantic-kernel-docs) into .agents/skills/toc in your project. Codex loads it when a task matches its description.

Can I use Toc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MicrosoftDocs/semantic-kernel-docs --skill toc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/toc, .gemini/skills/toc, .github/skills/toc and .opencode/skills/toc in your project.

What does Toc need to run?

SKILL.md names no scripts, command-line tools or credentials: Toc is instructions for the agent only.

Does Toc access the network?

SKILL.md names 2 domains. As links in the text: learn.microsoft.com and yamllint.com. This is read from the text; nothing was executed.

Is Toc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Toc use?

Toc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Toc use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Toc?

Skills that share tags, products or a category with Toc: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Add Uint Support (pytorch/pytorch, 104k stars), Peft Fine Tuning (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Toc?

MicrosoftDocs (a GitHub organization, an official publisher) maintains it in MicrosoftDocs/semantic-kernel-docs, which has 264 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 2, 2026.

Source: MicrosoftDocs/semantic-kernel-docs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.