Logo vun Skill Staleness Check

Skill Staleness Check

Organisatioun
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.

Iwwersiicht

EditeurTanStack
Repositoryintent
Skill-Nummskill-staleness-check
Stären
355
Forks
26
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum TanStack op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Skill Staleness Check an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/TanStack/intent/tree/main/packages/intent/meta/skill-staleness-check
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Skill Staleness Check an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Skill Staleness Check automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Skill Staleness Check net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Skill Staleness Check op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Skill Staleness Check besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Skill Staleness Check an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/TanStack/intent/tree/main/packages/intent/meta/skill-staleness-check an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Skill Staleness Check benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Skill Staleness Check benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Skill Staleness Check domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Skill Staleness Check gratis?

Jo. De Skill gëtt vum TanStack ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇