From dev-workflow
Use when you need to search the cross-project knowledge base manually. Accepts a query, searches ~/.claude/knowledge/ for past lessons, API gotchas, architecture decisions, and learning notes.
npx claudepluginhub n0rvyn/indie-toolkit --plugin dev-workflowThis skill uses the workspace's default tool permissions.
Search the cross-project knowledge base at `~/.claude/knowledge/`. Returns matching entries with context for quick scanning, and offers to read full files.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Search the cross-project knowledge base at ~/.claude/knowledge/. Returns matching entries with context for quick scanning, and offers to read full files.
If the user invoked /kb <query>, use the text after /kb as the query directly.
Otherwise, ask:
api-usage, bug-postmortem, architecture, platform-constraints). Omit to search all.Classify the query as question or browse:
?, starts with how/why/what/when/where/does/can/is/should/will, or is a natural language sentence (>5 words with verb structure)This classification determines how results are presented in Step 3.
First, resolve the knowledge base path: run echo $HOME/.claude/knowledge/ via Bash to get the absolute path. Use this expanded path for all subsequent Grep and Read calls.
Run two parallel Grep searches over the resolved knowledge base path:
Grep(pattern=<query>, path="~/.claude/knowledge/", output_mode="content", context=3)Grep(pattern=<query>, path="~/.claude/knowledge/", glob="*.md", output_mode="content", context=0) targeting keywords: lines in frontmatterIf the user specified a category filter, narrow the path to ~/.claude/knowledge/{category}/.
If the query has multiple words, also try each word individually as a secondary search if the full-phrase search returns zero results.
Freshness indicator (used by both modes): First, run date +%Y-%m-%d via Bash to get today's date. Then for each result file, extract the date: field from YAML frontmatter. Compare against today:
date: field and no YYYY-MM-DD- filename prefixIf the frontmatter has no date: field, use the filename date prefix (YYYY-MM-DD-*) if present.
Group results by file. For each file, show:
[{rank}] {freshness_emoji} {file_path}
Category: {category from directory name} | Date: {from frontmatter} | Freshness: {Fresh/Aging/Stale}
Keywords: {from frontmatter keywords line}
{matching lines with context — up to 8 lines per file}
If any results are 🔴 Stale (> 90 days), append after the results list:
⚠️ {N} 条结果超过 90 天,信息可能过时。建议验证后再使用。
After presenting all results: "Read any of these in full? Specify the number(s)."
If the user names result(s): call Read with the file path and present the full content.
Rank results: From the combined Grep results (Step 2), rank matched files by: keyword-line hit > content-only hit, then most recent date first. Take the top 5 files.
Read full content: For each of the top 5 files, call Read(file_path, limit=100) to get the complete entry (capped at 100 lines to bound context usage).
Synthesize answer: Using the read entries, compose a direct answer to the user's question. Format:
## Answer
{2-5 sentence direct answer to the question. Reference specific entries as [entry-filename] when citing a fact or recommendation.}
## Sources
[1] {freshness_emoji} {file_path}
Category: {cat} | Date: {date} | Keywords: {kw}
[2] {freshness_emoji} {file_path}
Category: {cat} | Date: {date} | Keywords: {kw}
...
Need more detail on a source? Specify the number.
Confidence fallback: If the read entries do not contain enough information to answer the question directly, fall back to browse mode output and prefix with: "Found related entries but can't confidently answer this question. Here are the relevant entries:"
Stale warning: If any cited source is 🔴 Stale, append the stale warning after the Sources section.
If no results from either search:
No entries found for "{query}" in ~/.claude/knowledge/.
Suggestions:
- Try broader or alternative keywords
- Use /collect-lesson to save new knowledge from this session
Also run a quick scan of the current project's docs/09-lessons-learned/ as a local fallback:
Grep(pattern=<query>, path="docs/09-lessons-learned/", output_mode="content", context=3)
If local results found, present them with label: "[Project-local results — not in central knowledge base]"
If still no results after the project-local fallback, and ~/Obsidian/PKOS/ exists:
Grep(pattern=<query>, path="~/Obsidian/PKOS/10-Knowledge", output_mode="content", context=3, head_limit=10)Grep(pattern=<query>, path="~/Obsidian/PKOS/50-References", output_mode="content", context=3, head_limit=10)If PKOS results found, present them with label: "[PKOS vault results — not in central knowledge base. Use /pkos kb-bridge to export relevant entries.]"
Structured query hint: If the query targets specific properties (date range, topic, quality score), suggest:
For structured queries, open
~/Obsidian/PKOS/99-System/bases/in Obsidian — Bases views support filtering by date, topic, quality, and status.
This is a read-only search fallback. It does not modify the PKOS vault.
Note: This PKOS fallback also applies to Step 3B (Question/Synthesis mode) — if the initial search in ~/.claude/knowledge/ returns zero results, try the PKOS vault before giving up on synthesis.