From 48bcd0f33f29d4a2bed0cb30a9735b808db277f5 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:42:08 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 15 +++++++++ README.md | 3 ++ commands/logs.md | 69 ++++++++++++++++++++++++++++++++++++++ hooks/hooks.json | 4 +++ plugin.lock.json | 49 +++++++++++++++++++++++++++ 5 files changed, 140 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/logs.md create mode 100644 hooks/hooks.json create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..6415639 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "kit", + "description": "Kit plugin for Claude Code", + "version": "1.0.0", + "author": { + "name": "Nathan Vale", + "email": "hi@nathanvale.com" + }, + "commands": [ + "./commands" + ], + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..269c04c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# kit + +Kit plugin for Claude Code diff --git a/commands/logs.md b/commands/logs.md new file mode 100644 index 0000000..12cf541 --- /dev/null +++ b/commands/logs.md @@ -0,0 +1,69 @@ +--- +description: View Kit plugin logs for debugging +argument-hint: [lines?] [correlation-id?] +--- + +# Kit Logs Command + +View and filter JSONL logs from the Kit MCP server. + +## Instructions + +1. Log file location: `~/.kit/logs/kit.jsonl` +2. Default: Show last 20 log entries +3. With `lines` argument: Show last N entries +4. With `correlation-id`: Filter by specific operation + +## Usage Examples + +### View recent logs +``` +/kit:logs +``` +Shows the last 20 log entries formatted for readability. + +### View more logs +``` +/kit:logs 50 +``` +Shows the last 50 log entries. + +### Filter by correlation ID +``` +/kit:logs a1b2c3d4 +``` +Shows all log entries for a specific operation (useful for tracing failures). + +## Log Format + +Each log entry contains: +- `@timestamp` - When the event occurred +- `@category` - Log category (kit, kit.grep, kit.semantic, kit.symbols) +- `@level` - Log level (debug, info, warn, error) +- `@message` - Human-readable message +- `cid` - Correlation ID for tracing operations +- Additional context fields (query, pattern, matchCount, durationMs, etc.) + +## Implementation + +Read the log file and format entries: + +```bash +# Default: last 20 lines +tail -20 ~/.kit/logs/kit.jsonl | jq '.' + +# Filter by correlation ID +jq 'select(.cid == "CORRELATION_ID")' ~/.kit/logs/kit.jsonl + +# Show only errors +jq 'select(.["@level"] == "error")' ~/.kit/logs/kit.jsonl +``` + +Present logs in a readable table or formatted list showing: +- Timestamp +- Level (with appropriate indicator) +- Category +- Message +- Key context (cid, matchCount, durationMs if present) + +If the log file doesn't exist, inform the user that no logs have been generated yet. diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..5c8a5ce --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,4 @@ +{ + "description": "Hooks for kit plugin", + "hooks": {} +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..f268225 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,49 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:nathanvale/side-quest-marketplace:plugins/kit", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "9f8f1984bc29bd7ac5d1a1fde6d355742996b776", + "treeHash": "701bfdb3e01cc47b3bdb67e7a578b9a0c688ab977bdfffac2633ae69d8880f71", + "generatedAt": "2025-11-28T10:27:16.539153Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "kit", + "description": "Kit plugin for Claude Code", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "6a50b3050702d8b228696f6a954da0a1cde65088f9283307cccaad3417c0ae4b" + }, + { + "path": "hooks/hooks.json", + "sha256": "004827cc955d2c6660360a9ff2df829faeca27ec84cb0e449c0bfb9514e541f9" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "8293b53e6e1f5a0bee165cc97cb70643a099d090aa6ce97e65bccd988c0db429" + }, + { + "path": "commands/logs.md", + "sha256": "6a3830644920c7f61fc6c3775bd9d46495d35a7027a2fe7713eb5cc68f7c1a3d" + } + ], + "dirSha256": "701bfdb3e01cc47b3bdb67e7a578b9a0c688ab977bdfffac2633ae69d8880f71" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file