Skip to content

Makes every number in a LaTeX paper hyperlink back to the code line that produced it, with compile-time formulas.

CCM score
52 of 100
skills.sh installs
2.3K
GitHub stars
483
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full traceability flow: tagging code outputs with \hypertarget, referencing them via \hyperlink, and evaluating derived values with \num{}
  • Includes ref_numeric_values.py with --scan to report orphan references and unreferenced numbers, and --verify to cross-check paper values against results.txt
  • Enforces that no numeric result is typed by hand and that the appendix code listing matches the code actually executed
  • Designed for research papers where reproducibility and data integrity must be verified before submission

Install

$ npx -y skills add lingzhi227/agent-research-skills --skill backward-traceability -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Backward Traceability

Make every number in the final PDF hyperlink back to the exact code line that produced it.

Input

  • $0 — Paper project directory containing code and LaTeX files

References

  • Traceability patterns and LaTeX commands: ~/.claude/skills/backward-traceability/references/traceability-patterns.md

Scripts

Scan hypertarget/hyperlink references

python ~/.claude/skills/backward-traceability/scripts/ref_numeric_values.py \
  --scan paper/main.tex --output report.json

Reports: all hypertargets, hyperlinks, orphan references, unreferenced numeric values.

Verify cross-reference integrity

python ~/.claude/skills/backward-traceability/scripts/ref_numeric_values.py \
  --verify paper/main.tex --code-output results.txt

Cross-checks values between paper text and code output. Reports mismatches.

Workflow

Step 1: Tag Code Outputs

For every numeric value produced by experiment code, add hypertarget tags:

# In experiment code output:
print(f"\\hypertarget{{R1a}}{{45.3}}")  # Mean accuracy
print(f"\\hypertarget{{R1b}}{{2.1}}")   # Std deviation

Details

Repository
github.com/lingzhi227/agent-research-skills
Categories
Research & Academic, Writing & Content
First seen
Jun 3, 2026

Questions

What does the backward-traceability skill do?

The backward-traceability skill makes every number in the final PDF hyperlink back to the exact code line that produced it. It uses \hypertarget and \hyperlink LaTeX commands and evaluates \num{formula} expressions at compile time.

How do I install the backward-traceability skill?

Run npx -y skills add lingzhi227/agent-research-skills --skill backward-traceability -y in a project to install it. Once installed, the backward-traceability skill lets the agent tag code outputs and link them from paper text.

Who should use backward-traceability in a research paper workflow?

Researchers who need reproducibility and data integrity checks for their paper can use backward-traceability. It helps verify that each reported value in a LaTeX paper matches the code output that produced it.

Where does backward-traceability sit in the Research & Academic category?

Backward-traceability is in the Research & Academic category alongside research, paper-context-resolver, repo-intake-and-plan, minimal-run-and-audit and env-and-assets-bootstrap. Its distinct focus is linking PDF numbers back to the code lines that generated them.

More from lingzhi227/agent-research-skills

All 31

Similar to Backward Traceability

More Research & Academic