dhpk-js-static-check-strategy

dhpk-js-static-check-strategy is a skill for Claude Code from hmj1026/dhpk. It costs 186 tokens per session (2,114 once invoked), scanned A, original, MIT.

A rollout guide for adding TypeScript-style checking to legacy JavaScript files one file at a time. It keeps ESLint globals, TypeScript declarations, and JSDoc type information aligned.

In plain words
What is it for?
Use it when adding @ts-check to legacy JavaScript, updating global declarations, improving JSDoc types, or verifying each change with tests.
Why use it?
It reduces errors caused by old global variables and lets teams exclude files that cannot yet pass checking without hiding the rollout process.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dhpk plugin — 65 skills, 31 commands, 37 agents, 3 hooks shipped together

Good fit Use it when adding @ts-check to legacy JavaScript, updating global declarations, improving JSDoc types, or verifying each change with tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmj1026/dhpk/dhpk-js-static-check-strategy
View source ↗ hmj1026/dhpk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hmj1026/dhpk --skill dhpk-js-static-check-strategy
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 37 agents, 3 hooks.

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 dhpk-js-static-check-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-js-static-check-strategy/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/dhpk-js-static-check-strategy)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-js-static-check-strategy"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-js-static-check-strategy/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 dhpk-js-static-check-strategy

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-js-static-check-strategy"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-js-static-check-strategy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,114 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.00186 $0.02114
Opus 5 $0.00093 $0.01057
Sonnet 5 $0.00037 $0.00423
Haiku 4.5 $0.00019 $0.00211

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

Security

Grade A, and why

dhpk-js-static-check-strategy 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 6d 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.

generated/claude-profiles/compat-v1/package/skills/dhpk-js-static-check-strategy/SKILL.md · 184 lines

How it starts

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

JS static-check strategy — progressive rollout playbook

Always-loaded SSOT rule: modules/js/references/static-checks.md.

This skill carries the long-form execution detail so the always-loaded rule stays short. Load this when you are actually doing the rollout work.

Legacy-globals — three-list sync

When a leaf introduces a new global, all three lists must update together (no automatic derivation — three independent maintained files):

  1. eslint.config.js <projectName>LegacyGlobals constant — readonly / writable annotation. SSOT for no-undef.
  2. <frontend-root>/<project>-ambient.d.tsdeclare var X: any; block. SSOT for tsc --noEmit bare-identifier resolution.
  3. <frontend-root>/jsdoc-globals.js@typedef (only when the default any from the ambient .d.ts is too loose and a real shape adds value).

A leaf PR that misses any of the three surfaces later as no-undef or TS2304. CI catches drift after the fact; reviewers should still verify three-way sync proactively.

// @ts-check progressive strategy

  • One leaf per PR: add // @ts-check + clean up the JSDoc + run the unit / contract tests to confirm no regression.
  • Track the rollout against your mechanical-extraction cadence (Stage A, B, C…). Each stage produces a batch of leaves ready for type-check enablement.
  • A stuck leaf can land // @ts-nocheck with a TODO comment as a transitional state — but every transitional file should have a tracked exit PR.

Measure progress with the line-anchored grep (anything looser is gameable — see the trap below):

# Step 1 — strict opt-in (exit gate: this list must end up empty)
find <frontend-root> -maxdepth 1 -name '*.js' -exec \
    grep -lE '^[[:space:]]*//[[:space:]]*@ts-check[[:space:]]*$' {} \;

# Step 2 — files still on `// @ts-nocheck` (governance indicator;
# should trend toward zero, but some files may be permanent exclusions —
# see classification below).
find <frontend-root> -maxdepth 1 -name '*.js' -exec \
    grep -lE '^[[:space:]]*//[[:space:]]*@ts-nocheck' {} \;

Read the full file on GitHub · 184 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. 6d ago First seen · 184 lines · 186 tokens per session scan A 029d73e2a705

Subscribe to this mod's changes

dhpk-js-static-check-strategy is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 186 tokens to every session and 2,114 once invoked, about $0.0009 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-09-05.