Agent skill

Docs Learn PR Preview

by netdata in netdata/netdata

Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge.

GPL-3.0Auto-check passedDevOps & Cloud

Install Docs Learn PR Preview

skills CLI
$ npx skills add netdata/netdata --skill docs-learn-pr-preview -a claude-code

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

GitHub CLI
$ gh skill install netdata/netdata docs-learn-pr-preview --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/netdata/netdata.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/docs-learn-pr-preview .claude/skills/docs-learn-pr-preview && 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
docs-learn-pr-preview
GitHub stars
81k
Token cost
~2k tokens
SKILL.md length
745 words
Files
3 (incl. scripts)
Skills in repo
27
Repo updated
First seen
Licence
GPL-3.0

At a glance

Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge.

  • Explicitly asks to build
  • SKILL.md covers Rules and Workflow
  • Runs Python scripts from its folder; calls git, python3 and npx
  • Validate learn.netdata.cloud locally using the contents of a PR

What it does

Docs Learn PR Preview is an agent skill from netdata/netdata. Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge. Do not trigger for ordinary docs edits unless the user asks for a local Learn preview.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/snapshot-source.py` and `tests/test_snapshot_source.py`).

It sits in DevOps & Cloud. The repository describes itself as: The fastest path to AI-powered full stack observability, even for lean teams. The licence is GPL-3.0.

When your agent uses it

  • Explicitly asks to build
  • Validate learn.netdata.cloud locally using the contents of a PR
  • Documentation branch before merge
  • Ordinary docs edits unless the user asks for a local Learn preview

Example prompts

  • “/docs-learn-pr-preview”

Requirements

  • Python 3
  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 9fe30d9. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python3
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use git and npx, which can reach the network depending on how they are called.

    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

Docs Learn PR Preview loads about 2k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 745 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~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); the scripts in this folder are not scanned.

SKILL.md

The full file from netdata/netdata at commit 9fe30d9, republished under its GPL-3.0 licence (© netdata). 745 words, ~1,970 tokens.

Download SKILL.mdSave it as .claude/skills/docs-learn-pr-preview/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
docs-learn-pr-preview
description
Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge. Do not trigger for ordinary docs edits unless the user asks for a local Learn preview.

docs-learn-pr-preview

Build and inspect a local Learn site from a PR's documentation content without dirtying the real Learn checkout.

Always load docs-learn-site-structure first. If the PR touches metadata.yaml or generated integration pages, also load integrations-lifecycle.

Rules

  • Trigger only on an explicit preview/build/inspect request.
  • Do not run ingest directly in a dirty Learn worktree.
  • Use an isolated preview directory under /tmp or the repo's gitignored .local/.
  • Record the source selection and resolved Netdata and Learn commits used for the preview.
  • Copy PR source content into an isolated source directory. Prefer committed PR content; if validating uncommitted work, copy tracked modified files and only intentional untracked docs files after checking git status --short.
  • Save any preview server PID and kill only that PID when stopping it.
  • Treat site-wide warnings as evidence, but separate pre-existing global Learn warnings from PR-specific warnings.

Workflow

Resolve the requested PR's head commit from that PR's metadata, or resolve the requested documentation branch. A PR number is a label, not a source selector. Verify the object is available locally; acquire a missing object in an isolated repository if necessary. Do not substitute the current checkout. For an intentional uncommitted preview, inspect git status --short and choose the working-tree alternative below.

Set paths and create a fresh private run directory. LEARN_REPO must identify the selected local Learn checkout; LEARN_REF may be HEAD, including a detached HEAD, or another verified local ref.

bash
REPO_ROOT="$(git rev-parse --show-toplevel)"
SOURCE_REPO="${REPO_ROOT}" # Use the isolated acquisition repository here if the requested object was missing.
SOURCE_REF="<verified-requested-source-commit-or-ref>"
LEARN_REPO="${NETDATA_REPOS_DIR:?set the source mirror root}/learn"
LEARN_REF="HEAD"
LEARN_COMMIT="$(git -C "${LEARN_REPO}" rev-parse --verify --end-of-options "${LEARN_REF}^{commit}")"
mkdir -p "${REPO_ROOT}/.local/audits/learn-pr-preview"
PREVIEW_ROOT="$(mktemp -d "${REPO_ROOT}/.local/audits/learn-pr-preview/run.XXXXXX")"
SOURCE_COPY="${PREVIEW_ROOT}/netdata-source"
LEARN_COPY="${PREVIEW_ROOT}/learn"
SNAPSHOT="${REPO_ROOT}/.agents/skills/docs-learn-pr-preview/scripts/snapshot-source.py"

Export exact committed source blobs (requires Python 3.9 or later):

bash
python3 "${SNAPSHOT}" --repo "${SOURCE_REPO}" --output "${SOURCE_COPY}" --ref "${SOURCE_REF}"

For an intentional working-tree preview, use this instead of the committed export. Add one --include-untracked relative/file for each explicitly selected nonignored untracked file; omit the option if none. Use the intended working checkout as SOURCE_REPO. Tracked working files, staged additions and tracked deletions are reflected automatically.

bash
python3 "${SNAPSHOT}" --repo "${SOURCE_REPO}" --output "${SOURCE_COPY}" --working-tree \
  --include-untracked "<selected-relative-file>"

The helper requires a new output and sibling .manifest.json. It records source mode, resolved/base commit, per-file hashes and modes, selected untracked files, indexed paths missing on disk and gitlink pins. Staged deletions are absent from the index and snapshot; use the inspected status/diff for the complete deletion report. Gitlinks are recorded, not expanded: if an affected preview input needs submodule content, prepare that pinned content in the isolated copy and record it before claiming coverage. Unresolved index conflicts and links escaping the snapshot are rejected. The helper isolates Git subprocesses from inherited repository/index selection; --repo selects the source, including a linked worktree. Keep inputs stable during capture; on failure inspect the new partial output and retry with a fresh run directory. The helper never restores or cleans the original checkout.

Pin an isolated Learn copy to the resolved commit; this exports committed Learn content, not its local edits:

bash
git clone --no-hardlinks --no-checkout "${LEARN_REPO}" "${LEARN_COPY}"
git -C "${LEARN_COPY}" checkout --detach "${LEARN_COMMIT}"
git -C "${LEARN_COPY}" rev-parse HEAD

Before ingest, prepare affected generated integration pages inside SOURCE_COPY, following the producer chain and current-input generation in integrations-lifecycle. A metadata-only PR can otherwise preview stale committed pages. The source manifest describes inputs before this derived generation; record generator commands and results separately. Keep generated changes out of the original source checkout.

Show full SKILL.md (258 more words)Show less

Install ingest dependencies in the isolated preview:

bash
python3.13 -m venv "${PREVIEW_ROOT}/venv"
"${PREVIEW_ROOT}/venv/bin/python" -m pip install \
  --require-hashes \
  -r "${LEARN_COPY}/.learn_environment/ingest-requirements.txt"

Install JavaScript dependencies into LEARN_COPY using its lockfile and the runtime selected by its static.toml (see below). If reusing compatible dependencies, copy them into the isolated checkout, then check all links:

bash
python3 "${SNAPSHOT}" --check-links "${LEARN_COPY}"

Do not link to the original checkout's writable node_modules. A reused dependency tree must be self-contained; reinstall into the isolated copy if its links escape. Merely matching a directory name does not establish lockfile or runtime compatibility.

Run ingest with the PR source:

bash
cd "${LEARN_COPY}"
"${PREVIEW_ROOT}/venv/bin/python" ingest/ingest.py \
  --local-repo "netdata:${SOURCE_COPY}" \
  --ignore-on-prem-repo \
  --use_plain_https \
  --fail-links-netdata

Build with the command and runtime Netlify uses. Both are the [build] table of static.toml in the Learn checkout (command, and NODE_VERSION, NPM_VERSION, NODE_OPTIONS under environment); read them rather than pinning values here, because the pins move with the site:

bash
sed -n '/^\[build\]/,/^$/p' "${LEARN_COPY}/static.toml"
PUBLISH_DIR="$(sed -n '/^\[build\]/,/^$/{s/^ *publish *= *"\(.*\)"/\1/p;}' "${LEARN_COPY}/static.toml")"
[ -n "${PUBLISH_DIR}" ] || { echo "no publish key in the [build] table of static.toml" >&2; exit 1; }

Run the printed command inside ${LEARN_COPY} with the printed NODE_OPTIONS exported and Node and npm matching NODE_VERSION and NPM_VERSION (for example through npx -y -p node@<NODE_VERSION> -p npm@<NPM_VERSION> <command>). The output lands in ${LEARN_COPY}/${PUBLISH_DIR}.

Serve the static build for inspection:

bash
python3 -m http.server 3030 --bind 127.0.0.1 --directory "${LEARN_COPY}/${PUBLISH_DIR}"

Or run it in the background with a PID file:

bash
python3 -m http.server 3030 --bind 127.0.0.1 --directory "${LEARN_COPY}/${PUBLISH_DIR}" \
  >"${PREVIEW_ROOT}/http.log" 2>&1 &
echo "$!" > "${PREVIEW_ROOT}/http.pid"

Inspect representative pages in a browser. For docs PRs, check:

  • the changed hand-authored pages;
  • generated integration pages affected by metadata.yaml;
  • the category index page;
  • a previously failing ingest, MDX or link-check page, when one exists.

Report:

  • requested source and resolved/base commit, source mode and manifest path;
  • selected untracked files, tracked deletions, submodule coverage and derived generation, when applicable;
  • Learn ref and resolved commit used;
  • ingest command and exit status;
  • build command and exit status;
  • inspected URLs and HTTP/browser status;
  • PR-specific warnings or failures;
  • pre-existing global warnings separately.

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

Files

SKILL.md and 2 other files (scripts) in .agents/skills/docs-learn-pr-preview of netdata/netdata.

  • SKILL.md
  • scripts/snapshot-source.py
  • tests/test_snapshot_source.py

Open the folder on GitHubat commit 9fe30d9

Compare with similar skills

Docs Learn PR Preview 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.

Docs Learn PR Preview compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs Learn PR Preview this skillnetdata/netdata81k—~2kAutomated safety check: PassGPL-3.0
Monitor CInrwl/nx29k5 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw35k6 repos~4.2kAutomated safety check: PassApache-2.0
Vercel Optimize Auditvercel-labs/agent-skills32k8 repos~4.3kAutomated safety check: PassNone
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence
Iron Proxy Gateway for NanoClawnanocoai/nanoclaw31k—~4.6kAutomated safety check: NotesMIT

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 5 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    35k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 8 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Terraform Skill

    antonbabenko/terraform-skill

    A skill your agent uses when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift…

    2.4k GitHub starsUsed in 1 repo~5.1k tokens
    DevOps & CloudAuto-check passed

More from netdata/netdata

All 27 skills in this repo
  • Repo Mirror Sources

    netdata/netdata

    Inspect Netdata-org source checkouts under NETDATAREPOSDIR, or set up and synchronize that mirror when requested.

    81k GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Triage Agent Events

    netdata/netdata

    Investigate Netdata crashes, panics and fatals from agent-events captures or authorized fleet queries.

    81k GitHub stars~2.4k tokensUpdated today
    Auto-check: notes
  • Triage Codacy

    netdata/netdata

    Inspect, analyze, troubleshoot, or review Codacy findings and local analyzer/API helpers.

    81k GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • Triage Coverity

    netdata/netdata

    Inspect or review Coverity Scan defects and saved CID bundles; fetch live findings or apply verified triage decisions when requested.

    81k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Triage Sonarqube

    netdata/netdata

    Inspect, review, or apply authorized triage decisions to SonarCloud issues and security hotspots; also review the Sonar helpers.

    81k GitHub stars~2.8k tokensUpdated today
    Auto-check: notes
  • Create, review or validate Netdata Prometheus chart profiles, exporter dashboard design, collection policy and stock semantic proofs.

    81k GitHub stars~4.7k tokensUpdated today
    Auto-check passed

Categories

Questions about Docs Learn PR Preview

What does Docs Learn PR Preview do?

Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge. Docs Learn PR Preview is an agent skill from netdata/netdata.cloud locally using the contents of a PR or documentation branch before merge.

When should I use Docs Learn PR Preview?

Docs Learn PR Preview fits situations like: explicitly asks to build; validate learn.netdata.cloud locally using the contents of a PR; documentation branch before merge; ordinary docs edits unless the user asks for a local Learn preview.

How do I install Docs Learn PR Preview in Claude Code?

Run `npx skills add netdata/netdata --skill docs-learn-pr-preview -a claude-code`. Or copy the skill folder (.agents/skills/docs-learn-pr-preview in netdata/netdata) into .claude/skills/docs-learn-pr-preview in your project. Claude Code loads it when a task matches its description.

How do I install Docs Learn PR Preview in Codex?

Run `npx skills add netdata/netdata --skill docs-learn-pr-preview -a codex`. Or copy the skill folder (.agents/skills/docs-learn-pr-preview in netdata/netdata) into .agents/skills/docs-learn-pr-preview in your project. Codex loads it when a task matches its description.

Can I use Docs Learn PR Preview 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 netdata/netdata --skill docs-learn-pr-preview -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs-learn-pr-preview, .gemini/skills/docs-learn-pr-preview, .github/skills/docs-learn-pr-preview and .opencode/skills/docs-learn-pr-preview in your project.

What does Docs Learn PR Preview need to run?

Going by SKILL.md and its folder, Docs Learn PR Preview needs Python for the scripts in its folder and the command-line tools its instructions call (git, python3 and npx). Our summary lists: Python 3; Node.js.

Does Docs Learn PR Preview access the network?

SKILL.md contains no URLs. Its commands use git and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docs Learn PR Preview 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Docs Learn PR Preview use?

Docs Learn PR Preview is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docs Learn PR Preview use?

About 2k tokens (SKILL.md is roughly 7.9k 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 Docs Learn PR Preview?

Skills that share tags, products or a category with Docs Learn PR Preview: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 35k stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and Analyze GitHub Action Logs (withastro/astro, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs Learn PR Preview?

netdata (a GitHub organization) maintains it in netdata/netdata, which has 80,820 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 7, 2026.

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