Code Snippet

代码片段收藏夹。快速保存和搜索常用代码片段,支持多语言和高亮。适合开发者积累代码库。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 24 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The package name/description (代码片段收藏夹) matches the included script behavior (add/search/list/get/delete local snippets). Minor inconsistencies: SKILL.md examples sometimes call 'snippets.py' while the actual script is 'scripts/snippet.py', and the top-level registry metadata in the report lists no required binaries while _meta.json lists python3. These are likely documentation/metadata typos and do not change the core capability.
Instruction Scope
Runtime instructions simply demonstrate invoking the bundled Python script. The script reads/writes a JSON file at ~/.code_snippets.json (it will create and persist snippets there) and may call the system 'xclip' command to copy text to the clipboard. It performs no network activity, does not read other system configs, and does not access environment variables. The examples contain filename typos (snippets.py vs scripts/snippet.py).
Install Mechanism
No install spec is provided (instruction-only plus one included script). _meta.json notes python3 as a required binary, which is reasonable. Nothing is downloaded or extracted; no remote install URLs are used.
Credentials
The skill requires no credentials or environment variables. It stores data locally in a plain JSON file in the user's home directory (~/.code_snippets.json). That persistent storage is proportional to the described purpose but is unencrypted by design.
Persistence & Privilege
The skill does not request elevated or platform-wide privileges, does not set always:true, and only persists its own data file in the user's home directory. It does not modify other skills or system-wide configuration.
Assessment
This skill appears to be a simple local code-snippet manager implemented in Python. Before installing or running it: - Be aware it will create and update ~/.code_snippets.json in your home directory; snippets are stored as plain JSON (not encrypted). Do not store secrets in snippets unless you are comfortable with that. - SKILL.md contains small filename typos (references to 'snippets.py' vs the actual 'scripts/snippet.py'); verify you run the correct path or move the script as you prefer. - The script attempts to use the 'xclip' command to copy to the clipboard on Linux; if you need clipboard support on other platforms you may need to adjust the script. - There is no network access or credential collection in the code; you can review scripts/snippet.py locally to confirm before running. If you want extra assurance, run it in a limited environment or inspect the file contents yourself.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk979sntf3kad3azwtdnbgvshqs831san

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Code Snippet 📝

收藏和管理常用代码片段。

功能

  • 💾 保存代码片段
  • 🔍 快速搜索
  • 🏷️ 标签分类
  • 📋 一键复制

使用方法

添加片段

python3 scripts/snippet.py add "Python读取文件" --code "with open('file.txt') as f:" --lang python --tag 文件操作

搜索

python3 scripts/snippet.py search "读取文件"

列出

python3 snippets.py list --tag python

复制

python3 snippets.py get 1

示例

# 添加 Python 代码片段
python3 scripts/snippet.py add "读取JSON" --code "import json\nwith open('file.json') as f: data = json.load(f)" --lang python

# 搜索
python3 scripts/snippet.py search "JSON"

# 按标签列出
python3 scripts/snippet.py list --tag python

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…