dw-snippet-vault

Use when a user says “save code snippet / common code / snippet library / code favorites.” Organizes frequently used snippets by programming language and purpose, enabling retrieval and paste-on-demand to manage and reuse common code pieces.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "dw-snippet-vault" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0693062c4697b2bfcd395de2c67ccd593ede44f065297140171e238e8fc8c0c1. Verify the upstream source and version against https://skillhub.cn/skills/user_cb37ec27/dw-snippet-vault before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Use when a user says “save code snippet / common code / snippet library / code favorites.” Organizes frequently used snippets by programming language and purpose, enabling retrieval and paste-on-demand to manage and reuse common code pieces.

0 Downloads

Introduction source: third_party · user_cb37ec27 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: dw-snippet-vault
slug: dw-snippet-vault
displayName: 代码片段收藏
description: 当用户说"存代码片段/常用代码/片段库/代码收藏"时使用。把常用片段按语言/用途收藏,随时检索粘贴。
version: 1.0.0
category: 开发者工具
platforms:
  - WorkBuddy
    - Claude Code
    - Cursor
    - QClaw
    - ima
author: Dream
license: MIT

代码片段收藏

常用的一段正则/配置每次都要重写或谷歌。

适用场景

  • 添加片段(语言+用途+代码)
  • 按关键词检索
  • 复制到剪贴板

核心能力

脚 本

s n i p p e t . p y

存 于

~ / . s n i p p e t s / s n i p p e t s . j s o n :

` b a s h

S K I L L

~ / . w o r k b u d d y / s k i l l s / d w

s n i p p e t

v a u l t

p y t h o n 3

$ S K I L L / s n i p p e t . p y

a d d

p y t h o n

" 去 重 "

" l i s t ( d i c t . f r o m k e y s ( x ) ) "

p y t h o n 3

$ S K I L L / s n i p p e t . p y

f i n d

去 重

`

执行方式

本 skill 为工作流型,由 agent 按以下步骤执行,无需额外脚本:

python / 去重:
list(dict.fromkeys(x))

示例

('snippet.py', '#!/usr/bin/env python3\n# -- coding: utf-8 --\n"""代码片段收藏:本地 JSON,按关键词检索。"""\nimport argparse, json, os\nPATH = os.path.expanduser("~/.snippets/snippets.json")\n\ndef load():\n if not os.path.exists(PATH): return []\n with open(PATH, encoding="utf-8") as f: return json.load(f)\n\ndef save(d):\n os.makedirs(os.path.dirname(PATH), exist_ok=True)\n with open(PATH,"w",encoding="utf-8") as f: json.dump(d,f,ensure_ascii=False,indent=2)\n\ndef main():\n p=argparse.ArgumentParser(description="代码片段收藏")\n sub=p.add_subparsers(dest="c")\n pa=sub.add_parser("add"); pa.add_argument("lang"); pa.add_argument("desc"); pa.add_argument("code", nargs="*")\n def add(a):\n d=load(); d.append({"lang":a.lang,"desc":a.desc,"code":" ".join(a.code)}); save(d)\n print("已存 %s/%s" % (a.lang,a.desc))\n pa.set_defaults(f=add)\n pf=sub.add_parser("find"); pf.add_argument("kw")\n def find(a):\n d=load()\n for s in d:\n if a.kw in s["desc"] or a.kw in s["code"]:\n print("%s / %s:\n%s" % (s["lang"], s["desc"], s["code"]))\n pf.set_defaults(f=find)\n args=p.parse_args()\n if not args.c: p.print_help(); return\n args.f(args)\n\nif name=="main":\n main()\n')

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

The source report provides verifiable scores for 3 of 4 dimensions.

Scenario Value85/100

Highlights

  • 解决开发者高频痛点:避免重复查找常用代码片段
  • 提供本地 JSON 存储,支持按语言/关键词检索
  • 功能实用,受众广泛
Trigger Precision90/100

Highlights

  • 触发词明确且覆盖合理:存代码片段/常用代码/片段库/代码收藏
Structure and Standards60/100

Areas to improve

  • 核心能力部分代码块内容截断 Reported severity: Major

    核心能力部分的代码块被异常拆分为单字符换行,导致内容无法正常阅读和理解

    Recommendation: 修复核心能力部分的代码块格式,确保代码完整可读

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.