From obsidian-kb
Briefs agent on prior session by reading latest handoff note and project overview from Obsidian knowledge base. Use on /kb-onboard, catch-up requests, or continuing work.
npx claudepluginhub waelmas/codeplow --plugin obsidian-kbThis skill uses the workspace's default tool permissions.
Read the latest session handoff and project overview to quickly brief yourself (or the agent) on the current state of the project. Lean and fast - get context, then get to work.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Generates production-ready Python code for Dataverse SDK with error handling, singleton clients, retry logic, OData optimizations, logging, and type hints.
Share bugs, ideas, or general feedback.
Read the latest session handoff and project overview to quickly brief yourself (or the agent) on the current state of the project. Lean and fast - get context, then get to work.
These rules exist because non-interactive invocations (claude -p "...", Copilot CLI -p, etc.) can end the agent's turn prematurely in the middle of multi-step skills. Rule #6 is the performance rule that matters most on smaller models.
Run every Bash call in this skill in the FOREGROUND. Never set run_in_background: true on any command here. Background completions can be misread as the end of your turn, causing the skill to terminate after preflight. If you need parallelism (e.g., listing + searching), call the commands sequentially instead.
Complete Steps 0–5 before handing back control. The briefing in Step 4 is NOT an end-of-turn signal. Always produce it, then continue.
If the user's message contained instructions beyond /kb-onboard, e.g. "/kb-onboard, then answer these questions" or "/kb-onboard and continue the feature" - complete the briefing first, then proceed with those instructions in the SAME turn. Do not stop after the briefing.
If CLI calls (obsidian vaults, obsidian vault info=name, etc.) fail or return unexpected values, fall through to filesystem mode immediately (CLI_MODE=0). A contested active-vault (from parallel agents or running scripts) is not a reason to abort - it's a reason to switch to find/cat/grep on $VAULT_PATH and keep going.
Emit a deterministic completion marker at the end of Step 5: literally output the line <!-- kb-onboard:complete --> on its own line as an HTML comment. This tells both humans and downstream tooling that the skill ran to completion, and lets you confidently move on to any remaining instructions.
FAST PATH when the user provides an explicit vault PATH. If the user's message specifies a filesystem path to the vault (e.g., "The vault is at /path/to/Foo KB" or "use the vault at ~/vaults/Foo"), you have everything you need to skip almost all of this skill. Concretely:
VAULT_PATH=<provided path>, CLI_MODE=0.command -v obsidian, obsidian vaults, or obsidian vault info=name.$VAULT_PATH/Sessions/ (use a single ls -t Sessions/ | head -1 to pick it), and $VAULT_PATH/Index.md (if present; if not, skip). Do NOT enumerate candidate overview filenames. Do NOT run obsidian search. Do NOT read any Architecture/ or other vault subdirectories unless the user explicitly asks a follow-up about them.<!-- kb-onboard:complete --> and continue to any remaining instructions.This fast path is designed to be ≤ 4 tool-call turns total even on smaller models (Haiku/Sonnet). The full flow's ~10–20 turn overhead only applies when vault resolution actually has to work.
Only fall back to the full flow (Steps 0–5) if the provided path doesn't exist or its structure is non-standard.
Follow the Preflight Check in the obsidian-kb awareness skill (${CLAUDE_PLUGIN_ROOT}/skills/obsidian-kb/SKILL.md). In short:
command -v obsidian - if missing, check if the app is installed; if neither, show cross-platform install instructions (brew install --cask obsidian / flatpak install flathub md.obsidian.Obsidian / winget install Obsidian.Obsidian, or https://obsidian.md/download) and stop.timeout 3 obsidian vaults - if it fails, launch Obsidian (open -a Obsidian on macOS, equivalent for Linux/Windows), wait 2-3 seconds, retry.obsidian vaults succeeds.Follow the Vault Resolution Algorithm in ${CLAUDE_PLUGIN_ROOT}/skills/obsidian-kb/SKILL.md. It's a strict priority order - do not invent shortcuts. Summary:
$PWD (or vice versa) with exactly one match. Strongest automated signal.project_path - a root note's YAML matches $PWD exactly.After you resolve the vault, print a confirmation line on your first reply:
"Using vault
<Vault Name>at<path>(matched via<tier>). Say 'wrong vault' if I should pick a different one."
This gives the user a fast abort path before any data is read.
Critical: every subsequent obsidian command in this skill MUST include vault="<resolved>" - never omit it. The obsidian CLI's active-vault fallback is how unrelated handoffs get read from other projects.
If the user tells you which vault to use, use it immediately - just confirm by name.
Before reading anything, run the Vault Access Sequence from ${CLAUDE_PLUGIN_ROOT}/skills/obsidian-kb/SKILL.md:
CURRENT=$(timeout 3 obsidian vault info=name 2>/dev/null)
if [[ "$CURRENT" != "$VAULT_NAME" ]]; then
ENCODED=$(printf '%s' "$VAULT_NAME" | sed 's/ /%20/g')
open "obsidian://open?vault=${ENCODED}" # macOS; xdg-open on Linux; start on Windows
sleep 3
CURRENT=$(timeout 3 obsidian vault info=name 2>/dev/null)
fi
if [[ "$CURRENT" == "$VAULT_NAME" ]]; then
CLI_MODE=1
else
CLI_MODE=0
fi
CLI_MODE=1 → you may use obsidian search, obsidian files, obsidian read for this vault (they all target the active one, which is now ours).CLI_MODE=0 → use filesystem fallbacks (find, grep, cat) on $VAULT_PATH.Tell the user: "Switched Obsidian to <VaultName> for this onboarding."
Existing vaults may not follow a standard structure - handoff notes could be anywhere and named anything. See "Operation Split" in the awareness skill for the CLI/filesystem mappings.
if [[ "$CLI_MODE" == "1" ]]; then
# CLI path - indexed, handles Obsidian's file metadata
timeout 5 obsidian files folder="Sessions" 2>/dev/null
timeout 5 obsidian files 2>/dev/null | grep -iE 'handoff|handover|[0-9]{4}-[0-9]{2}-[0-9]{2}'
else
# Filesystem fallback
find "$VAULT_PATH" -type f -name "*.md" -not -path "*/.obsidian/*" \
\( -iname "*handoff*" -o -iname "*handover*" -o -path "*/Sessions/*" \) | sort
fi
if [[ "$CLI_MODE" == "1" ]]; then
# Obsidian's indexed search - better than grep for multi-word queries
timeout 5 obsidian search query="handoff" 2>/dev/null
timeout 5 obsidian search query="next session" 2>/dev/null
timeout 5 obsidian search query="TL;DR" 2>/dev/null
else
# Filesystem fallback
grep -r -l -i "handoff\|next session\|TL;DR" "$VAULT_PATH" \
--include="*.md" --exclude-dir=.obsidian | sort
fi
stat-based mtime.if [[ "$CLI_MODE" == "1" ]]; then
timeout 5 obsidian read path="<relative/path-to-handoff.md>"
else
cat "$VAULT_PATH/<relative/path-to-handoff.md>"
fi
Look for an overview or index note. Don't assume it's Index.md - existing vaults may use different names.
# Try these in order, stop at the first one that exists
for candidate in "Index.md" "README.md" "00 - Home.md" "Home.md" "Overview.md"; do
if [[ -f "$VAULT_PATH/$candidate" ]]; then
cat "$VAULT_PATH/$candidate"
break
fi
done
List vault root notes and look for one that reads like an overview:
find "$VAULT_PATH" -maxdepth 1 -type f -name "*.md" -not -name ".*"
Pick the most promising candidate (e.g., a note named after the project, "Start Here", "About") and read it.
That's still fine. Present what you found from the handoff (Step 2), plus a summary of the vault's folder structure and file count as the "overview":
find "$VAULT_PATH" -type f -name "*.md" -not -path "*/.obsidian/*" | wc -l # total note count
find "$VAULT_PATH" -maxdepth 2 -type d -not -path "*/.obsidian*" | sort # folder tree
Synthesize what you read into a concise briefing. Adapt the format to what you found - don't present empty sections.
Session Briefing - [Project Name]
Last session ([date]): [TL;DR from handoff]
Next steps: [Next Steps from handoff]
Watch out: [Watch Out / gotchas from handoff, if any]
Vault overview: [summary from index - N notes, key topics available]
Session Briefing - [Project Name]
No session handoff found.
Project overview: [summary from index/overview note]
Tip: trigger kb-offboard (or run
/kb-offboard) when you're done to start the handoff chain.
If the user provided a topic (e.g., "auth refactor"), also search the vault for it:
timeout 5 obsidian search vault="<name>" query="<topic>"
Read and briefly summarize any matching notes.
End the briefing with a reminder that the vault has more depth:
"The vault has N notes you can explore. If you need deeper context on anything, I can search and read from the vault - just ask."
Then emit the completion marker on its own line as an HTML comment (invisible in rendered markdown, still machine-parseable):
<!-- kb-onboard:complete -->
The marker signals "the skill finished normally" to both you (the agent) and any script parsing the output. After emitting it, immediately continue with any remaining instructions in the user's message (see Robustness rule #3).
obsidian CLI onlytimeout to prevent hangs