Agent skill

Add a remindb Parser

by radimsem in radimsem/remindb

Walks through adding a new file format to remindb's Go parser package: the parser file, the ParseBytes case, table tests and fuzz seeds.

MITAuto-check passedDevelopment

Install Add a remindb Parser

skills CLI
$ npx skills add radimsem/remindb --skill add-parser -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install radimsem/remindb add-parser --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-parser .claude/skills/add-parser && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-parser
GitHub stars
129
Token cost
~1.6k tokens
SKILL.md length
617 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Walks through adding a new file format to remindb's Go parser package: the parser file, the ParseBytes case, table tests and fuzz seeds.

  • Supporting a new file extension such as .toml or .xml in remindb
  • SKILL.md covers Where the format lands, The parser file shape, The switch entry and The unit test, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Registering a new extension in the ParseBytes switch

What it does

This skill covers extending remindb's pkg/parser package, which turns raw source bytes into trees of ContextNode values. Adding a format means routing one new extension through ParseBytes and emitting nodes that follow the conventions of the existing formats. It names five places that must change: the new parser file, a new case in the ParseBytes switch in parser.go, a table-driven test file, a few seeds for FuzzParseBytes in fuzz_test.go, and optionally a sample file under testdata.

The parser file should mirror pkg/parser/yaml.go, using an empty struct as a namespace with a free function as the entry point. Naming follows the repository's rules, for example TomlParser rather than TOMLParser, and action errors start with a failed-to prefix and wrap with %w. By default a parse failure aborts the whole-workspace compile. Wrapping the error with the ErrMalformed sentinel makes the compiler skip the file with a warning instead, which suits formats where unparseable input is routine.

When your agent uses it

  • Supporting a new file extension such as .toml or .xml in remindb
  • Registering a new extension in the ParseBytes switch
  • Deciding whether a malformed file should abort the compile or be skipped with a warning
  • Writing tests and fuzz seeds for a new parser

Example prompts

  • “Add support for .toml files to remindb's parser package.”
  • “Wire a CSV parser into ParseBytes and add table tests and fuzz seeds.”
  • “Make malformed JSON config files get skipped with a warning instead of aborting the compile.”

Requirements

  • A checkout of the remindb repository and a Go toolchain

What it can do on your machine

Read from SKILL.md and the folder at commit 977b31c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add a remindb Parser loads about 1.6k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 617 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from radimsem/remindb at commit 977b31c, republished under its MIT licence (© radimsem). 617 words, ~1,586 tokens.

Download SKILL.mdSave it as .claude/skills/add-parser/SKILL.md (or your agent's skills folder).
name
add-parser
description
Use when adding a new file format to remindb's parser package — symptoms include "support .toml/.csv/.xml files", "ingest a new file type", "register an extension in ParseBytes", "wire up a new ContextNode source", or any task that touches `pkg/parser/` to extend supported source formats.

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.

FileWhat changes
pkg/parser/<format>.goNew file — the parser itself
pkg/parser/parser.goAdd a case to the ParseBytes switch
pkg/parser/<format>_test.goNew file — table tests over fixture strings
pkg/parser/fuzz_test.goAdd 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.

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

The switch entry

Open pkg/parser/parser.go, find ParseBytes, add the case in the alphabetic position you'd expect a reader to scan:

go
switch ext {
case ".md", ".markdown":
    return parseMarkdown(path, data)
case ".toml":
    return parseToml(path, data)         // <-- new line
case ".yml", ".yaml":
    return parseYaml(path, data)
// ...
default:
    return nil, fmt.Errorf("%w: %q", ErrUnsupportedExt, ext)
}

Multi-extension formats list every variant in one case line (see .md/.markdown, .yml/.yaml, .jsonl/.ndjson).

The unit test

pkg/parser/yaml_test.go is the cleanest template. Table-driven, exercises the happy path plus at least one each of: empty input, malformed input, deeply nested input, and the format's specific edge case (BOM, frontmatter delimiter, mixed-type collection, etc.).

Show full SKILL.md (272 more words)Show less

The fuzz seed corpus — do not skip this

pkg/parser/fuzz_test.go defines FuzzParseBytes, which scripts/fuzz.sh auto-discovers. Add seeds covering your format's shape variety:

go
f.Add("data.toml", []byte("title = \"Hello\"\n[section]\nkey = 1"))
f.Add("data.toml", []byte(""))                    // empty
f.Add("data.toml", []byte("[unclosed"))           // malformed
f.Add("DATA.TOML", []byte("title = \"upper\""))   // extension case

The fuzz invariant is "must never panic regardless of input." If your parser deref's a nil from the decoder or indexes past a slice, fuzz will find it. Run scripts/fuzz.sh 30s locally before committing to confirm the new seeds don't regress.

Quick reference

1. Create pkg/parser/<format>.go        (empty struct + parseXxx + (p) parse)
2. Wire pkg/parser/parser.go            (one case in ParseBytes)
3. Create pkg/parser/<format>_test.go   (table tests)
4. Add seeds to pkg/parser/fuzz_test.go (FuzzParseBytes f.Add lines)
5. go test ./pkg/parser/...             (must pass)
6. scripts/fuzz.sh 30s                  (must pass, no panics)

Common mistakes

  • Forgetting fuzz seeds. The fuzz test will still run and pass, but it'll never exercise the new format. The fuzz step is what catches "decoder returns nil and parser deref's it" before it ships.
  • Returning (nil, nil) for empty input but the test asserts len(nodes) == 0. Both work since len(nil) == 0, but be explicit in the test about which one your parser actually returns. yaml.go short-circuits with nil, nil when the document is empty — mirror its style if your decoder gives you an obvious "no content" signal.
  • Setting SourceFile to something other than the path arg. Downstream code (search ranking, MemoryFetch ancestor walks) keys on it. Pass path straight through to buildNode.
  • Shadowing the package error sentinels. Use ErrInvalidUTF8, ErrUnsupportedExt, and ErrMalformed (skip-on-bad-content) from parser.go; don't redefine them per format.
  • Stutter naming. parser.NewTomlParser() is wrong; the empty struct is exposed bare as TomlParser and constructed with TomlParser{}. See go-concise.md §7.

Cross-references

  • .claude/rules/go-concise.md — error message format, naming, struct-with-methods pattern
  • .claude/rules/git-versioning.md — commit each of (parser, switch, tests, fuzz seeds) as one logical chunk; feat(parser): add toml support covers all five files in one commit since they share the idea
  • .claude/skills/add-fuzz-target/SKILL.md — for the broader fuzz discipline if you're adding a brand-new fuzz target rather than seeding an existing one

© radimsem, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/add-parser of radimsem/remindb.

Open the folder on GitHubat commit 977b31c

Compare with similar skills

Add a remindb Parser next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add a remindb Parser compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add a remindb Parser this skillradimsem/remindb129—~1.6kAutomated safety check: PassMIT
Code Reviewyaklang/yakit7.8k—~1.4kAutomated safety check: NotesAGPL-3.0
Go Development Guidelinesjumppad-labs/jumppad263—~1.5kAutomated safety check: PassMPL-2.0
Golang Testingunxed/f42411 repos~4.5kAutomated safety check: PassMIT
Go Helpershepherdjerred/monorepo112—~1.7kAutomated safety check: PassGPL-3.0
Golang Testingantoniopaya22/go-rest-template1729 repos~4.2kAutomated safety check: PassNone

Similar skills

  • Code Review

    yaklang/yakit

    对 Yakit 仓库的代码改动做规范化 code review:按代码逻辑、TS 定义、UI 引用与 Props、CSS 样式、依赖版本、配置项六个维度审查,检查测试用例缺失,强制执行 tsc 类型检查与 vitest 测试验证,输出「结果汇总 / 明细解释 / 合并结论」三块报告,经用户确认后写入文件。当用户要求 review、审查、评审代码改动,或在提交、合并、提 PR…

    7.8k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check: notes
  • Go Development Guidelines

    jumppad-labs/jumppad

    Sets idiomatic Go conventions with a test-first workflow, using testify/require for assertions and mockery for mocks, for new features, packages and refactors.

    263 GitHub stars~1.5k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration…

    241 GitHub starsUsed in 1 repo~4.5k tokens
    Testing & QAAuto-check passed
  • Go Helper

    shepherdjerred/monorepo

    Current Go development guidance for modules, toolchains, workspaces, testing, fuzzing, concurrency, profiling, security, and Go tooling.

    112 GitHub stars~1.7k tokensUpdated today
    SecurityAuto-check passed
  • Golang Testing

    antoniopaya22/go-rest-template

    Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.

    172 GitHub starsUsed in 9 repos~4.2k tokens
    Testing & QAAuto-check passed
  • Writing gotest Tests

    mvrahden/go-test

    Guides writing, fixing and migrating tests in Go repositories that use the gotest suite framework, including version differences and CI setup.

    129 GitHub stars~4.4k tokensUpdated 3 days ago
    Testing & QAAuto-check passed

More from radimsem/remindb

All 11 skills in this repo
  • remindb Memory Writer

    radimsem/remindb

    Guides an agent writing to a remindb memory server: structured notes go in as files parsed into a node tree, single text facts go in through MemoryWrite.

    129 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • remindb Read Path

    radimsem/remindb

    Covers the read-side tools of the remindb MCP server, a SQLite-backed agent memory, for orienting, searching, resyncing and tracing relations.

    129 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Adds a new row to remindb's token-savings benchmark table by writing a scenario function that measures the naive shell-tool token cost against the remindb tool-call cost for the same task.

    129 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Adds a new Go fuzz target to remindb following its seed-corpus discipline: one target per logical surface, discovered automatically by its FuzzXxx function name.

    129 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Explains how to add an end-to-end test scenario to remindb, choosing between a direct API test and an MCP test and using the shared helpers and fixtures.

    129 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Checklist for adding a new Memory-prefixed tool to remindb's Go MCP server: tool file, registration, test, skill docs, plus the locking and logging rules.

    129 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Add a remindb Parser

What does Add a remindb Parser do?

Walks through adding a new file format to remindb's Go parser package: the parser file, the ParseBytes case, table tests and fuzz seeds. This skill covers extending remindb's pkg/parser package, which turns raw source bytes into trees of ContextNode values. Adding a format means routing one new extension through ParseBytes and emitting nodes that follow the conventions of the existing formats.

When should I use Add a remindb Parser?

Add a remindb Parser fits situations like: supporting a new file extension such as .toml or .xml in remindb; registering a new extension in the ParseBytes switch; deciding whether a malformed file should abort the compile or be skipped with a warning; writing tests and fuzz seeds for a new parser.

How do I install Add a remindb Parser in Claude Code?

Run `npx skills add radimsem/remindb --skill add-parser -a claude-code`. Or copy the skill folder (.claude/skills/add-parser in radimsem/remindb) into .claude/skills/add-parser in your project. Claude Code loads it when a task matches its description.

How do I install Add a remindb Parser in Codex?

Run `npx skills add radimsem/remindb --skill add-parser -a codex`. Or copy the skill folder (.claude/skills/add-parser in radimsem/remindb) into .agents/skills/add-parser in your project. Codex loads it when a task matches its description.

Can I use Add a remindb Parser in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add radimsem/remindb --skill add-parser -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-parser, .gemini/skills/add-parser, .github/skills/add-parser and .opencode/skills/add-parser in your project.

What does Add a remindb Parser need to run?

SKILL.md names no scripts, command-line tools or credentials: Add a remindb Parser is instructions for the agent only. Our summary lists: A checkout of the remindb repository and a Go toolchain.

Does Add a remindb Parser access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add a remindb Parser safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add a remindb Parser use?

Add a remindb Parser is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add a remindb Parser use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add a remindb Parser?

Skills that share tags, products or a category with Add a remindb Parser: Code Review (yaklang/yakit, 7.8k stars), Go Development Guidelines (jumppad-labs/jumppad, 263 stars), Golang Testing (unxed/f4, 241 stars) and Go Helper (shepherdjerred/monorepo, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add a remindb Parser?

radimsem (a GitHub user) maintains it in radimsem/remindb, which has 129 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 3, 2026.

Source: radimsem/remindb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.