update-docs

Cập nhật tài liệu trong toàn bộ repo sau khi có thay đổi API. Tìm các tham chiếu lỗi thời trong tài liệu, ví dụ, docstring và sửa chúng.

npx skills add https://github.com/huggingface/openenv --skill update-docs

/update-docs

Find and fix stale documentation after API changes.

EXECUTE THESE STEPS NOW

When this skill is invoked, you MUST execute these steps immediately.

Step 1: Identify Changed Files

Run:

git diff --name-only main...HEAD -- '*.py'

If no changes are found relative to main (e.g., on main or no upstream), fall back to:

git diff --name-only HEAD~1 -- '*.py'

If that also fails, ask the user which files changed.

Collect the list of changed Python files.

Step 2: Extract API Changes

For each changed .py file, compare old vs new signatures using the same ref that worked in Step 1:

# If Step 1 used main...HEAD:
git diff main...HEAD -- <file>

# If Step 1 fell back to HEAD~1:
git diff HEAD~1 -- <file>

Look for changes to:

  • Function/method signatures (def lines)
  • Class names and init signatures
  • Module-level constants and type aliases
  • Removed or renamed public symbols

Build a list of (old_signature, new_signature) pairs.

If no API changes are found (only internal logic changes), report "No API changes detected — no docs update needed" and stop.

Step 3: Spawn Docs Updater Agent

Use the Task tool to spawn the docs-updater agent. IMPORTANT: the description field MUST contain "docs-updater" so the SubagentStop hook fires correctly.

Task tool:
  subagent_type: general-purpose
  description: "docs-updater propagation"
  prompt: |
    You are a docs-updater agent. Read .claude/agents/docs-updater.md
    for your full instructions.

    Here are the API changes to propagate:

    Changed files: <list>
    API changes:
    - `old` → `new`
    ...

    Search the entire repo for references to the old APIs and update
    them to match the new signatures. Follow the process in
    .claude/agents/docs-updater.md exactly.

Step 4: Review Results

After the agent returns:

  • Review the update report
  • Verify no test files were touched
  • Verify changes are minimal and correct

Report the summary to the user.


When to Use

  • After /implement when API signatures changed
  • Before /pre-submit-pr to ensure docs are fresh
  • When refactoring public APIs

When NOT to Use

  • Internal-only changes (no public API affected)
  • Test-only changes
  • Documentation-only changes (no code changed)

Workflow Integration

/write-tests    →  Red (failing tests)
/implement      →  Green (passing tests)
/update-docs    →  Fix stale docs across repo  ← THIS SKILL
/simplify       →  Refactor (optional)
/pre-submit-pr  →  Validate before PR

Thêm skills từ huggingface

cpu-kernels
huggingface
Cung cấp hướng dẫn về việc viết, tối ưu hóa và đánh giá hiệu năng các nhân CPU C++ với SIMD intrinsics (AVX2/AVX512) cho hệ sinh thái nhân của Hugging Face. Bao gồm…
official
generate-openenv-env
huggingface
Tạo môi trường OpenEnv từ một trường hợp sử dụng cụ thể (ví dụ: "tạo môi trường cho thư viện textarena"). Sử dụng khi được yêu cầu thiết kế hoặc triển khai một…
official
hf-mcp
huggingface
Sử dụng Hugging Face Hub qua các công cụ máy chủ MCP. Tìm kiếm mô hình, bộ dữ liệu, Spaces, bài báo. Lấy chi tiết kho lưu trữ, tải tài liệu, chạy tác vụ tính toán và sử dụng Gradio…
official
trl-training
huggingface
Huấn luyện và tinh chỉnh các mô hình ngôn ngữ transformer bằng TRL (Transformers Reinforcement Learning). Hỗ trợ huấn luyện SFT, DPO, GRPO, KTO, RLOO và Reward Model…
official
deploy-hf
huggingface
Triển khai môi trường OpenEnv lên Hugging Face Spaces. Sử dụng khi được yêu cầu triển khai, đẩy lên Hugging Face, hoặc cập nhật một space.
official
hf-space-recovery
huggingface
Diagnose and recover failing or stuck Hugging Face Space deployments for OpenEnv environments. Use when deploying envs from `envs/` to the Hub (`openenv`…
official
pre-submit-pr
huggingface
Xác thực các thay đổi trước khi gửi pull request. Chạy các kiểm tra toàn diện bao gồm lint, kiểm thử, đánh giá sự phù hợp và phân tích RFC. Sử dụng trước khi tạo…
official
example-skill
huggingface
Kỹ năng fixture mẫu để kiểm thử hành động
official