SkillsReviewed · OpenSenseNova

sn-prepare-citations

sn-prepare-citations is a citation-formatting skill for writers and developers finishing AI research reports, but it requires matching source metadata and can leave unresolved references in its output. Its Python helper converts source-key footnotes into numbered citations, merges matching URLs and produces a bibliography and citation index.

Researched 17 Nov 2026

In short.

sn-prepare-citations is a citation-formatting skill for AI research writers and developers, but its implementation reports success even when references remain unresolved. It processes a Markdown draft and structured evidence files, with optional summary and table-of-contents rendering. It can repair certain mistaken citation identifiers, but factual accuracy and source support still require review. Runtime behavior and output quality have not been assessed through execution.

Researched and written by an AI model and checked by a second AI model. How it works

The scope comprises the complete supplied skills/sn-prepare-citations folder: SKILL.md and scripts/prepare_citations.py, plus the repository-level LICENSE as the accompanying rights notice. The source revision is 07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b. Other skills, upstream sn-deep-research components, assistant-host installation and external services are outside this scope. All supplied files were considered as source evidence; no code was executed, so actual output behavior, performance and end-to-end integration are unverified.

The overview

Identity

sn-prepare-citations belongs to OpenSenseNova/SenseNova-Skills and is documented as a final rendering step for sn-deep-research. The selected folder contains SKILL.md and scripts/prepare_citations.py. The original resource location is [https://github.com/OpenSenseNova/SenseNova-Skills/tree/main/skills/sn-prepare-citations].

The skill supplies instructions and a command-line helper rather than a model or hosted research service. Its documentation is in Chinese, and the implementation generates Chinese labels for the summary callout, contents and references.

Assessment

The clearest fit is a research workflow already producing sn-deep-research-style Markdown and evidence JSON. Developers can also adapt another workflow to its expected source and claim records.

The main reliability concern is its handling of unresolved references: it writes the output and sets success to true while also reporting orphan_citations or unresolved claim identifiers. Callers need to inspect those diagnostics before treating a report as finished.

Users

Research writers can use it to finish reports assembled from multiple subreports. Developers building AI research pipelines can use its JSON output to identify citation problems and collect a machine-readable bibliography.

Practical use requires basic command-line and JSON familiarity, or assistance from someone who has those skills. The supplied files do not establish installation support for particular assistant applications.

Capabilities

The renderer collects source metadata across evidence files, merges sources with matching normalized URLs, assigns citation numbers by first appearance in the report and appends a bibliography containing the referenced sources. It also writes citations.json with source identifiers, aliases, URLs, titles, quality labels and assigned numbers.

It detects internal claim references such as [^d1.c2] and replaces them with source references when a claim-to-source mapping exists. With an outline, it can insert a supplied summary callout and generate a table of contents from second- and third-level report headings. It reports citation problems and rendering status as JSON.

Using it

Requirements

The command requires Python 3, a UTF-8 Markdown report and one or more evidence JSON files. It imports only Python standard-library modules. The minimum supported Python release is undocumented.

Evidence files need a sources list containing records with id and url values; title and quality are optional. At least one usable source must be collected. Claim-reference repair additionally needs claims records with an id and evidence entries carrying source_id. Optional summary content comes from L0_draft.key_findings in the outline JSON.

Mechanism

URL normalization lowercases the scheme and host, removes trailing path slashes and discards fragments. Query strings remain significant. Matching URLs share the first encountered source record and citation number, with other identifiers retained as aliases.

The script repairs mapped claim identifiers before scanning source references. It then replaces recognized footnote markers with numbers and removes matching footnote-definition lines. Unrecognized references remain visible. The optional summary copies supplied findings; the contents list is derived from headings in the report rather than the outline's heading structure.

Setup

From the skill folder, the documented command pattern is python3 scripts/prepare_citations.py --report work/stitched.md --evidence work/sub_reports/d1.evidence.json work/sub_reports/d2.evidence.json --outline work/outline.json --output work/report.md. The paths are illustrative and must refer to the user's files.

Specify a separate output path to preserve the draft. Omitting --output overwrites the input report, including when an outline is supplied. The output directory also receives citations.json, replacing any existing file with that name. The --no-l0 and --no-toc options disable the corresponding additions.

Example

Illustrative behavior from the source, not an execution result: suppose paper_a and paper_b identify the same normalized URL. A draft first citing [^paper_b] and later [^paper_a] would receive [1] at both positions and one bibliography entry, using the first encountered source metadata.

If the draft instead includes [^missing_source] without matching metadata, that marker remains in the output and appears in orphan_citations. Deduplication shares numbering and bibliography entries; it does not remove repeated citation markers from sentences.

Assessment & evidence

Limitations

Distinct source URLs need distinct source identifiers across the evidence files. The source pool is keyed by identifier, so reusing an identifier for different URLs can overwrite metadata and misattribute references. Fragment removal can also merge links intended to identify different parts of one page.

Citation and heading handling uses regular expressions rather than a Markdown parser. Citation-shaped text inside code examples can therefore be changed. Footnote cleanup removes matching definition lines without handling complete multiline footnote structures.

Reprocessing an already rendered report can duplicate its contents list and replace citations.json with an empty index because numbered references are not converted back into source identifiers. Existing contents and bibliography sections are not generally removed. No output-language option is shown.

Why it may fit

A separate formatting step can make citation numbering consistent after AI-generated subreports are combined. URL aliases address duplicate bibliography entries, while claim-to-source mappings recover a specific mistake in which an internal claim identifier is used as a citation key.

These benefits depend on accurate input metadata. The quality field is copied into the citation index, defaulting to tertiary when absent; that label is not the result of a source-quality assessment. The implementation checks identifier relationships rather than whether cited material supports a statement.

Alternatives

Within this resource, citation-only processing is available by omitting the outline, or by disabling both summary and contents rendering. A separate --output path can still preserve the original draft.

For requirements such as configurable citation styles, BibTeX or CSL integration, another tool would need separate assessment: those capabilities are not established here. The supplied evidence contains no comparison with named alternatives.

Evidence

The captured instructions are available at [https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b/skills/sn-prepare-citations/SKILL.md]. The captured implementation is at [https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b/skills/sn-prepare-citations/scripts/prepare_citations.py].

The accompanying licence is at [https://raw.githubusercontent.com/OpenSenseNova/SenseNova-Skills/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b/LICENSE]. These files support descriptions of the intended interface and implementation. Nothing was executed; runtime correctness, performance and integration compatibility remain unverified.

Access & freshness

Costs

The MIT licence grants its covered permissions free of charge. The supplied renderer performs local file processing and contains no network requests or model API calls.

No runtime measurements or total operating costs are supplied. Local computing costs and any charges for upstream AI research remain unknown.

Rights

The repository notice is the MIT License, copyright 2026 SenseNova. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions of the software. The software is supplied without warranties.

That notice does not establish rights to third-party sources, reports or other material processed by the script.

Freshness

The supplied snapshot was captured on 17 November 2026 at 12:57:53.837 UTC from revision 07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b. Later repository changes are unknown.

The script header describes behavior version 2.2, while its exported schema_version remains 2.1 and some command-line descriptions still mention version 2.1. These are labels inside the captured implementation; a separate package release date or support commitment is not established.

Adoption steps

Before adoption, assess a representative draft with its complete evidence files, using a distinct output directory. Ensure source identifiers are unique across different URLs and retain the original draft for repeat rendering.

Inspect orphan_citations and claim_id_leakage.unresolved even when success is true. Review the bibliography, citation placement, summary text and contents links before distributing a report, especially when the draft contains code examples or multiline footnotes.

Evidence for this report

LICENSEnotice · checked 2026-11-17
skills/sn-prepare-citations/SKILL.mdselected · checked 2026-11-17