agentleFS
enstwenstw/thesisbug2/.agents/skills/cite-check/SKILL.md

cite-check

Skill0 starsChanged 6 days agoMITView on GitHub

Citation consistency gate for Quarto/Pandoc academic work (.qmd + .bib). Use for /check_cite, before a build or submission, or when the user asks to check citations / 引用格式 / 引用檢查 / 檢查引用. Runs ./fw check-citations (broken, unused, incomplete, duplicate keys; APA-zh split bib) instead of a hand-rolled grep, enforces [@key] format and p. / para. locators, and strips NotebookLM [loc] residue. Whether a source actually supports a claim is source-kit, not this.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the Quarto/Pandoc standard: [@citation_key].

    line 27
  2. Distinctive:

    When a citation supports a specific point or datum, mark the position precisely:

    line 33
  3. Very specific:

    Run this last, as a consistency pass — the substantive review (cross-reading each claim against <unit>/refs/<key>.md) is source-kit § …

    line 59

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

cite-check — citation hygiene gate

The mechanical citation gate for .qmd manuscripts. It checks that citations are well-formed and consistent — it does not check that a source backs its claim. That semantic check is source-kit § Source review; this skill is the form check, and house-style reference/content-integrity.md rule 3 ("citations stay attached to their claims") is the standard it enforces.

Extend ./fw check-citations (below) rather than hand-rolling a grep/awk/python script to diff [@key]s against the .bib — it already does it, including the APA-zh split-bib case, and exits non-zero to fail the build.

Format rules

  • Use the Quarto/Pandoc standard: [@citation_key].
  • Forbidden: NotebookLM-generated [loc], Location, or Source X labels. Strip any that survived a paste from NotebookLM.

Locators (定位標示)

When a citation supports a specific point or datum, mark the position precisely:

  • PDF / book source → p. <page> (e.g. [@smith_2024, p. 15]).
  • Web / HTML source → para. <paragraph> (e.g. [@cnn_report, para. 3]).

Run the consistency check

./fw check-citations <unit>        # exits non-zero if broken or incomplete

It checks all <unit>/**/*.qmd against both tiers — <unit>/references.bib and library/references.bib — and reports four things (APA-zh units use the same single bib; entries carry langid and the build groups 中文/西文):

ClassMeaningFails build?
Brokencited [@key] with no matching bib entryyes
Unusedbib entry never citedno (warning)
Incompletebib entry missing author / title / yearyes
Duplicatesame key in two places in the course repo — two units, or a unit and library/ — so one source has two diverging audit histories; fix with ./fw refs promote <key>yes

What it does NOT do

It confirms citation keys resolve to bib entries; it does not confirm the source actually supports the claim, nor that locators point at the right page. Run this last, as a consistency pass — the substantive review (cross-reading each claim against <unit>/refs/<key>.md) is source-kit § Source review. A green check-citations.py over unverified sources is a false sense of safety.

Backs the /check_cite macro.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.