AgentSkillsCN

autosnippet-search

当用户希望从知识库中查找或插入标准代码时(例如,“查一下项目里怎么写”、“有没有现成的写法”、“插入这段标准代码”),可使用此技能推荐使用搜索功能(如 as:search、仪表板或 API),再通过 autosnippet-recipes 进行实际查找。

SKILL.md
--- frontmatter
name: autosnippet-search
description: When the user wants to find or insert standard code from the knowledge base (e.g. "查一下项目里怎么写", "有没有现成的写法", "插入这段标准代码"), use this skill to recommend search (as:search, Dashboard, or API) and then use autosnippet-recipes for the actual lookup.

AutoSnippet Search — When to Recommend

Use this skill when: The user wants to find or insert standard code from the project's knowledge base (Recipes). You decide whether to recommend; do not force.

When to recommend

  • User says: "查一下项目里怎么写 X" / "有没有现成的写法" / "插入标准代码" / "用知识库里的写法".
  • User is editing a file and could benefit from inserting a Recipe's code block at the current line.

How to recommend (you choose wording)

  • In editor: "Add // as:search keyword on the current line; after save, watch opens Dashboard; pick a Recipe to insert and replace that line."
  • Terminal: "Run asd search keyword or asd search --semantic keyword in project root to see candidates."
  • Dashboard open: "Enter keyword in Dashboard search box; pick one and click to insert into current file."

Actual lookup

  • For finding the right Recipe content (title, summary, code block), use the autosnippet-recipes skill: read references/project-recipes-context.md or call search API.
  • This skill only tells you when to recommend search and how to describe it to the user.

On-Demand Context (when asd ui is running)

Use MCP tool autosnippet_context_search for on-demand semantic search; pass query, limit?. Requires AutoSnippet MCP configured and asd ui running.


Relation

  • autosnippet-when: General "when to recommend what"; may point here for search.
  • autosnippet-recipes: Project context, search API, and code lookup steps.