Artifact Management

作者 cline26378461e978無授權條款34 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 個月前更新

Save, organize, and describe reusable analysis artifacts such as SQL, result snapshots, CSV exports, summaries, caveats, plots, and report-ready files. Use when users ask to save, export, share, cite, reproduce, or organize data-analysis outputs.

AI 產生的概覽

儲存並整理可重用的資料分析產物,例如 SQL、結果快照、摘要與圖表。

功能
此技能說明如何把分析輸出保存到對話之外:指出何時該儲存產物、需要包含哪些脈絡(問題、指標定義、SQL、結果快照、摘要、注意事項),並提供以日期命名的資料夾結構,內含 README、查詢、結果、摘要、圖表與中繼資料檔案。它也涵蓋可重現的生成產物、README 與中繼資料範本、安全與隱私指引,以及儲存後的回報內容。它產出的是整理好的分析套件,而非執行分析本身。
適用情境
當使用者要求儲存、匯出、分享、引用、重現或整理資料分析輸出時使用;當圖表或可直接用於報告的資產需要留存以供日後檢視或重用时也適用。對於較複雜的查詢結果,若其 SQL、假設與注意事項對解讀很重要,同樣適用。
執行需求
不隨附指令碼,僅為說明性指示。它假定代理程式能將檔案寫入本機或工作區位置,並可能涉及 Python 的 http.server 等工具來檢視互動式 HTML 產物。

Artifact Management

Use this skill when analysis outputs should persist beyond the current conversation.

When to store artifacts

Store analysis artifacts when:

  • the user asks to save, export, share, cite, or reproduce an analysis
  • a chart, report asset, or presentation-ready output is generated
  • the analysis may be reused for a decision, review, dashboard follow-up, or external-facing answer
  • the query result is non-trivial and the SQL, assumptions, or caveats matter for interpretation

Do not write files into a repository or long-lived location unless the user requested persistence or approved the destination.

What to store

Prefer storing enough context for someone to reproduce and critique the analysis later:

  • original user question or decision context
  • metric definitions, assumptions, population, grain, time window, filters, and exclusions
  • source models/tables and relevant data-dictionary references
  • final SQL or query source
  • result snapshot, such as CSV, JSON, Parquet, or a small markdown table
  • narrative summary, findings, evidence, confidence, and caveats
  • generated plot files and the underlying data used to create them
  • reproduction instructions, including commands or tool steps when helpful
  • creation timestamp and author/tool context when useful

Recommended local structure

Use a dated, human-readable slug for each analysis package:

text
analyses/└── 2026-05-27-active-users-trend/    ├── README.md    ├── query.sql    ├── result.csv    ├── summary.md    ├── chart.html    ├── chart.png    └── metadata.json

For lightweight exports, a single CSV or markdown file is fine. For reusable or report-ready work, prefer the package structure above.

Reproducible generated artifacts

When an artifact is generated by code, preserve enough context to reproduce and safely modify it later:

  • Save the generator script or notebook alongside the generated outputs when practical.
  • Keep generated files reproducible from the saved script and source data.
  • If fixing a generated artifact, update the generator and regenerate the output. Avoid only hand-patching generated files, because that causes drift between the source script and artifact.
  • If a generated file must be manually patched, document that in README.md, summary.md, or metadata.json and state whether the generator is stale.
  • Save validation steps that were performed, such as SQL row counts, JavaScript syntax checks, local render checks, or browser viewing notes.

For interactive HTML artifacts, include viewing instructions when browser security context may matter. For example:

bash
cd path/to/artifact-directorypython3 -m http.server 8000

Then open http://localhost:8000/chart.html instead of relying on file:// behavior.

If a lightweight chart evolves into a reusable or report-ready asset, upgrade the artifact package with a human-readable README.md that includes:

  • question and short answer
  • metric definition and definition provenance
  • source model/table and SQL/query notes
  • time window, grain, filters, and exclusions
  • artifact inventory
  • caveats and sensitivity notes
  • validation performed
  • reproduce/refresh instructions

README template

md
# Analysis title
Question: ...
Answer: ...
How I measured it:- Metric: ...- Population: ...- Grain/window: ...- Filters/exclusions: ...- Source model/table: ...
Artifacts:- `query.sql` — final query- `result.csv` — result snapshot- `summary.md` — findings and caveats- `chart.html` / `chart.png` — visualization, if generated
Caveats:- ...
Reproduce:1. ...

Metadata fields

When creating metadata.json, include fields like:

json
{  "title": "Active users trend",  "created_at": "2026-05-27T15:40:00-07:00",  "question": "...",  "time_window": "...",  "grain": "...",  "models": ["..."],  "metrics": ["..."],  "filters": ["..."],  "caveats": ["..."],  "artifacts": ["query.sql", "result.csv", "summary.md", "chart.html"]}

Safety and privacy

  • Avoid persisting sensitive raw rows unless they are necessary and explicitly requested.
  • Prefer aggregate, sampled, redacted, or anonymized outputs for shareable artifacts.
  • Make caveats visible next to exported numbers and charts.
  • Do not publish or upload artifacts to external services unless the user explicitly asks.
  • If storing in a shared repository, avoid secrets, credentials, private customer data, and overly broad raw exports.

Output reporting

After saving artifacts, report:

  • absolute or workspace-relative paths
  • what each artifact contains
  • any sensitivity caveats
  • how to reproduce or refresh the analysis

Boundaries

This skill does not replace a BI tool, governed dashboards, documented metric definitions, or a source-of-truth reporting system. Treat persisted artifacts as snapshots unless they are backed by documented models and an agreed refresh process.

來源與署名

來源:cline/skills位於skills/data-analyst/skills/artifact-management提交2637846

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架