跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

session-search

Search the session-brain graph for a past agent session by topic and load the winning transcript into the current conversation. Use for finding which session handled X, when Y was last worked on, or whether this was done before. Read-only; requires a session-brain graph.

AI 与智能体3.5k.skills/session-search/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/ar9av/obsidian-wiki/session-search/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Answers "which of my past sessions was about X" and then pulls that session's context in.

Step 1: Check the graph exists and is fresh

obsidian-wiki sessions-query "<topic>" --json

If this exits 1 with "run sessions-build first", tell the user and offer /session-brain. If graph.json is more than ~7 days old, mention it and offer a rebuild — but do not silently rebuild, since that is a multi-second operation the user did not ask for.

Step 2: Rank

The scoring already combines four signals, so take the ordering as given rather than re-ranking:

  • similarity — TF-IDF cosine against the session's text
  • cluster lift — a session inside the best-matching topic scores higher even if its own words never matched. This is why a session that never said "telemetry" can still surface for it.
  • bookmark boost — a human already flagged this session as worth keeping
  • time decay — 90-day half-life, applied with a floor so an old exact match still outranks a fresh weak one

Useful filters: --project NAME, --cluster N, --since DATE, --top N.

Step 3: Present

Show the top ~5 as a compact table — title, project, date, topic, and the why string, which already explains the match. Do not dump the raw JSON at the user.

Two things must be stated honestly rather than glossed over:

  • Entries with loadable: false are history-only: the transcript has been pruned from disk and only the prompts survive. They are listed in unloadable with a reason. Say the transcript is gone; do not imply it can be retrieved.
  • If everything relevant is unloadable, answer from the prompt text that is there and say that is all that remains.

Step 4: Load — hand off, do not reimplement

should_load holds at most 3 session ids worth opening, already filtered to ones with transcripts.

Prefer an existing loader skill if the user has one installed:

  • claude-session-load — loads a Claude session by id
  • bookmark-load — use when the hit is bookmarked

⚠️ Those skills live in the user's personal skills directory (~/.claude/skills/), not in this repo. They may not exist. Do not assume them and do not error if they are absent — fall back to reading the transcript directly:

# the path is in the query result as `transcript`
obsidian-wiki sessions-show <session-id> --pretty

The transcript is JSONL and can be tens of MB. Never read one whole. Filter to the human turns first:

grep -c '' <transcript>   # size check before anything else
python3 -c "
import json,sys
for line in open(sys.argv[1], errors='replace'):
    try: r = json.loads(line)
    except ValueError: continue
    if r.get('type')=='user' and not r.get('isSidechain') and not r.get('isMeta'):
        c = (r.get('message') or {}).get('content')
        if isinstance(c,str) and not c.lstrip().startswith('<'): print('>', c[:400])
" <transcript>

Step 5: Answer

Synthesise from what you loaded and cite the session ids you used. If the answer came from a history-only session's prompts rather than a real transcript, say so — the user needs to know how much of the context you actually have.

  • /session-brain — build or refresh the graph, survey and name topics
  • wiki-query — search compiled vault knowledge; this skill searches raw session history instead
  • wiki-agent — pull a topic out of another agent's history and distil it into the vault

相似的 Skill

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI 与智能体

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI 与智能体

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI 与智能体

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI 与智能体

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI 与智能体

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI 与智能体