Agent skill

remindb Integration Tests

by radimsem in radimsem/remindb

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.

MITAuto-check passedTesting & QA

Install remindb Integration Tests

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

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

GitHub CLI
$ gh skill install radimsem/remindb add-integration-test --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-integration-test .claude/skills/add-integration-test && 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-integration-test
GitHub stars
129
Token cost
~1.8k tokens
SKILL.md length
585 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Adding an end-to-end test scenario to remindb
  • SKILL.md covers Where it lands, The two helpers, Direct-API template and MCP template, plus 5 more sections
  • Calls go
  • Simulating an agent session across compile, search and fetch

What it does

For the remindb repository, this skill says where end-to-end tests belong and how to write them. Integration tests live at the repo root in package remindb_test and exercise a real store, compiler and MCP transport against fixtures under testdata. Two flavors exist: direct API tests in integration_test.go for the compiler, query, store and transformer, and MCP tests in mcp_integration_test.go that call tools the way an agent would.

Two helpers replace raw setup: OpenTestDB opens an in-memory SQLite store with migrations applied, and mcptest.NewEnv wires a server and an in-memory transport and exposes CallTool and TextContent. Templates mirror existing tests, TestOpenClawAgentWorkflow for the direct flavor and TestMcp_OpenClawAgent for MCP, where each numbered step is one tool call. A new fixture directory is added only when existing ones do not fit, and cleanup is automatic.

When your agent uses it

  • Adding an end-to-end test scenario to remindb
  • Simulating an agent session across compile, search and fetch
  • Testing MCP tools end to end, such as searching after compiling memory
  • Choosing between a direct API test and an MCP test for a new case

Example prompts

  • “Add an integration test that compiles the openclaw fixture and checks the search ranking through MCP.”
  • “Write a direct API test that walks the full pipeline stage by stage.”
  • “Should this new test go in integration_test.go or mcp_integration_test.go?”

Requirements

  • A checkout of the remindb repository
  • Go, to run the test suite

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

    Shell commands in SKILL.md call:

    • 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

remindb Integration Tests loads about 1.8k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 585 words of instructions outside code blocks.

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

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). 585 words, ~1,843 tokens.

Download SKILL.mdSave it as .claude/skills/add-integration-test/SKILL.md (or your agent's skills folder).
name
add-integration-test
description
Use when adding an end-to-end test scenario to remindb — symptoms include "test the full pipeline", "simulate an agent session", "verify compile→search→fetch flow", "test MCP tools end-to-end", or any task that creates a new `Test*` in `integration_test.go` / `mcp_integration_test.go` at the repo root. Distinct from per-package unit tests in `pkg/*/`.

Add an integration test

Integration tests live at the repo root in package remindb_test, not inside a pkg/. They exercise the full pipeline — a real store, real compiler, real MCP transport — against fixtures under testdata/. There are two flavors:

FlavorFileUse when
Direct APIintegration_test.goTesting compiler / query / store / transformer end-to-end without MCP
MCPmcp_integration_test.goTesting the user-visible tool surface as an agent would call it

Pick the flavor by the question you're asking. "Does the compiler emit the right shape from this fixture?" → direct. "Does an agent calling MemorySearch after MemoryCompile see the expected ranking?" → MCP.

Where it lands

FileWhat changes
integration_test.go or mcp_integration_test.goAdd a Test<Scenario> function
testdata/<scenario-name>/New fixture directory (only if existing fixtures don't match)

Fixture directories are flat namespaces (testdata/openclaw/, testdata/<your-scenario>/). One fixture set per scenario family; reuse aggressively.

The two helpers

Both files lean on package helpers — never reach for raw store.Open or raw mcp.NewServer in a test.

  • internal/testutil.OpenTestDB(t) — opens an in-memory :memory: SQLite store with migrations applied; auto-cleans on t.Cleanup. Use for direct-API tests.
  • internal/mcptest.NewEnv(t) — opens the test DB, wires a default-config server + tracker, connects an in-memory MCP transport, and exposes env.CallTool(t, name, args) and env.TextContent(t, result). Use for MCP tests.

Direct-API template

Mirror integration_test.go:TestOpenClawAgentWorkflow. Walk a real workflow stage by stage, log progress, assert at each stage:

go
package remindb_test

import (
    "context"
    "strings"
    "testing"

    "github.com/radimsem/remindb/internal/testutil"
    "github.com/radimsem/remindb/pkg/compiler"
    "github.com/radimsem/remindb/pkg/query"
)

func TestNewScenario(t *testing.T) {
    st := testutil.OpenTestDB(t)
    ctx := context.Background()

    // Stage 1: compile fixtures.
    result, err := compiler.CompileDir(ctx, st, "testdata/<scenario>", "<source-id>")
    if err != nil {
        t.Fatalf("CompileDir: %v", err)
    }
    if result.Added == 0 {
        t.Fatal("expected nodes from fixtures")
    }
    t.Logf("compiled: +%d ~%d -%d (%d total)", result.Added, result.Modified, result.Removed, result.Total)

    // Stage 2: query.
    engine := query.NewEngine(st)
    res, err := engine.Search(ctx, "<query>", 1000)
    if err != nil {
        t.Fatalf("Search: %v", err)
    }
    if len(res.Nodes) == 0 {
        t.Fatal("expected search hits")
    }
}

MCP template

Mirror mcp_integration_test.go:TestMcp_OpenClawAgent. The numbered-step structure is convention — each step represents one tool call an agent would make:

go
func TestMcp_NewScenario(t *testing.T) {
    env := mcptest.NewEnv(t)
    dir, _ := filepath.Abs("testdata/<scenario>")

    // 1. Compile.
    compileResult := env.CallTool(t, "MemoryCompile", map[string]any{
        "path":    dir,
        "message": "<scenario>-init",
    })
    text := env.TextContent(t, compileResult)
    if !strings.Contains(text, "compiled") {
        t.Fatalf("unexpected compile result: %s", text)
    }

    // 2. Search.
    searchResult := env.CallTool(t, "MemorySearch", map[string]any{
        "query":  "<keyword list>",
        "budget": 1000,
    })
    searchText := env.TextContent(t, searchResult)
    if searchText == "no results" {
        t.Fatal("expected results")
    }

    // 3. Further stages...
}

env.CallTool already calls t.Fatalf on transport / tool errors and logs both request and response preview to t.Log. You only assert the behavioral expectations.

Cleanup is automatic

testutil.OpenTestDB(t) and mcptest.NewEnv(t) both register t.Cleanup handlers — DB is dropped, MCP session is closed, in-memory transports are torn down. Don't write your own cleanup unless you allocate something outside these helpers (e.g., a t.TempDir() you wrote files into — that's also auto-cleaned by the testing framework, no manual work needed).

Fixtures under testdata/

testdata/ is the Go-recognized name; go test excludes it from build/lint. Place a fixture directory under it per scenario, with the same file extensions the parser recognizes (.md, .yaml, .json, .jsonl, .toon).

Name fixtures by concept (testdata/openclaw/, testdata/multi-format/), not by test (testdata/test_compile_1/). Multiple tests can share a fixture; one-test-per-fixture is anti-pattern.

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

Quick reference

Direct API:
1. integration_test.go              (Test<Scenario> with testutil.OpenTestDB)
2. testdata/<scenario>/             (fixtures matching parser-supported extensions)
3. go test ./... -run Test<Scenario>

MCP:
1. mcp_integration_test.go          (TestMcp_<Scenario> with mcptest.NewEnv)
2. testdata/<scenario>/             (same fixture rules)
3. go test ./... -run TestMcp_<Scenario>

Common mistakes

  • Reaching for store.Open directly. Use testutil.OpenTestDB(t) — it applies migrations, registers cleanup, and matches the assertion style of every other test. Direct store.Open skips migrations and gives you an empty schema.
  • Setting up the MCP transport by hand. pkg/mcp/server_test.go does this for unit-testing the server itself; integration tests should use mcptest.NewEnv(t). The handcrafted form has 6 lines of ceremony (NewInMemoryTransports, srv.Connect, mcp.NewClient, client.Connect, t.Cleanup for both, SetLoggingLevel if needed) — NewEnv collapses all of it.
  • Asserting on log output. env.CallTool logs request/response previews via t.Log for debugging. They're not part of the test contract; assert on env.TextContent(t, result) instead.
  • One fixture per test. Reuse testdata/openclaw/ for any scenario where its files are appropriate. New fixture directories are for genuinely new content shapes, not new test names.
  • Hardcoding the absolute path to testdata/. Use filepath.Abs("testdata/<scenario>") like mcp_integration_test.go:14 — MemoryCompile requires absolute paths.
  • Forgetting package remindb_test. Integration tests are external (use _test suffix on the package). They exercise the public API of multiple packages — they're not allowed to import unexported names.

Cross-references

  • .claude/rules/go-concise.md — early returns, error handling style, named function over closure-as-var
  • .claude/skills/add-mcp-tool/SKILL.md — when adding a tool, also extend mcp_integration_test.go with a scenario that exercises it through env.CallTool
  • .claude/skills/add-store-query/SKILL.md — when adding a query, the unit test goes in pkg/store/store_test.go; an integration test only makes sense if it changes a multi-package workflow

© 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-integration-test of radimsem/remindb.

Open the folder on GitHubat commit 977b31c

Compare with similar skills

remindb Integration Tests 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.

remindb Integration Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
remindb Integration Tests this skillradimsem/remindb129—~1.8kAutomated safety check: PassMIT
Qwen Code E2E TestingQwenLM/qwen-code28k—~2.1kAutomated safety check: PassApache-2.0
Go Redis Client Test Runnerredis/go-redis22k—~786Automated safety check: PassBSD-2-Clause
Adding LLM MCP ToolsTriliumNext/Trilium38k—~2.5kAutomated safety check: PassAGPL-3.0
Glance TestDebugBase/glance156—~827Automated safety check: PassMIT
Edt MCP Build TestDitriXNew/EDT-MCP295—~1.4kAutomated safety check: PassAGPL-3.0

Similar skills

  • Qwen Code E2E Testing

    QwenLM/qwen-code

    Guides end-to-end testing of the Qwen Code CLI in headless mode with real model calls, MCP test servers and inspection of raw API traffic.

    28k GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Explains how to run go-redis tests: the Docker Compose stack, make targets, focusing a single Ginkgo spec, the e2e suite and the version environment variables.

    22k GitHub stars~786 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Adding LLM MCP Tools

    TriliumNext/Trilium

    A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…

    38k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Glance Test

    DebugBase/glance

    Run E2E browser tests on any web application using Glance MCP.

    156 GitHub stars~827 tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Edt MCP Build Test

    DitriXNew/EDT-MCP

    How to build the EDT-MCP Eclipse plugin (Tycho/Maven) and run its unit and e2e tests, plus the test conventions for this repo.

    295 GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Tauri Dev MCP Bridge

    jerrywu001/cc-sessions-viewer

    Launches a Tauri app's dev build with the MCP bridge compiled in, so an agent can take screenshots, read the live DOM, click real buttons and call real backend commands.

    394 GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check: warnings

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
  • 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
  • Add a remindb Parser

    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.

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

Categories

Questions about remindb Integration Tests

What does remindb Integration Tests do?

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. For the remindb repository, this skill says where end-to-end tests belong and how to write them. Integration tests live at the repo root in package remindb_test and exercise a real store, compiler and MCP transport against fixtures under testdata.

When should I use remindb Integration Tests?

remindb Integration Tests fits situations like: adding an end-to-end test scenario to remindb; simulating an agent session across compile, search and fetch; testing MCP tools end to end, such as searching after compiling memory; choosing between a direct API test and an MCP test for a new case.

How do I install remindb Integration Tests in Claude Code?

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

How do I install remindb Integration Tests in Codex?

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

Can I use remindb Integration Tests 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-integration-test -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-integration-test, .gemini/skills/add-integration-test, .github/skills/add-integration-test and .opencode/skills/add-integration-test in your project.

What does remindb Integration Tests need to run?

Going by SKILL.md and its folder, remindb Integration Tests needs the command-line tools its instructions call (go). Our summary lists: A checkout of the remindb repository; Go, to run the test suite.

Does remindb Integration Tests 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 remindb Integration Tests 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 remindb Integration Tests use?

remindb Integration Tests 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 remindb Integration Tests use?

About 1.8k tokens (SKILL.md is roughly 7.4k 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 remindb Integration Tests?

Skills that share tags, products or a category with remindb Integration Tests: Qwen Code E2E Testing (QwenLM/qwen-code, 28k stars), Go Redis Client Test Runner (redis/go-redis, 22k stars), Adding LLM MCP Tools (TriliumNext/Trilium, 38k stars) and Glance Test (DebugBase/glance, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains remindb Integration Tests?

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.