← Back to Skills Marketplace
willoscar

Citation Anchoring

by WILLOSCAR · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
213
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install citation-anchoring
Description
Regression-check citation anchoring (citations stay in the same subsection) to prevent “polish drift” that breaks claim→evidence alignment. **Trigger**: cita...
README (SKILL.md)

Citation Anchoring (regression)

Purpose: prevent a common failure mode: polishing rewrites text and accidentally moves citation markers into a different ### subsection, breaking claim→evidence alignment.

Inputs

  • output/DRAFT.md
  • output/citation_anchors.prepolish.jsonl (baseline; created by draft-polisher on first run)

Outputs

  • output/CITATION_ANCHORING_REPORT.md (PASS/FAIL + drift examples)

Baseline policy

  • draft-polisher captures a baseline once per run: output/citation_anchors.prepolish.jsonl.
  • Subsequent polish runs should keep per-H3 citation sets stable.

Workflow (analysis-only)

Role:

  • Auditor: only checks and reports; does not edit.

Steps:

  1. Load the baseline anchors.
  2. Parse the current output/DRAFT.md into ### subsections and extract citation keys per subsection.
  3. Compare current sets to baseline sets:
  • keys added/removed within a subsection
  • keys that migrated across subsections
  1. Write output/CITATION_ANCHORING_REPORT.md:
  • - Status: PASS only if no drift is detected
  • otherwise, - Status: FAIL with a short diff table + examples

Notes

If you intentionally restructure across subsections:

  • delete output/citation_anchors.prepolish.jsonl and regenerate a new baseline (then treat that as the new regression anchor).

Troubleshooting

Issue: baseline anchor file is missing

Fix:

  • Run draft-polisher once to generate output/citation_anchors.prepolish.jsonl, then rerun the anchoring check.

Issue: citations intentionally moved across subsections

Fix:

  • Delete output/citation_anchors.prepolish.jsonl and regenerate a new baseline (then treat that as the new regression anchor).
Usage Guidance
This skill's SKILL.md describes a safe, offline check (read baseline JSONL + DRAFT.md → produce an anchor report). However the package includes a large pipeline/tooling codebase and an executor that can run repo scripts via subprocess.run. Before installing or enabling this skill: 1) Inspect repo_root/scripts/run.py (or confirm it does not exist) — that's the executable the bundle may call. 2) Review tooling/executor.py and any entrypoint scripts to understand what will be executed and what files will be touched. 3) If you only need the simple anchor check, consider extracting or running a minimal script that performs the JSONL vs DRAFT.md comparison rather than enabling the entire bundle. 4) Run the skill in a sandbox workspace with non-sensitive files first. 5) If you do enable autonomous invocation, prefer least-privilege workspaces and ensure no secrets or sensitive files are present, because the executor could execute repo-local scripts that perform broader actions.
Capability Analysis
Type: OpenClaw Skill Name: citation-anchoring Version: 1.0.0 The skill bundle provides a regression testing framework called 'citation-anchoring' designed to ensure that citations remain within their designated subsections during text polishing. The code in the `tooling/` directory consists of standard utility functions for file management (JSONL, YAML, TSV), text processing, and extensive quality validation logic in `tooling/quality_gate.py`. While `tooling/executor.py` utilizes `subprocess.run` to execute internal scripts, the execution is scoped to the local workspace and follows the expected operational pattern for OpenClaw skills. No evidence of data exfiltration, malicious persistence, or prompt injection was found.
Capability Assessment
Purpose & Capability
The skill's stated purpose is a narrow, analysis-only citation anchoring check (read a baseline JSONL and the DRAFT.md, then write a report). However the bundle contains many pipeline definitions and sizeable tooling modules (tooling/*.py, pipelines/*.md, a 275kB quality_gate module, executor logic, etc.). That large pipeline/tooling footprint is disproportionate for a small regression check and suggests the skill is a general pipeline component rather than a minimal, single-purpose checker.
Instruction Scope
SKILL.md itself is well-scoped: it says 'analysis-only', 'Network: none', and describes reading output/DRAFT.md and the baseline JSONL and writing output/CITATION_ANCHORING_REPORT.md. However included code (tooling/executor.py) can run subprocesses (it constructs and runs repo_root/scripts/run.py) and reads/writes many workspace files. The instructions do not explicitly tell the agent to execute arbitrary scripts, but the bundled executor enables that behavior if used — this expands runtime scope beyond the simple file-compare described in SKILL.md.
Install Mechanism
No external install/downloads are declared (no install spec). The skill requires only a Python binary (python3 or python) which is appropriate for included Python code. No third-party network downloads are present in the provided metadata.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. That aligns with the described purpose (local file analysis).
Persistence & Privilege
The skill is not marked always:true and uses the platform default (agent-invocable/autonomous allowed). It does not request to modify other skills or system-wide config in the provided files. Still, autonomous invocation combined with executor subprocess logic increases the potential blast radius if misused.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install citation-anchoring
  3. After installation, invoke the skill by name or use /citation-anchoring
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of citation-anchoring skill to detect and report citation drift across `###` subsections during editing/polishing. - Compares baseline citation anchors with current draft to ensure claim→evidence alignment is preserved. - Outputs a PASS/FAIL report with details of any drift, but does not modify content. - Requires a baseline anchor file generated from a previous `draft-polisher` run. - Designed as an analysis-only networkless tool; safe for audit use.
Metadata
Slug citation-anchoring
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Citation Anchoring?

Regression-check citation anchoring (citations stay in the same subsection) to prevent “polish drift” that breaks claim→evidence alignment. **Trigger**: cita... It is an AI Agent Skill for Claude Code / OpenClaw, with 213 downloads so far.

How do I install Citation Anchoring?

Run "/install citation-anchoring" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Citation Anchoring free?

Yes, Citation Anchoring is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Citation Anchoring support?

Citation Anchoring is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Citation Anchoring?

It is built and maintained by WILLOSCAR (@willoscar); the current version is v1.0.0.

💬 Comments