smithery/copilot-ld

libchat

libchat - Chat web components library. ChatClient provides composed client for authentication, API communication, and state management. ChatDrawerElement and ChatPageElement are custom elements for embedding chat interfaces. Framework-agnostic using Web Components standard. Use for building chat UIs, embedding conversational AI in websites, and creating dedicated chat pages.

Installation

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

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,665 B
  • docs SUMMARY.md 392 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

libchat Skill

When to Use

  • Embedding chat interfaces in web applications
  • Building dedicated chat page experiences
  • Adding conversational AI to existing websites
  • Creating custom chat UI with authentication

Key Concepts

ChatClient: Composed client managing auth state, API communication, and conversation persistence via localStorage.

ChatDrawerElement: Collapsible drawer component for unobtrusive chat integration on any page.

ChatPageElement: Full-page chat component for dedicated chat experiences.

Usage Patterns

Pattern 1: Embed chat drawer

import { ChatClient, ChatDrawerElement } from "@copilot-ld/libchat";

const client = new ChatClient({
  chatUrl: "/web/api/chat",
  auth: { url: "http://localhost:9999", anonKey: "key" },
});

document.querySelector("chat-drawer").client = client;

Pattern 2: Full-page chat

<chat-page data-name="Assistant"></chat-page>
<script type="module">
  import { ChatClient, ChatPageElement } from "@copilot-ld/libchat";
  const client = new ChatClient({ chatUrl: "/api" });
  document.querySelector("chat-page").client = client;
</script>

Integration

Used by the UI extension. Communicates with Web extension chat API.