Claude-skill-registry libindex

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/libindex" ~/.claude/skills/majiayu000-claude-skill-registry-libindex && rm -rf "$T"
manifest: skills/data/libindex/SKILL.md
source content

libindex Skill

When to Use

  • Building custom storage-backed indexes
  • Implementing JSONL-based data stores
  • Creating searchable collections with filtering
  • Managing high-volume write workloads

Key Concepts

Index: Base class providing read/write/filter operations on JSONL files. Subclass to create domain-specific indexes.

BufferedIndex: Extends Index with write buffering for high-throughput scenarios, flushing periodically.

Usage Patterns

Pattern 1: Create custom index

import { Index } from "@copilot-ld/libindex";

class UserIndex extends Index {
  constructor(storage) {
    super(storage, "users");
  }

  async findByEmail(email) {
    return this.filter((user) => user.email === email);
  }
}

Pattern 2: High-volume writes

import { BufferedIndex } from "@copilot-ld/libindex";

const index = new BufferedIndex(storage, "logs", { flushInterval: 5000 });
await index.append(logEntry); // Buffered
await index.flush(); // Force flush

Integration

Base class for VectorIndex, TraceIndex, ResourceIndex and other domain indexes.