From waggle
Waggle provider plugin development guide and interface contract. Defines the required SKILL.md sections, data shapes, naming conventions, and compliance checklist for building a waggle provider plugin. Trigger on: "provider contract", "provider interface", "create provider plugin", "new provider", "provider compliance", "how to build a provider".
npx claudepluginhub kazukinagata/waggle --plugin waggleThis skill uses the workspace's default tool permissions.
This document defines the interface contract for building a waggle provider plugin. A provider plugin connects waggle to a specific data store (Notion, SQLite, Turso, etc.) by implementing a standardized set of operations and SKILL.md sections.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
This document defines the interface contract for building a waggle provider plugin. A provider plugin connects waggle to a specific data store (Notion, SQLite, Turso, etc.) by implementing a standardized set of operations and SKILL.md sections.
Waggle core discovers provider skills differently depending on the runtime environment:
<available_skills> system prompt block. Each skill is listed with <name>, <description>, and <location>.installed_plugins.json. The plugin's .claude-plugin/plugin.json declares the plugin metadata.In all environments, waggle core loads the provider SKILL.md via the Skill tool. ${CLAUDE_PLUGIN_ROOT} in the provider SKILL.md is automatically resolved to the provider plugin's absolute path.
Follow these naming rules strictly:
| Entity | Pattern | Example |
|---|---|---|
| Plugin directory | waggle-{provider} | waggle-sqlite |
| Setup skill | {provider}-setup | sqlite-setup |
| Provider skill | {provider}-provider | sqlite-provider |
| Plugin name in plugin.json | waggle-{provider} | waggle-sqlite |
user-invocable: true.user-invocable: false.waggle-{provider}/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata (name, version, description)
├── skills/
│ ├── {provider}-setup/
│ │ ├── SKILL.md # user-invocable: true — initial setup wizard
│ │ └── references/ # Setup-specific references (optional)
│ └── {provider}-provider/
│ ├── SKILL.md # user-invocable: false — all provider operations
│ └── scripts/ # Bash scripts using SCRIPT_DIR pattern
└── CLAUDE.md # Project-level instructions
The {provider}-provider/SKILL.md file MUST contain all of the following sections with exact headings. Waggle core skills reference these sections by name.
Retrieve provider configuration (database IDs, constants) and populate the headless_config session variable.
Requirements:
TURSO_URL and TURSO_AUTH_TOKEN environment variables.~/.waggle/waggle.db) or WAGGLE_SQLITE_PATH env var.~/.waggle/config.json MAY be used as a local cache for faster startup, but MUST NOT be the only source.{provider}-setup skill, then stop.The headless_config object MUST include at minimum:
tasksDatabaseId (or equivalent identifier for the tasks data source)Optional fields:
teamsDatabaseIdintakeLogDatabaseIdVerify that all 15 Core fields exist in the backing store. See references/task-schema.md for the complete field list.
Requirements:
Implement Create, Read, Update, and Delete for tasks.
Requirements:
Filter and sort tasks, returning results in the standard query output format.
Requirements:
{ "results": [Task, Task, ...] } — see references/query-output-format.md.Resolve the current user, team membership, and org members.
Requirements:
{ id, name, email }. Provide a fallback using $USER env var if the provider API is unavailable.teamsDatabaseId, determine which teams the current user belongs to. Handle single-team, multi-team (ask user), and no-team cases.{ id, name, email }[]. Provide a fallback (empty array) if unavailable.Push task data to the local view server after any task mutation.
Requirements:
TasksResponse shape: { "tasks": [...], "updatedAt": "<ISO timestamp>" }.http://localhost:3456/api/data.Define the instructions injected into dispatch prompts so dispatched agents know how to report results. See references/dispatch-completion-template.md for the full specification.
Requirements:
${CLAUDE_PLUGIN_ROOT}.Define error categories and retry behavior.
Requirements:
Bash scripts in the provider plugin MUST follow these rules:
Use the SCRIPT_DIR pattern for self-referencing paths:
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
MUST NOT use ${CLAUDE_PLUGIN_ROOT} in bash scripts. This variable is only available in the SKILL.md instruction context, not in shell execution.
SKILL.md instructions MUST reference their own scripts using ${CLAUDE_SKILL_DIR}:
bash ${CLAUDE_SKILL_DIR}/scripts/query-tasks.sh ...
${CLAUDE_SKILL_DIR} is the official Claude Code runtime variable for the current skill's own directory; it resolves correctly regardless of working directory and is robust to skill rename/relocation. Never hardcode ${CLAUDE_PLUGIN_ROOT}/skills/<this-skill-name>/... — that pattern silently breaks on rename.
Scripts that call other scripts within the plugin MUST use SCRIPT_DIR-relative paths:
source "${SCRIPT_DIR}/helpers.sh"
All provider configuration is stored via environment variables in ~/.claude/settings.json (under the env field). The legacy ~/.waggle/config.json file is deprecated — use the health-checking skill to migrate.
| Provider | Env Vars | Fallback |
|---|---|---|
| Notion | WAGGLE_NOTION_TASKS_DB_ID, WAGGLE_NOTION_TEAMS_DB_ID (optional cache) | "Waggle Config" Notion page search |
| Turso | TURSO_URL, TURSO_AUTH_TOKEN (required) | None |
| SQLite | WAGGLE_SQLITE_DB_PATH (optional, default: ~/.waggle/tasks.db) | Default path |
Not all providers support all execution environments:
| Provider | CLI | Claude Desktop | Cowork | Notes |
|---|---|---|---|---|
| Notion | Yes | Yes | Yes | Requires Notion MCP tools |
| Turso | Yes | Yes | No | Requires TURSO_URL and TURSO_AUTH_TOKEN env vars; Cowork requires Desktop Extension (not yet available) |
| SQLite | Yes | Yes | No | Local file — not accessible from Cowork |
See references/environment-detection.md for runtime environment detection logic.
Use this checklist to verify a provider plugin meets all requirements before release:
waggle-{provider} naming.claude-plugin/plugin.json exists with correct metadataskills/{provider}-setup/SKILL.md with user-invocable: trueskills/{provider}-provider/SKILL.md with user-invocable: false{ "results": [...] } output format${CLAUDE_PLUGIN_ROOT}SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" pattern${CLAUDE_PLUGIN_ROOT} in bash scripts${CLAUDE_PLUGIN_ROOT} for script references{ "results": [Task, ...] } formatid and all populated field valuesTasksResponse shape