smithery/copilot-ld

libindex

libindex - Base index class for storage-backed data. Index class provides JSONL storage operations and filtering logic. BufferedIndex adds high-volume write support with periodic flushing. Use for building custom indexes, implementing data stores, and managing persistent collections.

Installation

$ npx skills add smithery/copilot-ld --skill libindex

Also in this package

Other skills from smithery/copilot-ld.

npx skills add smithery/copilot-ld

Browse all from smithery/copilot-ld

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,444 B
  • docs SUMMARY.md 300 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

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.