add-parser

A development guide for adding support for a new file format to remindb’s parser. A parser turns file contents into structured nodes that the rest of the application can use.

In plain words
What is it for?
Use it when adding support for formats such as TOML, CSV, or XML, including extension routing, parser tests, and fuzz-test inputs.
Why use it?
It shows all the code, tests, fuzz checks, and optional sample files needed so a new format is not only recognized but also reliably processed.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/radimsem/remindb/add-parser
Any agent
npx skills add radimsem/remindb --skill add-parser
Clone the repo
git clone --depth 1 https://github.com/radimsem/remindb

Made for: Claude Code, Codex.

Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00071 $0.01623
Opus 5 $0.00036 $0.00812
Sonnet 5 $0.00014 $0.00325
Haiku 4.5 $0.00007 $0.00162

Measured 2d ago against content hash e935e40b1456, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-parser 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 2d 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.

.claude/skills/add-parser/SKILL.md · 113 lines

How it starts

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

Add a parser for a new file format

remindb's pkg/parser/ package turns raw source bytes into a slice of *ContextNode trees. Adding a format means routing one new extension through ParseBytes and emitting nodes that match the conventions every other format already follows.

Where the format lands

Five files. Skipping any one of them ships a half-wired format.

File What changes
pkg/parser/<format>.go New file — the parser itself
pkg/parser/parser.go Add a case to the ParseBytes switch
pkg/parser/<format>_test.go New file — table tests over fixture strings
pkg/parser/fuzz_test.go Add 2–4 f.Add(...) seeds to FuzzParseBytes
pkg/parser/testdata/ (optional) Drop a sample file if tests are easier with a real fixture

The parser file shape

Mirror pkg/parser/yaml.go exactly. The pattern is from .claude/rules/go-concise.md §4 ("Namespace prefix-sharing helpers via a struct"): an empty struct provides the namespace, a free function is the entry point, methods drop the prefix.

package parser

import "fmt"

type TomlParser struct{}

func parseToml(path string, data []byte) ([]*ContextNode, error) {
    return TomlParser{}.parse(path, data)
}

func (p TomlParser) parse(path string, data []byte) ([]*ContextNode, error) {
    // ... format-specific decode ...
    if err != nil {
        return nil, fmt.Errorf("failed to parse: toml %s: %w", path, err)
    }
    return []*ContextNode{buildNode(path, "", root, 1)}, nil
}

Initialism rule (memory + go-concise.md): TomlParser not TOMLParser, JsonParser not JSONParser. Pascal-case file-format initialisms.

Error message rule (go-concise.md §5): action errors take a failed to <verb>: prefix and wrap with %w. Validation errors carry no prefix.

Abort vs. skip on bad content: by default a parse failure aborts the whole-workspace compile (the errgroup fails fast). If a malformed file of your format should instead be skipped with a warning — like JSON config that routinely carries comments (#171) — wrap the decode failure with the ErrMalformed sentinel (fmt.Errorf("%w: <format> %s: %v", ErrMalformed, path, err)) instead of the failed to <verb>: form. pkg/compiler/compiler.go already skips ErrMalformed exactly as it skips ErrUnsupportedExt; no compiler change needed. Note this drops the loud error for genuine corruption, so reserve it for formats where unparseable input is expected noise, not a signal.

Read the full file on GitHub · 113 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. 2d ago First seen · 113 lines · 71 tokens per session scan A e935e40b1456

Subscribe to this mod's changes

add-parser is a skill published in the GitHub repository radimsem/remindb (125 stars, last pushed 29d ago), licensed MIT. It adds 71 tokens to every session and 1,623 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

coding

编写并运行 Python 代码,验证脚本逻辑和输出。.

bojieli/ai-agent-book · 18 tokens

kayba-stage-6-hitl

Human-In-The-Loop gate that presents the action plan with full context, collects an informed approval/modification/rejection decision, and records the outcome. Trigger when the user says "run stage 6", "HITL review", "approve action plan", or when invoked by the kayba-pipeline orchestrator. Requires eval/actionplan.md…

kayba-ai/agentic-context-engine · 87 tokens

kayba-stage-7-fixer

Implement the approved fixes from the action plan and log all changes. Trigger when the user says "run stage 7", "implement fixes", "apply action plan", or when invoked by the kayba-pipeline orchestrator. Requires eval/actionplan.md to exist.

kayba-ai/agentic-context-engine · 61 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

ws-ckpt

工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。.

alibaba/anolisa · 115 tokens

food-order

Reorder previous Foodora orders, preview cart contents, and track delivery ETA/status with ordercli. Use when the user wants to reorder food, check delivery status, or browse recent Foodora order history. Never confirm an order without explicit user approval.

Bitterbot-AI/bitterbot-desktop · 53 tokens