write-citations
Create or update a CITATION.cff for a skill or repo from provenance-backed references under references/. Use when adding, updating, or maintaining citations, citable metadata, preferred citation, authors, DOI, or attribution.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- write-citations
- description
- Create or update a CITATION.cff for a skill or repo from provenance-backed references under references/. Use when adding, updating, or maintaining citations, citable metadata, preferred citation, authors, DOI, or attribution.
02 资源文件 8
- 参考文档cspell-words.txt7 B
- 参考文档references/citation-file-format-authoring.md1.9 KB
- 参考文档references/citation-file-format-people-and-identifiers.md1.9 KB
- 参考文档references/citation-file-format-references.md1.9 KB
- 参考文档references/citation-file-format-SUMMARY.md2.1 KB
- 参考文档references/citation-file-format-validation.md1.5 KB
- 参考文档references/CITATION.cff556 B
- 脚本references/validate-cff.ts3.0 KB
03 SKILL.md 正文
Write Citations
Create or update a CITATION.cff file for a skill or repo by reading the provenance-backed references already gathered under the skill's references/ directory.
This skill is the author-side counterpart to validate-cff. It synthesizes existing sources into CFF 1.2.0 metadata; it does not discover new sources or check schema validity.
Scope
Trigger when the user wants to
- Create or update a
CITATION.cff. - Add citations, citable metadata, preferred citation, author metadata, DOI/Zenodo, or attribution for a skill or repo.
Redirect instead of triggering when
- The user wants to validate an existing
CITATION.cff→ hand off tovalidate-cff. - The user wants to find or download sources → hand off to
research-references. - The user wants to cite a paper or add a README bibliography → hand off to
research-referencesor general writing help. - The user wants to list references in a spec → hand off to spec-writing or
research-references.
Workflow
-
Identify the target directory.
- Default to the skill root: the directory containing the nearest
SKILL.mdupward from the current working directory. - Only use a different directory if the user explicitly provides one.
- Default to the skill root: the directory containing the nearest
-
Gather inputs.
- Read the existing
CITATION.cffin the target directory, if present. - Discover all
references/**/*.mdfiles under the target directory. - Parse each reference's OKF frontmatter for fields that map to CFF (title, author, date, license, DOI, URL, etc.).
- Accept any explicit metadata the user provided (title, version, authors, license, DOI).
- Read the existing
-
Synthesize a CFF draft.
- Map reference fields to CFF 1.2.0 fields using the bundled CFF references.
- Required fields:
cff-version: 1.2.0,message,title,authors. - Authors must be either a person (
family-names+given-names) or an entity (name). - Do not invent authors, titles, or identifiers not present in the references or explicit user input.
-
Write or propose.
- If no
CITATION.cffexists, write the file immediately and show the result. - If a
CITATION.cffexists, explain the mapping and the diff, then confirm before writing. - Preserve fields that are already correct in the existing file.
- If no
-
Report.
- Summarize which reference contributed which fields.
- Mention any required fields that were not determined from the references or explicit input and were left empty or filled with a placeholder.
Boundaries & safety
- Do not invent references or authors.
- Do not suggest authors from git history or GitHub metadata.
- Do not fetch or research new sources.
- Do not validate the file; rely on the CFF references and
validate-cfffor validation. - Never overwrite an existing
CITATION.cffwithout explaining the diff and confirming. - Preserve personal identifiers (ORCID, email) only when they are already present in the references or explicitly provided.
Reference load triggers
- Read
references/citation-file-format-SUMMARY.mdfor a top-level CFF map and fast rules. - Read
references/citation-file-format-authoring.mdwhen deciding root-level fields and the minimal template. - Read
references/citation-file-format-people-and-identifiers.mdwhen mapping authors, entities, ORCIDs, or contacts. - Read
references/citation-file-format-references.mdwhen handlingpreferred-citationor related-work citations. - Read
references/citation-file-format-validation.mdwhen checking file naming or schema validity conventions. - Read
references/validate-cff.tsto understand the exact validation rules the output must satisfy. - Read
references/CITATION.cfffor a working example.
04 同仓库更多 Skills
develop-skill
Author or revise agent skill instructions from a spec or clear intent. Use for initial authoring, evidence-led instruction repair, or restructuring. Redirect specialist-only research, activation repair, citation, eval, and management tasks.
capture-microskill
Encode human-selected CLI or MCP tool lessons into single-file Agent Skills. Use when asked to capture lessons or merge them into a microskill. Not for discovering lessons, diagnosing failures, or documenting general practices.
write-citations
Create or update a CITATION.cff for a skill or repo from provenance-backed references under references/. Use when adding, updating, or maintaining citations, citable metadata, preferred citation, authors, DOI, or attribution.
new-skill
A sample skill for testing write-citations.
existing-skill
A sample skill for testing write-citations updates.
empty-skill
A sample skill with no references for testing write-citations edge cases.