oplink-mcp: Command for Claude Code

.cursor/commands/research-better-lib.md

research-better-lib is a command for Claude Code, Cursor from regenrek/oplink-mcp. It costs 0 tokens per session (1,464 once invoked), scanned A, original, MIT.

A reusable research template for comparing a baseline JavaScript or TypeScript library with newer alternatives. It guides you to define the use case, performance targets, quality measures, features, and selection criteria.

In plain words
What is it for?
Use it to evaluate faster or smaller libraries for search and similar tasks, compare candidate packages, and document why one option is preferable.
Why use it?
It prevents library choices based only on vague impressions by making the comparison criteria explicit. It also gives the search a consistent structure.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is regenrek/oplink-mcp's own configuration. It tells Claude Code and Cursor how to work on oplink-mcp 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 oplink-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to regenrek/oplink-mcp. 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/regenrek/oplink-mcp/main/.cursor/commands/research-better-lib.md
Clone the repo
git clone --depth 1 https://github.com/regenrek/oplink-mcp

Made for: Claude Code, Cursor.

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 research-better-lib

README.md
[![agentmods](https://agentmods.dev/badge/commands/regenrek/oplink-mcp/research-better-lib.svg)](https://agentmods.dev/commands/regenrek/oplink-mcp/research-better-lib)
Your own site
<a href="https://agentmods.dev/commands/regenrek/oplink-mcp/research-better-lib"><img src="https://agentmods.dev/badge/commands/regenrek/oplink-mcp/research-better-lib.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,464 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.00000 $0.01464
Opus 5 $0.00000 $0.00732
Sonnet 5 $0.00000 $0.00293
Haiku 4.5 $0.00000 $0.00146

Measured 8d ago against content hash 71b78d8bc9eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

research-better-lib 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 8d 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.

.cursor/commands/research-better-lib.md · 102 lines

How it starts

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

Research Template: Find a Modern, Faster Library than a Baseline

Use this template to evaluate alternatives to any baseline library. Replace placeholders like <BASELINE_LIB>, <DOMAIN/USE‑CASE>, <CANDIDATE_LIBS> before posting or running the search.


Problem statement

  • Goal: Find a modern, faster JavaScript/TypeScript library for <DOMAIN/USE‑CASE> that outperforms <BASELINE_LIB> in latency and bundle size while maintaining or improving relevance/quality.
  • Context: Runs in Node 18+/browser, ESM‑first, TS types, no native deps; list size 5k–50k items (adjust to your scale); return top‑N suggestions per query.

Success metrics (make these explicit)

  • P95 latency/query: target <1 ms at 10k items; <5 ms at 50k items (Node laptop). Adjust as needed.
  • Bundle size: <25 KB min+gzip for core (no heavy optional modules).
  • Quality: NDCG@5 (or task‑specific metric) ≥ <BASELINE_LIB> on the same corpus (≥1.0x).
  • Features: multi‑field weights, typo tolerance, diacritics, highlight ranges, incremental updates.
  • DX: ESM, TS types, active maintenance (<6 months since last release), permissive license.

Scope and exclusions

  • In‑scope: in‑memory, client/Node libraries (no servers, no external indexes).
  • Out‑of‑scope: hosted/search servers unless used only for comparison; heavy NLP stacks unless used for query expansion (phase 2).

Concrete research question to post/search

  • “Which modern JS/TS libraries outperform <BASELINE_LIB> for <DOMAIN/USE‑CASE> at 10k–50k items, with ESM, TS types, and <25 KB gzip bundle? Compare <CANDIDATE_LIBS> by p95 latency, relevance (NDCG@5 or equivalent), bundle size, multi‑field weighting, and maintenance.”

Search queries (copy/paste)

  • benchmark “<BASELINE_LIB>” vs <CANDIDATE_A> vs <CANDIDATE_B> js performance
  • “<CANDIDATE_A> vs <BASELINE_LIB>” latency relevance “typescript” “esm”
  • “<CANDIDATE_B>” library benchmark fuzzy search (adjust for your domain)
  • <CANDIDATE_C> benchmark bundle size “diacritics” “highlight”
  • <CANDIDATE_D> bm25 javascript benchmark “multi field”
  • <CANDIDATE_E> js benchmark in‑memory search

Read the full file on GitHub · 102 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. 8d ago First seen · 102 lines · 0 tokens per session scan A 71b78d8bc9eb

Subscribe to this mod's changes

research-better-lib is a command published in the GitHub repository regenrek/oplink-mcp (10 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,464 tokens. 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-31.