像一个运维工程师一样辅助用户安装和管理claudian
将以下命令发送给 AI 助手,AI 将获取安装索引后完成安装:
curl …/skills/claudian-manager/download,然后按照返回的 Markdown 文件清单完成 claudian-manager 的安装Automatically install, update, and troubleshoot the Claudian Obsidian plugin. This skill solves problems directly rather than giving instructions — only guide the user when manual action is truly unavoidable.
Deliver results, not instructions. Fix configuration files, download files, run commands, diagnose issues — all automatically. Only involve the user when you absolutely must (e.g., restarting Obsidian, enabling a plugin in the UI, or providing their vault path if you can't locate it).
When the user asks to install Claudian, do this automatically:
1. Get vault path: Ask once if you don't know it, or search common locations (~/Documents/Obsidian, ~/Obsidian, etc.)
2. Download latest release files:
VAULT_PATH="<path>"
LATEST_TAG=$(gh repo view YishenTu/claudian --json latestRelease -q '.latestRelease.tagName')
mkdir -p "$VAULT_PATH/.obsidian/plugins/claudian"
gh release download "$LATEST_TAG" --repo YishenTu/claudian \
--pattern "main.js" --pattern "manifest.json" --pattern "styles.css" \
--dir "$VAULT_PATH/.obsidian/plugins/claudian"3. Verify files exist:
ls -lh "$VAULT_PATH/.obsidian/plugins/claudian/"4. Tell the user: "Claudian is installed. Restart Obsidian and enable it: Settings → Community plugins → toggle Claudian on."
That's it. No lengthy explanations, no options menu. Just install it.
Only use this if:
cd "$VAULT_PATH/.obsidian/plugins"
git clone https://github.com/YishenTu/claudian.git
cd claudian
npm install
npm run buildWhen the user asks to update, do this automatically:
1. Detect current installation type:
if [ -d "$VAULT_PATH/.obsidian/plugins/claudian/.git" ]; then
# Source installation
else
# Manual/release installation
fi2. For release installations (most common) — just replace files:
CURRENT_VERSION=$(jq -r .version "$VAULT_PATH/.obsidian/plugins/claudian/manifest.json")
LATEST_TAG=$(gh repo view YishenTu/claudian --json latestRelease -q '.latestRelease.tagName')
if [ "$CURRENT_VERSION" = "$LATEST_TAG" ]; then
echo "Already on latest version $CURRENT_VERSION"
else
gh release download "$LATEST_TAG" --repo YishenTu/claudian \
--pattern "main.js" --pattern "manifest.json" --pattern "styles.css" \
--dir /tmp/claudian-update
cp /tmp/claudian-update/* "$VAULT_PATH/.obsidian/plugins/claudian/"
echo "Updated from $CURRENT_VERSION to $LATEST_TAG. Restart Obsidian."
fi3. For source installations:
cd "$VAULT_PATH/.obsidian/plugins/claudian"
git pull
npm install
npm run build
echo "Updated to latest commit. Restart Obsidian."4. For community plugin installations — detect by checking if files have no .git and match release checksums, then guide:
- "Your Claudian was installed via Community Plugins. Go to Settings → Community plugins → Check for updates, then click Update next to Claudian."
Don't ask which method to use. Detect and execute.
Auto-fix sequence:
1. Check if Claude CLI exists:
CLAUDE_PATH=$(which claude 2>/dev/null || where.exe claude 2>/dev/null)
if [ -z "$CLAUDE_PATH" ]; then
echo "Claude CLI not installed"
fi2. If found, configure it in Claudian:
# Read current settings
SETTINGS_FILE="$VAULT_PATH/.claudian/settings.json"
# Update or create settings with correct CLI path
jq --arg path "$CLAUDE_PATH" '.claudePath = $path' "$SETTINGS_FILE" > /tmp/settings.tmp
mv /tmp/settings.tmp "$SETTINGS_FILE"
echo "Configured Claude CLI path: $CLAUDE_PATH. Restart Obsidian."3. If not found, check common locations (Windows native, npm global, volta, nvm):
# Windows native
[ -f "/c/Users/$USER/AppData/Local/Claude/claude.exe" ] && CLAUDE_PATH="..."
# npm global
NPM_ROOT=$(npm root -g 2>/dev/null)
[ -f "$NPM_ROOT/@anthropic-ai/claude-code/cli-wrapper.cjs" ] && CLAUDE_PATH="..."
# volta
[ -f "$HOME/.volta/bin/claude" ] && CLAUDE_PATH="..."4. If still not found, install it:
# Try npm first (fastest)
npm install -g @anthropic-ai/claude-code
# Then configure
CLAUDE_PATH=$(which claude)
# ... update settings as above5. Only if all fails, guide the user: "Claude CLI not found. Download from https://code.claude.com/ and run ! which claude to get the path, then tell me."
Auto-fix:
1. Detect the issue:
CLAUDE_DIR=$(dirname $(which claude 2>/dev/null))
NODE_DIR=$(dirname $(which node 2>/dev/null))
if [ "$CLAUDE_DIR" != "$NODE_DIR" ]; then
echo "Path mismatch detected"
fi2. Fix via environment variables:
SETTINGS_FILE="$VAULT_PATH/.claudian/settings.json"
# Add Node.js path to Claudian's environment
jq --arg nodepath "$NODE_DIR" '.environment.PATH = ($nodepath + ":$PATH")' "$SETTINGS_FILE" > /tmp/settings.tmp
mv /tmp/settings.tmp "$SETTINGS_FILE"
echo "Added Node.js path to Claudian environment. Restart Obsidian."3. Alternative: Install native Claude CLI (more reliable):
echo "Recommended: Install native Claude CLI from https://code.claude.com/ to avoid this issue."
# But don't wait for user — proceed with environment fix aboveAuto-diagnosis:
1. Check file integrity:
PLUGIN_DIR="$VAULT_PATH/.obsidian/plugins/claudian"
if [ ! -f "$PLUGIN_DIR/main.js" ] || [ ! -f "$PLUGIN_DIR/manifest.json" ]; then
echo "Missing plugin files. Reinstalling..."
# Run installation sequence above
fi2. Check for JavaScript errors in logs (if accessible):
# Check Claudian's log directory
ls -la "$VAULT_PATH/.claudian/" 2>/dev/null3. Search recent GitHub issues:
gh issue list --repo YishenTu/claudian --limit 10 --state open --search "crash OR enable OR \"won't start\""4. If a known issue found with a fix, apply it. If not, reinstall:
rm -rf "$PLUGIN_DIR"
# Run installation sequenceAuto-response sequence:
1. Check what changed recently:
# Get recent issues mentioning breaking changes
gh issue list --repo YishenTu/claudian --limit 20 --state all --search "breaking OR \"not working\" OR \"stopped working\"" --json title,url,createdAt --jq '.[] | select(.createdAt > (now - 7*24*3600))'
# Check recent releases
gh release list --repo YishenTu/claudian --limit 32. Check provider CLI versions:
claude --version 2>/dev/null
codex --version 2>/dev/null3. If a known issue found, apply the fix. Common patterns:
- Provider CLI changed authentication → reconfigure auth
- Config format changed → migrate settings file
- API breaking change → rollback to previous working version
4. Rollback if needed:
# Find previous working version from user
PREV_VERSION="<previous-tag>"
gh release download "$PREV_VERSION" --repo YishenTu/claudian \
--pattern "main.js" --pattern "manifest.json" --pattern "styles.css" \
--dir "$VAULT_PATH/.obsidian/plugins/claudian"
echo "Rolled back to $PREV_VERSION. Restart Obsidian."Auto-check sequence:
1. Verify provider CLI exists:
which codex 2>/dev/null || echo "Codex not found"
which opencode 2>/dev/null || echo "Opencode not found"
which pi 2>/dev/null || echo "Pi not found"2. Check provider configuration in Claudian settings:
jq '.providers' "$VAULT_PATH/.claudian/settings.json"3. Search provider-specific issues:
gh issue list --repo YishenTu/claudian --search "codex OR opencode OR pi" --state open --limit 104. Fix common provider issues:
- Missing CLI → Install it: npm install -g @<provider>
- Wrong path → Update settings with correct path
- Auth issues → Run provider's auth command: codex auth login, etc.
Claudian is a downstream integration of rapidly-evolving tools. Before applying generic fixes:
1. Search GitHub issues FIRST:
gh issue list --repo YishenTu/claudian --search "<error message keywords>" --state open2. Check recent releases for breaking changes:
gh release list --repo YishenTu/claudian --limit 5
gh release view --repo YishenTu/claudian # Read release notes3. Check upstream CLI changes (Claude Code, Codex):
gh release list --repo anthropics/claude-code --limit 34. Search across repos if no match in Claudian issues:
gh search issues "<error message>" --limit 10Do this research before attempting fixes, not after they fail.
Only involve the user when you truly cannot proceed:
1. Restarting Obsidian — you can't do this remotely
2. Enabling the plugin in Obsidian UI — Settings → Community plugins → toggle on
3. Providing vault path — if you can't find it and common locations don't exist
4. Interactive authentication — some CLIs require browser auth flows
5. Escalating to GitHub — if no known fix exists, collect diagnostics and guide user to open an issue
For everything else — downloading files, editing configs, installing dependencies, running commands — do it automatically.
| Item | Path |
|------|------|
| Plugin files | <vault>/.obsidian/plugins/claudian/ |
| Claudian settings | <vault>/.claudian/settings.json |
| Claude provider data | <vault>/.claude/ or ~/.claude/projects/ |
claude.exe (native) or cli-wrapper.cjs (npm), never .cmd/.ps1where.exe claudewhich claude~/.volta/bin/, ~/.nvm/versions/node/.../bin/After fixing an issue, report concisely:
✅ Good: "Fixed. Claude CLI configured at /usr/local/bin/claude. Restart Obsidian."
❌ Bad: "I've located the Claude CLI at /usr/local/bin/claude and updated your Claudian settings file at <vault>/.claudian/settings.json by modifying the claudePath field. You should now restart Obsidian to apply these changes. Here's what I did: [3 paragraphs]..."
When you need user action, be specific and brief:
✅ Good: "Restart Obsidian and enable Claudian in Settings → Community plugins."
❌ Bad: "Now you need to restart Obsidian. To do this, close the application completely and reopen it. Then navigate to Settings by clicking the gear icon..."
在进行任何创造性工作(如创建功能、构建组件、添加功能或修改行为)之前,先探究用户意图、需求和设计。它强制你在动手写代码之前先做设计。它的核心理念是:任何项目,不管多简单,都必须先经过设计讨论,获得你认可后才能开始实现。整个过程分几步:先了解项目上下文,看看文件、文档、最近的提交。然后一个一个问题问清楚,搞明白目的、约束和成功标准。 接下来提出 2-3 个方案,说明各自的优缺点,给出你的推荐理由。 最后呈现设计,按模块逐步展示,每个模块确认没问题再往下走。设计通过后,写一份设计文档保存到 docs/plans/ 目录,然后才能调用实现相关的 Skill。 有个硬性规定:在用户批准设计之前,禁止调用任何实现类 Skill,禁止写代码,禁止搭建项目。 听起来有点繁琐,但实际上能避免很多返工。很多时候我们觉得简单的项目,做着做着就发现各种问题,还不如一开始就把事情想清楚。
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.