diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..4b3405b --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,112 @@ +{ + "name": "dontbesilent-skills", + "owner": { + "name": "dontbesilent2025" + }, + "metadata": { + "description": "dontbesilent 商业诊断工具箱 — 从 12,307 条推文中提炼方法论,做成 10 个 Claude Code skill", + "version": "2.3.0" + }, + "plugins": [ + { + "name": "dbs", + "description": "dontbesilent 商业工具箱主入口。根据你的问题自动路由到最合适的诊断工具。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "business-diagnostics", + "keywords": ["business", "router", "diagnosis", "toolkit", "chinese"], + "skills": ["./skills/dbs"] + }, + { + "name": "dbs-diagnosis", + "description": "dontbesilent 商业模式诊断。两种模式:问诊(消解你的问题)和体检(拆解你的商业模式)。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "business-diagnostics", + "keywords": ["business-model", "diagnosis", "consulting", "problem-dissolution", "chinese"], + "skills": ["./skills/dbs-diagnosis"] + }, + { + "name": "dbs-benchmark", + "description": "dontbesilent 对标分析。用五重过滤法帮你找到值得模仿的对标,排除一切关于「我」的噪音。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "business-diagnostics", + "keywords": ["benchmark", "competitive-analysis", "imitation", "strategy", "chinese"], + "skills": ["./skills/dbs-benchmark"] + }, + { + "name": "dbs-action", + "description": "dontbesilent 执行力诊断。用阿德勒心理学框架诊断你「知道该做什么但就是不做」的真正原因。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "business-diagnostics", + "keywords": ["psychology", "execution", "procrastination", "adler", "chinese"], + "skills": ["./skills/dbs-action"] + }, + { + "name": "dbs-content", + "description": "dontbesilent 内容创作诊断。选题通过后,诊断怎么把这个选题做成好内容。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "content-creation", + "keywords": ["content", "creation", "copywriting", "social-media", "chinese"], + "skills": ["./skills/dbs-content"] + }, + { + "name": "dbs-hook", + "description": "dontbesilent 短视频开头优化。诊断开头问题 + 生成优化方案。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "content-creation", + "keywords": ["video", "hook", "opening", "short-video", "douyin", "chinese"], + "skills": ["./skills/dbs-hook"] + }, + { + "name": "dbs-xhs-title", + "description": "小红书标题公式工具。从 75 个验证过的爆款公式中,帮你挑对的、用对的、理解为什么用这个。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "content-creation", + "keywords": ["xiaohongshu", "RED", "title", "formula", "social-media", "chinese"], + "skills": ["./skills/dbs-xhs-title"] + }, + { + "name": "dbs-deconstruct", + "description": "dontbesilent 概念拆解。用维特根斯坦 + 奥派经济学的方法,把模糊的商业概念拆到原子级别。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "thinking-tools", + "keywords": ["wittgenstein", "concepts", "deconstruction", "philosophy", "chinese"], + "skills": ["./skills/dbs-deconstruct"] + }, + { + "name": "chatroom-austrian", + "description": "哈耶克 × 米塞斯 × Claude 三人对话。奥派经济学视角的多角色讨论。", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "thinking-tools", + "keywords": ["austrian-economics", "hayek", "mises", "debate", "philosophy", "chinese"], + "skills": ["./skills/chatroom-austrian"] + }, + { + "name": "dbskill-upgrade", + "description": "升级 dbskill 到最新版本", + "source": "./", + "strict": false, + "version": "1.0.0", + "category": "utilities", + "keywords": ["upgrade", "update", "version"], + "skills": ["./skills/dbskill-upgrade"] + } + ] +} diff --git a/README.md b/README.md index afd116f..4142f16 100644 --- a/README.md +++ b/README.md @@ -86,14 +86,19 @@ Skill 之间会自动推荐下一步。比如: ## 安装 +![demo](demo.gif) + +**推荐:Claude Code 插件市场(一键安装,自动更新)** + ```bash -npx skills add dontbesilent2025/dbskill +claude plugin marketplace add dontbesilent2025/dbskill +claude plugin install dbs@dontbesilent-skills ``` -或手动: +**其他方式:** ```bash -git clone https://github.com/dontbesilent2025/dbskill.git /tmp/dbskill && cp -r /tmp/dbskill/skills/dbs* ~/.claude/skills/ && rm -rf /tmp/dbskill +npx skills add dontbesilent2025/dbskill ``` 安装后在 Claude Code 中输入 `/dbs` 即可。 diff --git a/demo.gif b/demo.gif new file mode 100644 index 0000000..d605b99 Binary files /dev/null and b/demo.gif differ diff --git a/scripts/demo.tape b/scripts/demo.tape new file mode 100644 index 0000000..3639099 --- /dev/null +++ b/scripts/demo.tape @@ -0,0 +1,54 @@ +# dbskill plugin marketplace demo +# Self-bootstrapped: cleans previous state, creates filter wrapper, records clean demo +# MARKETPLACE_REPO placeholder is patched by record-demo.sh before recording + +Output demo.gif +Set Theme "Catppuccin Latte" +Set FontSize 24 +Set Width 1400 +Set Height 600 +Set Padding 20 +Set TypingSpeed 10ms +Set Shell zsh + +# Bootstrap (hidden): clean previous state, install output filter, clear screen +Hide +Type "claude plugin uninstall dbs-diagnosis@dontbesilent-skills 2>/dev/null; claude plugin uninstall dbs@dontbesilent-skills 2>/dev/null; claude plugin marketplace remove dontbesilent-skills 2>/dev/null" +Enter +Sleep 4s +# Base64 wrapper: claude() { command claude "$@" 2>&1 | grep -v -E "SSH|cache|Clon|Refresh|timeout"; } +# Filters noisy git-clone progress lines. Base64 needed because VHS cannot parse $ and \" in Type. +Type "echo Y2xhdWRlKCkgeyBjb21tYW5kIGNsYXVkZSAiJEAiIDI+JjEgfCBncmVwIC12IC1FICJTU0h8Y2FjaGV8Q2xvbnxSZWZyZXNofHRpbWVvdXQiOyB9Cg== | base64 -d > /tmp/cw.sh && source /tmp/cw.sh" +Enter +Sleep 500ms +Type "clear" +Enter +Sleep 500ms +Show + +# Add marketplace +Type "claude plugin marketplace add MARKETPLACE_REPO" +Enter +Sleep 10s +Enter +Sleep 300ms + +# Install skills +Type "claude plugin install dbs-diagnosis@dontbesilent-skills" +Enter +Sleep 3s +Enter +Sleep 300ms + +Type "claude plugin install dbs@dontbesilent-skills" +Enter +Sleep 3s +Enter +Sleep 300ms + +# Verify +Type "claude plugin list | grep -A2 dbs" +Enter +Sleep 2s + +Sleep 1s diff --git a/scripts/record-demo.sh b/scripts/record-demo.sh new file mode 100755 index 0000000..6346ad3 --- /dev/null +++ b/scripts/record-demo.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +# Record dbskill plugin marketplace demo GIF +# Usage: ./scripts/record-demo.sh +# Output: demo.gif in repo root +# +# Auto-detects marketplace repo: uses upstream (dontbesilent2025/dbskill) if its +# default branch has .claude-plugin/marketplace.json, otherwise falls back to +# origin fork. After upstream PR merge, re-running this script will automatically +# produce a demo pointing at the canonical repo. +# +# Prerequisites: brew install charmbracelet/tap/vhs gifsicle + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" +TAPE_TEMPLATE="$SCRIPT_DIR/demo.tape" +TAPE_RENDERED="/tmp/demo_rendered.tape" +OUTPUT_GIF="$REPO_DIR/demo.gif" + +for cmd in vhs gifsicle; do + if ! command -v "$cmd" &>/dev/null; then + echo "Error: $cmd not found." + echo "Install: brew install charmbracelet/tap/vhs gifsicle" + exit 1 + fi +done + +# Extract owner/repo from a git remote URL (strips .git suffix and host prefix) +parse_remote() { + git -C "$REPO_DIR" remote get-url "$1" 2>/dev/null \ + | sed 's|.*github.com[:/]||; s|\.git$||' +} + +# Detect marketplace repo: prefer upstream if it has marketplace.json, else origin +detect_marketplace_repo() { + local upstream origin + upstream=$(parse_remote upstream) || true + origin=$(parse_remote origin) || true + + if [[ -n "$upstream" ]] && gh api "repos/$upstream/contents/.claude-plugin/marketplace.json" &>/dev/null; then + echo "$upstream" + return + fi + if [[ -n "$origin" ]]; then + echo "$origin" + return + fi + echo "dontbesilent2025/dbskill" +} + +# Remove previously installed demo plugins (safe to call when nothing is installed) +cleanup_plugins() { + claude plugin uninstall dbs-diagnosis@dontbesilent-skills 2>/dev/null || true + claude plugin uninstall dbs@dontbesilent-skills 2>/dev/null || true + claude plugin marketplace remove dontbesilent-skills 2>/dev/null || true +} + +MARKETPLACE_REPO=$(detect_marketplace_repo) +echo "Using marketplace repo: $MARKETPLACE_REPO" + +# Render tape template: replace MARKETPLACE_REPO placeholder with detected repo +sed "s|MARKETPLACE_REPO|$MARKETPLACE_REPO|g" "$TAPE_TEMPLATE" > "$TAPE_RENDERED" + +echo "Cleaning previous plugin state..." +cleanup_plugins + +echo "Recording demo..." +rm -f "$OUTPUT_GIF" +(cd "$REPO_DIR" && vhs "$TAPE_RENDERED") + +echo "Speeding up 2x..." +cp "$OUTPUT_GIF" /tmp/demo_raw.gif +gifsicle -d2 /tmp/demo_raw.gif "#0-" > "$OUTPUT_GIF" + +echo "Cleaning up..." +cleanup_plugins +rm -f /tmp/demo_raw.gif "$TAPE_RENDERED" /tmp/cw.sh + +SIZE=$(ls -lh "$OUTPUT_GIF" | awk '{print $5}') +echo "Done: $OUTPUT_GIF ($SIZE)"