xhs-mcp: Skill for Claude Code

.claude/skills/update-docs/SKILL.md

update-docs is a skill for Claude Code from ShunL12324/xhs-mcp. It costs 42 tokens per session (1,083 once invoked), scanned A, original, MIT.

A documentation-update tool that examines changes recorded in Git, a system for tracking code versions, and updates project documentation accordingly. It can use the latest commit or a specified range of commits.

In plain words
What is it for?
Use it to synchronize documentation after commits, update API pages and environment-variable instructions, and review which project documents should change.
Why use it?
It reduces the chance that README files, API references, or project instructions become out of date after code changes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is ShunL12324/xhs-mcp's own configuration. It tells Claude Code how to work on xhs-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xhs-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ShunL12324/xhs-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ShunL12324/xhs-mcp/master/.claude/skills/update-docs/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ShunL12324/xhs-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/shunl12324/xhs-mcp/update-docs/github.svg)](https://agentmods.dev/skills/shunl12324/xhs-mcp/update-docs)
Your own site
<a href="https://agentmods.dev/skills/shunl12324/xhs-mcp/update-docs"><img src="https://agentmods.dev/badge/skills/shunl12324/xhs-mcp/update-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for update-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/shunl12324/xhs-mcp/update-docs"><img src="https://agentmods.dev/badge/skills/shunl12324/xhs-mcp/update-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.01083
Opus 5 $0.00021 $0.00541
Sonnet 5 $0.00008 $0.00217
Haiku 4.5 $0.00004 $0.00108

Measured 9d ago against content hash f2e837e1f5d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

update-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/update-docs/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

更新文档 Skill

根据 git 改动自动分析并更新项目文档。

触发方式

用户调用 /update-docs 或说"更新文档"、"同步文档"等。

参数解析

从用户输入中解析:

  • range: commit 范围,如 HEAD~3..HEADv2.3.0..v2.4.0、具体 commit hash
  • 默认:最近一次 commit (HEAD~1..HEAD)

示例:

  • /update-docs → 分析最近一次 commit
  • /update-docs HEAD~5..HEAD → 分析最近 5 次 commit
  • /update-docs v2.3.0..v2.4.0 → 分析版本间改动

执行流程

1. 获取改动信息

# 获取 commit 信息
git log --oneline <range>

# 获取改动的文件列表
git diff --name-only <range>

# 获取详细改动(针对关键文件)
git diff <range> -- src/tools/ src/xhs/clients/services/

2. 分析改动类型

根据改动文件判断需要更新的文档:

改动位置 需要更新的文档
src/tools/*.ts docs/api/README.md 工具表格
src/core/config.ts CLAUDE.md 环境变量、README.md 环境变量
src/xhs/clients/services/*.ts docs/guide/、功能说明
src/db/repos/*.ts CLAUDE.md 数据库架构
package.json 版本号、依赖说明

3. 文档更新清单

核心文档:

  • README.md / README.en.md - 功能概览、工具列表、环境变量
  • CLAUDE.md - 项目说明、架构、环境变量、开发指南
  • docs/index.md / docs/en/index.md - 首页特性

API 文档(每个工具一个文件):

  • docs/api/<tool_name>.md - 中文 API 文档
  • docs/en/api/<tool_name>.md - 英文 API 文档
  • docs/api/index.md / docs/en/api/index.md - API 索引

使用指南:

  • docs/guide/*.md - 功能使用指南

4. 更新规则

  1. 新增工具

    • docs/api/index.md 添加工具条目
    • 创建 docs/api/<tool_name>.md 文档
    • README.md 工具表格中添加
    • 同步英文版本
  2. 修改工具

    • 更新对应的 API 文档参数、示例
    • 检查 README 中的描述是否需要更新
  3. 新增环境变量

    • 更新 CLAUDE.md 环境变量表
    • 更新 README.md / README.en.md 环境变量表
  4. 架构变更

    • 更新 CLAUDE.md 项目结构和架构说明

5. API 文档模板

新工具的文档模板:

# <tool_name>

<简短描述>

## 参数

| 参数 | 类型 | 必需 | 说明 |
|------|------|------|------|
| `param1` | string | 是 | 描述 |
| `param2` | number | 否 | 描述(默认值:x) |

## 返回值

\`\`\`json
{
  "success": true,
  ...
}
\`\`\`

## 示例

### 基础用法

\`\`\`
<tool_name>({ param1: "value" })
\`\`\`

### 高级用法

\`\`\`
<tool_name>({
  param1: "value",
  param2: 100
})
\`\`\`

## 注意事项

- 要点 1
- 要点 2

6. 检查清单

完成后执行:

# 验证 VitePress 构建(检查死链接)
cd docs && bun run build 2>&1 | grep -i "dead link"

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 153 lines · 42 tokens per session scan A f2e837e1f5d9

Subscribe to this mod's changes

update-docs is a skill published in the GitHub repository ShunL12324/xhs-mcp (46 stars, last pushed 6mo ago), licensed MIT. It adds 42 tokens to every session and 1,083 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens