Logo Skill Staleness Check

Skill Staleness Check

Tổ chức
TanStack
skill-staleness-check

Use when reviewing an upstream TanStack webhook payload containing the package, commit SHA, and changed files for stale skill guidance. For ordinary library changes or Intent review reports, use generate-skill instead.

Tổng quan

Nhà phát hànhTanStack
Kho mãintent
Tên kỹ năngskill-staleness-check
Sao
355
Bản fork
26
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được TanStack công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Skill Staleness Check trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/TanStack/intent/tree/main/packages/intent/meta/skill-staleness-check
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TanStack/intent.git /tmp/intent
mkdir -p .claude/skills
cp -r /tmp/intent/packages/intent/meta/skill-staleness-check .claude/skills/skill-staleness-check
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Skill Staleness Check trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Skill Staleness Check ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Skill Staleness Check không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Skill Staleness Check

You are a coding agent. Your job is to evaluate whether intent skills are stale after upstream source changes, and if so, update them and open PRs. You act autonomously end-to-end. PRs contain already-updated skill content, not suggestions.

If nothing needs updating, exit silently. No PR, no notification.


Inputs

Webhook payload from an upstream package repo merge to main:

json
{
  "package": "@tanstack/query",
  "sha": "abc123",
  "changed_files": ["docs/framework/react/guides/queries.md", "src/query.ts"]
}

Step 1 — Match changed files to skills

Read all SKILL.md files under packages/intent/skills/. For each skill, extract sources from the frontmatter.

Match changed_files from the webhook against sources entries across all skills. Source references use the format Owner/repo:relative-path and support glob patterns.

A skill is a candidate if any of its sources entries match a changed file.

If no skills match, exit silently.

Using intent stale

There is no separate sync script — intent stale [dir] [--json] is the real, existing staleness signal (see docs/cli/intent-stale.md). It is read-only: it reports drift, it does not write anything. For a given library:

bash
intent stale packages/query --json

This reports:

  • Library version drift (library_version in a skill's frontmatter vs the currently published version), classified major/minor/patch.
  • Missing source SHAs recorded in that package's skills/sync-state.json (a conservative signal — it flags gaps in the stored SHA record, not actual remote content differences; see the doc's Notes section).

intent stale does not classify "needs regeneration" vs "version bump only" the way a dedicated sync tool might — that classification is this skill's own job, done in Step 2 below using the actual source diff, not intent stale's output alone.


Step 2 — Evaluate each candidate

For each matched skill:

  1. Read the current SKILL.md content
  2. Fetch the file diff from the triggering commit in the source repo
  3. Classify the change:
ClassificationCriteriaAction
No impactDiff is typo fix, comment change, test-only, or internal refactor with no API/behavior changeSkip — no update needed
Version bump onlyDiff changes version numbers, dependency ranges, or metadata but no documented behaviorBump library_version in frontmatter
Content updateDiff changes API shape, behavior, defaults, types, or patterns that the skill documentsRewrite affected sections
Breaking changeDiff removes, renames, or fundamentally changes an API the skill documentsRewrite + add old pattern as Common Mistake

Two-pass classification

Pass 1 — Quick scan: Read the diff summary (files changed, insertions, deletions). Identify which skill sections could be affected.

Pass 2 — Detail evaluation: For each potentially affected section, read the full diff hunks and compare against the skill content. Determine if the change actually affects what the skill documents.

This prevents over-updating. A 200-line diff to a source file may only affect one line of one skill, or none at all.


Step 3 — Update stale skills

For skills classified as needing content updates:

  1. Load the generate-skill meta skill
  2. Provide it with:
    • The existing SKILL.md content
    • The source diff
    • The current source documentation (fetch the updated file)
  3. Use regeneration mode (surgical update, not full rewrite)
  4. Validate the updated skill against all checks

For version bump only:

There is no write-capable script for this. Edit library_version directly in each affected skill's frontmatter, then update the recorded SHA(s) for that library in its skills/sync-state.json (see Step 5) to reflect the new synced state.


Step 4 — Check cross-skill references

After updating skills in Step 3, check for cross-skill staleness:

  1. For each skill that was updated, read its name
  2. Scan all other skills for requires entries or sources that reference the updated skill
  3. For each skill that references an updated skill, evaluate whether the update makes the referencing skill stale or inconsistent
  4. If stale → update using the same process as Step 3
  5. If not → skip

This cascade is bounded to one level. Skills that reference a second-order dependency are not automatically re-checked.


Step 5 — Mark skills as synced

There is no write-capable script for this either. After updating a skill, edit that library's skills/sync-state.json directly: update library_version and the affected skill's skills[skillName].sources_sha map with the new source file SHA(s) from the commit that triggered this run. (That is the real current shape read by intent stale — it has no separate tree-generator SHA or sync-timestamp field, despite what an earlier version of this doc implied.)


Step 6 — Open PRs

For each skill (or group of skills) that was updated:

  1. Create branch: skill-update/<skill-name>-<short-sha>
  2. Commit updated SKILL.md file(s)
  3. Open PR with structured body

PR format

Title: skill: update <skill-name> (<package>@<short-sha>)

Body:

markdown
### Triggered by

Changes to: <list of source files that matched>

### What changed in the source

<summary of the diff — 2–3 sentences max>

### What changed in the skill

<summary of skill edits — which sections were updated and why>

### Cross-skill impact

<list any downstream skills checked; note if PRs were opened for them>

### Review checklist

- [ ] Skill content is accurate
- [ ] Code examples are complete and copy-pasteable
- [ ] No other skills need corresponding updates
- [ ] Under 500 lines

Grouping PRs

  • If multiple skills for the same library are affected by the same commit, group them in a single PR
  • If a cross-skill update is needed (Step 4), open a separate PR for the downstream skill to keep review scopes clean
  • Never mix skills from different libraries in the same PR

No-op behavior

Exit silently (no PR, no notification, no issue) when ANY of these are true:

  • No changed files match any skill's sources
  • All matched diffs are classified as "no impact" in Step 2
  • intent stale reports all skills up-to-date (All skills up-to-date, per docs/cli/intent-stale.md)

Operational notes

GitHub API usage

This skill (not a separate script) uses the gh CLI directly for GitHub API access — fetching source diffs in Step 2 and opening PRs in Step 6. It requires:

  • gh CLI installed and authenticated
  • Read access to upstream TanStack package repos (query, router, db, form, table)
  • Write access to the intent repo for creating branches and PRs

Rate limiting

When checking multiple libraries or many source files, this makes one API call per source file per skill during Step 2's diff fetch. For large batches, the GitHub API rate limit (5000 requests/hour for authenticated users) may apply. There is no batching or response caching in place — if this becomes an issue, add caching around the diff-fetch step.

Manual triggering

Maintainers can run the read-only staleness signal manually, outside the webhook-triggered flow:

bash
# Check a specific library
intent stale packages/db

# JSON output
intent stale packages/db --json

This only reports drift (version drift, missing source SHAs) — it does not update sync-state.json or open PRs; those remain Step 5 and Step 6 of this skill's own workflow, done manually as described above.


Constraints

RuleDetail
Silent when nothing changesNo noise — exit cleanly if no updates needed
Surgical updates over full rewritesOnly change sections affected by the diff
One cascade levelCross-skill checks go one level deep, not recursive
PRs scoped to one libraryNever mix libraries in a single PR
Version bumps are separate from content updatesA version-only bump doesn't require regeneration
Commit messages include co-authorInclude the coding agent's co-author tag

Câu hỏi thường gặp

Kỹ năng AI Skill Staleness Check làm được gì?

Use when reviewing an upstream TanStack webhook payload containing the package, commit SHA, and changed files for stale skill guidance. For ordinary library changes or Intent review reports, use generate-skill instead.

Vì sao nên dùng Skill Staleness Check trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Skill Staleness Check là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Skill Staleness Check trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/TanStack/intent/tree/main/packages/intent/meta/skill-staleness-check. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Skill Staleness Check?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Skill Staleness Check với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Skill Staleness Check với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Skill Staleness Check có miễn phí không?

Có. Kỹ năng này được TanStack phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇