nullish-undefined-null

nullish-undefined-null is a skill for Claude Code from ncaq/konoka. It costs 36 tokens per session (639 once invoked), scanned A, original, Apache-2.0.

A TypeScript and JavaScript coding rule that prefers undefined over null when either can represent a missing value. It recommends == null when one check should accept both undefined and null.

In plain words
What is it for?
Use it when writing or reviewing TypeScript or JavaScript code that handles optional or missing values, especially in comparisons and API boundaries.
Why use it?
It reduces inconsistent handling of absent values and avoids repeating separate checks for null and undefined. Existing APIs where null has a defined meaning remain exceptions.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the web-tasuke plugin — 17 skills shipped together

Good fit Use it when writing or reviewing TypeScript or JavaScript code that handles optional or missing values, especially in comparisons and API boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ncaq/konoka/nullish-undefined-null
View source ↗ ncaq/konoka
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 ncaq/konoka --skill nullish-undefined-null
Clone the repo
git clone --depth 1 https://github.com/ncaq/konoka

Made for: Claude Code.

Or install web-tasuke, the plugin that ships this one along with the rest of its 17 skills.

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 nullish-undefined-null

README.md
[![agentmods](https://agentmods.dev/badge/skills/ncaq/konoka/nullish-undefined-null/github.svg)](https://agentmods.dev/skills/ncaq/konoka/nullish-undefined-null)
Your own site
<a href="https://agentmods.dev/skills/ncaq/konoka/nullish-undefined-null"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/nullish-undefined-null/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 nullish-undefined-null

Your own site · 80×15
<a href="https://agentmods.dev/skills/ncaq/konoka/nullish-undefined-null"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/nullish-undefined-null.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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.00036 $0.00639
Opus 5 $0.00018 $0.00319
Sonnet 5 $0.00007 $0.00128
Haiku 4.5 $0.00004 $0.00064

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

Security

Grade A, and why

nullish-undefined-null 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 4d 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.

plugins/web-tasuke/skills/nullish-undefined-null/SKILL.md · 64 lines

What it actually says

nullよりundefinedを優先して使う

TypeScript/JavaScriptにおいてundefinednullが両方あるのは単なる歴史的経緯による混乱なので、 なるべくundefinedだけを使うようにしてください。

nullを使って良い場合

特別なnull

既存のAPIでnullに意味がある場合は許容されます。

例えばReactのコンポーネントが返却するnullは何も描画しないことを表します。

そのように様々な既存のライブラリで、 nullが自然に発生する箇所ではnullのまま扱っても構いません。 undefinedに変換するのは必須ではありません。 「選択の余地がある場合にundefinedを優先する」というポリシーであり、 nullを逐一排除するものではありません。

nullishとの比較には == null / != null を使う

Nullish valueであるundefinednullとの比較には、 基本的には、 厳密等価演算子(=== undefined, !== undefined, === null, !== null)ではなく、 抽象等価演算子 (== null, != null) を使ってください。

== nullundefinednullの両方にマッチするため、 どちらか一方のチェック漏れを防げます。

これらを厳密に分ける必要はほぼないはずです。 厳密に分けているインターフェイスはあまり良くないのですが、 既存のインターフェイスがそうであれば仕方がありません。

ESLintのeqeqeqルールがalwaysに設定されていると== nullが警告されますが、 現代の一般的なESLint設定ではsmartオプションが有効になっており、 nullとの比較に==/!=を使うケースは許容されるため基本的に問題ありません。

// 良い例
if (value == null) {
  /* value is null or undefined */
}
if (value != null) {
  /* value is neither null nor undefined */
}

// 避ける例
if (value === null || value === undefined) {
  /* 冗長 */
}
if (value !== null && value !== undefined) {
  /* 冗長 */
}
if (value === null) {
  /* undefined を見落とす可能性がある */
}
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. 4d ago First seen · 64 lines · 36 tokens per session scan A 03310694a7c1

Subscribe to this mod's changes

nullish-undefined-null is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 639 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-09-05.

Related

Other skills, from other repositories

better-auth

Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.

secondsky/claude-skills · 53 tokens

bun-bundler

This skill should be used when the user asks about "bun build", "Bun.build", "bundling with Bun", "code splitting", "tree shaking", "minification", "sourcemaps", "bundle optimization", "esbuild alternative", "building for production", "bundling TypeScript", "bundling for browser", "bundling for Node", or…

secondsky/claude-skills · 90 tokens

bun-hot-reloading

Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Covers watch mode, hot mode, and HTTP server reload.

secondsky/claude-skills · 42 tokens

language-typescript

TypeScript conventions with generic guidance plus a monorepo-specific addendum.

developer239/michals-opencode-cookbook · 19 tokens

frontend-ai-guide

Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.

shinpr/claude-code-workflows · 41 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens