Skip to main content

write-sourceref-citations

Writes canonical SourceRef citations from committed repository artifacts. Use when a deterministic helper needs an authoritative provenance string for a raw artifact.

来源信息

仓库
wryenmeek/knowledgebase
最近来源活动
2026年10月11日 22:40
检测到的 SKILL.md 语言
英语
星标
1
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
write-sourceref-citations
description
Writes canonical SourceRef citations from committed repository artifacts. Use when a deterministic helper needs an authoritative provenance string for a raw artifact.
# Write SourceRef Citations ## Overview Use this skill to build canonical `repo://...` SourceRef citations from committed repository artifacts. The helper resolves a real git revision, reads bytes from that revision, computes the checksum, and validates the final citation in authoritative mode. ## When to Use - When a draft wiki page needs a canonical SourceRef for `raw/processed/**` or `raw/assets/**` - When reconciling provisional provenance into a commit-bound citation - When deterministic tooling must emit a validated SourceRef string instead of hand-formatting one ## Contract - Input: repo-relative raw artifact path, anchor, and git ref - Path scope is limited to `raw/inbox/**`, `raw/processed/**`, and `raw/assets/**` - Output: a canonical SourceRef plus resolved commit SHA and checksum - Validation runs in authoritative mode before success is returned ## Assertions - Rejects paths outside the raw artifact allowlist - Fails closed if the git ref does not resolve to a real commit containing the artifact - Computes checksum from revision bytes, not the working tree - Uses no shell, no `eval`, and no dynamic dispatch ## Commands ```bash python3 .github/skills/write-sourceref-citations/logic/write_sourceref_citations.py --path raw/processed/source.md --anchor asset --git-ref HEAD ``` ## References - `AGENTS.md` - `docs/architecture.md` - `schema/metadata-schema-contract.md` - `schema/ingest-checklist.md` - `scripts/kb/sourceref.py`
在 GitHub 查看