event-store-adapter-js: Skill for Claude Code

.agents/skills/parse-dont-validate/SKILL.md

parse-dont-validate is a skill for Claude Code, Codex from j5ik2o/event-store-adapter-js. It costs 185 tokens per session (1,422 once invoked), scanned A, a copy of parse-dont-validate, Apache-2.0.

A code-review and design guide for turning loose validation checks into typed values that carry the checked result. It applies the “parse, don’t validate” idea across several programming languages.

In plain words
What is it for?
Use it when reviewing, writing, or refactoring validation code, such as non-empty lists, duplicate-key checks, or boolean checks that should return a safer typed value.
Why use it?
It reduces repeated checks and makes invalid states harder to use by keeping validation results in the type system.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is j5ik2o/event-store-adapter-js's own configuration. It tells Claude Code and Codex how to work on event-store-adapter-js itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything event-store-adapter-js configures →

Reuse

Borrowing it

Nothing to install: this file belongs to j5ik2o/event-store-adapter-js. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/j5ik2o/event-store-adapter-js/main/.agents/skills/parse-dont-validate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/j5ik2o/event-store-adapter-js

Made for: Claude Code, Codex.

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 parse-dont-validate

README.md
[![agentmods](https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/parse-dont-validate/github.svg)](https://agentmods.dev/skills/j5ik2o/event-store-adapter-js/parse-dont-validate)
Your own site
<a href="https://agentmods.dev/skills/j5ik2o/event-store-adapter-js/parse-dont-validate"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/parse-dont-validate/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 parse-dont-validate

Your own site · 80×15
<a href="https://agentmods.dev/skills/j5ik2o/event-store-adapter-js/parse-dont-validate"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/parse-dont-validate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 185 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,422 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 100% copy Near-identical to another mod 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.00185 $0.01422
Opus 5.5 $0.00074 $0.00569
Sonnet 5.5 $0.00037 $0.00284
Haiku 4.5 $0.00018 $0.00142

Measured 1mo ago against content hash 0c1c7a9d2918, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

parse-dont-validate 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 1mo 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.

Origin

This is a copy

100% identical to parse-dont-validate — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/parse-dont-validate/SKILL.md · 155 lines

How it starts

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

Parse, Don't Validate

情報を捨てるvalidationから、情報を保持するparsingへ変換する。

核心原則

チェック結果を捨てずに型で保持する。

アプローチ 戻り値 情報 問題
Validate () / void / bool 捨てる 再チェック必要、型が保証しない
Parse 型付き値 保持 一度のチェックで済む、型が保証

判断フロー

チェック関数を書こうとしている
    ↓
戻り値は何か?
    ├─ () / void / bool → Validateパターン(問題あり)
    └─ 新しい型 → Parseパターン(推奨)

アンチパターン検出

以下のパターンを見つけたら変換を検討:

❌ validate*() → ()
❌ check*() → bool
❌ assert*() → ()(表明目的以外)
❌ is*() → bool(分岐後に同じ値を使う場合)
❌ "should never happen" コメント
❌ case None/null の after 正常ケース

変換パターン

1. NonEmpty変換

// ❌ Validate: 情報を捨てる
function validateNonEmpty(list: string[]): void {
  if (list.length === 0) throw new Error("list cannot be empty");
}

// ✅ Parse: 情報を保持する
type NonEmptyArray<T> = [T, ...T[]];
function parseNonEmpty<T>(list: T[]): NonEmptyArray<T> {
  if (list.length === 0) throw new Error("list cannot be empty");
  return list as NonEmptyArray<T>;
}

2. 重複キー検出

// ❌ Validate: チェックして捨てる
function checkNoDuplicateKeys(pairs: [string, unknown][]): void {
  const seen = new Set<string>();
  for (const [key] of pairs) {
    if (seen.has(key)) throw new Error(`duplicate key: ${key}`);
    seen.add(key);
  }
}

// ✅ Parse: Mapに変換して保持
function parseToMap(pairs: [string, unknown][]): Map<string, unknown> {
  const result = new Map<string, unknown>();
  for (const [key, value] of pairs) {
    if (result.has(key)) throw new Error(`duplicate key: ${key}`);
    result.set(key, value);
  }
  return result;
}

3. Smart Constructor

// ❌ 外部から直接構築可能
pub struct Email(String);

// ✅ Parse: Smart constructorで検証済みを保証
mod email {
    pub struct Email(String);  // private field

    impl Email {
        pub fn parse(s: &str) -> Result<Self, ParseError> {
            if s.contains('@') && s.len() > 3 {
                Ok(Email(s.to_string()))
            } else {
                Err(ParseError::InvalidEmail)
            }
        }

        pub fn as_str(&self) -> &str { &self.0 }
    }
}

Read the full file on GitHub · 155 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 155 lines · 185 tokens per session scan A 0c1c7a9d2918

Subscribe to this mod's changes

parse-dont-validate is a skill published in the GitHub repository j5ik2o/event-store-adapter-js (25 stars, last pushed yesterday), licensed Apache-2.0. It adds 185 tokens to every session and 1,422 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to parse-dont-validate, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

cratis-engineering-csharp-conventions

Use when writing or reviewing C# house style in a Cratis repository, including naming, formatting and service lifetimes. Not for product API behavior or specification authoring.

Cratis/AI · 43 tokens

code-review-architecture

Architecture-focused code review covering hexagonal boundary violations, DDD anti-patterns, CQRS misuse, and microservices coupling issues. Applied in addition to the language-specific review skill when architecture markers are detected. Invoked when reviewing hexagonal architectures, DDD patterns, or microservices…

soulcodex/agentic · 63 tokens

cratis-chronicle-client-elixir

Use when adding Chronicle to an Elixir OTP application, defining its event structs or handling client append outcomes. Not for JVM or Node.js clients; use the corresponding Chronicle client sibling.

Cratis/AI · 45 tokens

cratis-chronicle-client-typescript

Use when connecting a standalone Node.js process to Chronicle or diagnosing its decorators, discovery or client lifecycle. Not for React generated proxies or another language's client.

Cratis/AI · 40 tokens

cratis-fundamentals-concept

Use when a C# or TypeScript domain value needs a distinct type, a concept generates a value or an identity addresses a Chronicle stream. Not for enums, DTO-only values, Go concepts or event migration.

Cratis/AI · 51 tokens

cratis-chronicle-client-dotnet

Use when connecting a standalone .NET console, worker or service directly to Chronicle or diagnosing its client lifecycle. Not for Arc integration, kernel implementation or another language's client.

Cratis/AI · 43 tokens