Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问许可证需确认审计提醒

mkdocs-site-bootstrapmkdocs 站点引导程序

Agent Skill

mkdocs-site-bootstrap 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

216

周安装

9

GitHub Stars

公开资料未说明

下载量

72
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mkdocs-site-bootstrap(mkdocs 站点引导程序)
来源仓库:https://github.com/daviddwlee84/agent-skills
仓库路径:skills/mkdocs-site-bootstrap
安装命令:
npx skills add https://github.com/daviddwlee84/agent-skills --skill mkdocs-site-bootstrap
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/daviddwlee84/agent-skills --skill mkdocs-site-bootstrap

简介

mkdocs-site-bootstrap 用于引导创建和初始化 MkDocs 站点项目。

  • 适合在运维和基础设施场景中快速部署文档系统。
  • 通过 GitHub 安装,兼容主流 Agent 宿主平台。
  • 注意检查仓库状态与操作权限,避免误触发网络或文件变更。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

mkdocs-site-bootstrap

Bootstrap and (optionally) deploy a MkDocs Material documentation site for a repository, then keep helping the user add pages over time.

This skill is consent-gated. It records the user's preferences in .skills/preferences.yaml and never repeats destructive actions without asking. If the user changes their mind, scripts/check-preferences.sh --reset mkdocs_site_bootstrap clears the recorded decision so the next invocation starts fresh.

When to trigger

  • User asks to "set up docs", "create a docs site", "add a documentation site", "publish docs to GitHub Pages"
  • User has loose markdown notes / a docs/ directory and wants it browsable
  • User wants the same docs stack as the daviddwlee84/agent-skills repo applied to a new project
  • User says they want an LLM-friendly docs site (llms.txt, copy-to-LLM)

When NOT to trigger

  • User just wants to write a single doc file → don't scaffold a whole site
  • User explicitly opted out (preferences.yaml says enabled: false) → defer unless the user is now reversing that decision
  • User wants to evaluate or benchmark a skill → use skill-creator
  • User wants to author a new agent skill → use skill-author

Workflow

1. Read preferences first

Before doing anything, check whether this repo already has a recorded decision:

bash skills/local/mkdocs-site-bootstrap/scripts/check-preferences.sh \
  --get mkdocs_site_bootstrap

Possible states:

StateMeaningWhat to do
File doesn't exist or key missingNever askedProceed to step 2 (interview)
enabled: true, pages_deployed: trueSite is liveSkip to step 6 (ongoing helpers)
enabled: true, pages_deployed: falseBootstrapped but not deployedSkip to step 5 (deploy)
enabled: falseUser opted outConfirm they want to reverse that, then --reset and re-run

2. Interview (only if no recorded decision)

Ask the user explicitly:

  1. "Do you want a MkDocs Material documentation site for this project? (yes / no / I'll think about it)"
  2. If yes: "Should it auto-deploy to GitHub Pages on push to main? (yes / no — I'll deploy manually)"

Record both answers immediately so an interrupted session doesn't lose them:

bash skills/local/mkdocs-site-bootstrap/scripts/check-preferences.sh \
  --set mkdocs_site_bootstrap.enabled=true \
  --set mkdocs_site_bootstrap.stack=mkdocs-material \
  --set mkdocs_site_bootstrap.auto_deploy=true

If the user said no, record enabled: false and stop. Don't pester on future invocations.

3. Detect existing docs (consent gate)

Before scaffolding, scan the target repo. Read references/existing-docs-handling.md for the full decision tree, but the short version:

  • If mkdocs.yml already exists → report "looks like an mkdocs site already exists at; not overwriting" and stop.
  • If docs/ exists and is non-empty → list the files, ask the user one of: (a) skip — leave my docs alone, just create mkdocs.yml pointing at them; (b) wrap — create mkdocs.yml with my files included as-is in the nav; (c) manual — let me reorganize first, then re-run.
  • If neither exists → safe to scaffold from scratch.

Record the decision under mkdocs_site_bootstrap.existing_docs_decision.

4. Scaffold

Run init-docs-site.sh. It writes (or refuses to overwrite) mkdocs.yml, pyproject.toml (with [project.optional-dependencies] docs = […]), the docs/ skeleton, .github/workflows/docs.yml, and stub assets for copy-to-llm.

bash skills/local/mkdocs-site-bootstrap/scripts/init-docs-site.sh \
  --site-name "My Project" \
  --repo-slug owner/repo \
  --site-url https://owner.github.io/repo/

Use --dry-run first to preview. The script always preserves any existing files unless --force is passed.

After scaffolding, run a local strict build to catch obvious issues:

uv sync --extra docs
uv run mkdocs build --strict

5. Enable Pages and trigger first deploy (consent gate)

This calls the GitHub API (gh api -X POST.../pages -f build_type=workflow) and then triggers the workflow. Always confirm with the user first — say exactly which API call you're about to make and which repo it'll affect. Only proceed on explicit yes.

bash skills/local/mkdocs-site-bootstrap/scripts/enable-pages.sh \
  --repo owner/repo

Flags:

  • --dry-run — print the gh calls without running them
  • --no-trigger — enable Pages but don't run the workflow yet

After success, set pages_deployed=true and pages_enabled_at=$(date +%F) in preferences.

6. Ongoing: add docs pages

For each new doc the user wants, use the helper instead of hand-editing mkdocs.yml:

bash skills/local/mkdocs-site-bootstrap/scripts/add-docs-page.sh \
  --section workflows \
  --title "My new workflow" \
  --slug my-new-workflow

It creates docs/<section>/<slug>.md from the page template and inserts a nav entry into mkdocs.yml under the matching section heading. Idempotent — re-running with the same slug is a no-op.

Available scripts

  • scripts/check-preferences.sh — Read, set, or reset .skills/preferences.yaml. Always-safe to run.

- Flags: --get KEY, --set KEY=VALUE (repeatable), --reset NAMESPACE, --list, --dry-run, --json.

  • scripts/init-docs-site.sh — Scaffold the site files.

- Flags: --site-name, --repo-slug, --site-url, --existing skip|wrap, --no-workflow, --dry-run, --force.

  • scripts/enable-pages.sh — Enable Pages and trigger first deploy via gh api. Requires gh auth status to pass first.

- Flags: --repo OWNER/REPO, --no-trigger, --dry-run.

  • scripts/add-docs-page.sh — Create a new page and insert it into mkdocs.yml's nav.

- Flags: --section, --title, --slug, --template PATH, --dry-run, --force.

Reference files

  • references/preferences-schema.md — Schema for .skills/preferences.yaml and conventions for cross-skill use. Read this whenever you're touching a preferences key for the first time.
  • references/existing-docs-handling.md — Full decision tree for handling user's pre-existing docs/ content without surprises. Read this before step 3 of every fresh bootstrap.
  • references/docs-stack-recipe.md — Verbatim stack recipe (mkdocs.yml, pyproject.toml, workflow, linking rules). Useful when the user asks "what exactly is this stack?" or wants to apply pieces manually.

Bundled assets

Templates the scripts copy from. Edit them here, not in the user's repo.

  • assets/mkdocs.yml.template — Material theme + llmstxt + copy-to-llm plugins + pymdownx.snippets, parameterized with {{SITE_NAME}}, {{REPO_SLUG}}, {{SITE_URL}}.
  • assets/pyproject.toml.template — Minimal [project] block + the docs optional-deps group.
  • assets/docs-workflow.yml.template.github/workflows/docs.yml with paths filter, uv setup, strict build, Pages deploy.
  • assets/docs-skeleton/index.md, getting-started.md, _snippets/ examples, assets/copy-to-llm/ JS+CSS files copied from this repo.
  • assets/page.md.template — Used by add-docs-page.sh.

Gotchas

  • MkDocs strict mode rejects relative .md links pointing outside docs/. Inside docs/ → relative is fine. Outside docs/ for .md files (e.g., linking to repo TODO.md) → use absolute GitHub URL. Outside docs/ for directories or non-.md (backlog/, pyproject.toml) → relative is downgraded to INFO and tolerated. Templates already do this right; don't "fix" the absolute URLs.
  • pymdownx.snippets requires _snippets/ in not_in_nav: or strict mode complains about pages-not-in-nav. Template handles it.
  • gh api -X POST.../pages is idempotent for build_type=workflow but errors on 404 Not Found if the repo isn't pushed to GitHub yet. Check gh repo view succeeds before running enable-pages.sh.
  • The Pages deploy workflow needs permissions: pages: write, id-token: write at the workflow level. Template has it; if you copy pieces into an existing workflow, don't lose this.
  • copy-to-llm plugin's repo_url is the SITE URL, not the GitHub URL. Counter-intuitive name.
  • Don't auto-migrate existing user docs. Always ask. Migrating someone's hand-curated docs/ into a new structure is a high-trust action that should be the user's explicit decision, not the agent's default.
  • .skills/preferences.yaml is per-repo, not global. Don't write it to ~/.skills/ or ~/.config/. Each repo has its own decisions.

Updating an existing site (not bootstrapping)

If mkdocs.yml already exists, this skill mostly defers — only add-docs-page.sh and check-preferences.sh are useful. Don't try to "upgrade" the user's mkdocs.yml without an explicit ask; their config may have customizations the templates don't know about.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.08%
按下载量换算25

Claude

28.55%
按下载量换算21

Cursor

19.69%
按下载量换算14

Gemini CLI

8.06%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills