返回 Skill 列表
extension
分类: 开发与工程无需 API Key

save-artifact

保存并组织目标工件(文档、演示文稿、Markdown、图片、SVG)到 ~/projects/artifacts-viewer。当用户想要将文档、PDF、PPT、Markdown文件、图片(PNG、JPG、SVG)或任何视觉/文档工件保存或组织到一个集中的查看位置时使用。同时用于初始化artifacts-viewer的git仓库并将内容推送到GitHub。

person作者: jakexiaohubgithub

save-artifact

Save target artifacts to ~/projects/artifacts-viewer for easy viewing and organization.

Quick Usage

  1. Ensure target directory exists: ~/projects/artifacts-viewer (auto-created if missing)
  2. Save artifact: Copy or move the file to artifacts-viewer with appropriate naming
  3. Git operations: Initialize git repo and push to GitHub when needed

Supported File Types

  • Documents: .pdf, .doc, .docx
  • Presentations: .ppt, .pptx
  • Markdown: .md, .mdx
  • Images: .png, .jpg, .jpeg, .gif, .svg
  • Other: .txt, .json

Workflow

Save Artifact

# Ensure directory exists
mkdir -p ~/projects/artifacts-viewer/artifacts/<category-subdir>

# Copy artifact to viewer subdirectory (use descriptive name)
cp <source-file> ~/projects/artifacts-viewer/artifacts/<category-subdir>/<descriptive-name>

# REQUIRED: Regenerate manifest so web viewer picks up new files immediately
python3 ~/projects/artifacts-viewer/artifacts/scan_manifest.py

Git Operations

cd ~/projects/artifacts-viewer
git init
git add .
git commit -m "Add artifacts"
git remote add origin https://github.com/<username>/artifacts-viewer.git
git push -u origin main

Script Usage

Use scripts/save_artifact.py for automated saving:

python3 scripts/save_artifact.py <source_path> [--name <custom_name>] [--category <category>]

Categories: docs, slides, markdown, images, diagrams, other

Notes

  • Always use descriptive, unique names for artifacts
  • Consider organizing by category subdirectories if needed
  • Commit and push to GitHub for version control and sharing