Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lingzhi227 avatar

Backward Traceability

  • 1.2k installs
  • 255 repo stars
  • Updated February 27, 2026
  • lingzhi227/agent-research-skills

backward-traceability is an agent skill that creates verifiable clickable links between research paper claims and the exact code or data outputs that produced each numeric result for developers who publish reproducible M

About

backward-traceability is an agent-research skill extracted from data-to-paper workflows that makes every numeric claim in a research paper traceable to code-generated output. The skill defines LaTeX patterns using \hypertarget to mark values in code output, \hyperlink to reference those values in paper text with clickable PDF jumps, and \num to evaluate derived formulas at compile time with stored explanations. Label formats connect ref_numeric_values.py, referencable_text.py, and latex_to_pdf.py style pipelines so readers click a reported metric and land on the exact artifact that produced it. Developers reach for backward-traceability when writing ML or data-science papers where reviewers demand reproducibility beyond a static results table. The skill fits teams generating LaTeX from Python pipelines who need audit-grade backward links from prose to computation.

  • Generates \hypertarget markers in code-generated LaTeX output
  • Creates \hyperlink references in paper text that jump to source values in compiled PDF
  • Implements \num macro for compile-time evaluated formulas with automatic explanations
  • Enforces strict label format {prefix}{line_number}{letter} for unambiguous provenance
  • Supports 4+ HypertargetPosition modes extracted from data-to-paper pipeline

Backward Traceability by the numbers

  • 1,170 all-time installs (skills.sh)
  • +35 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #235 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lingzhi227/agent-research-skills --skill backward-traceability

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.2k
repo stars255
Security audit2 / 3 scanners passed
Last updatedFebruary 27, 2026
Repositorylingzhi227/agent-research-skills

How do you link paper claims to reproducible code outputs?

Create verifiable, clickable links between research paper claims and the exact code or data that produced each numeric result.

Who is it for?

Researchers and ML engineers publishing LaTeX papers from Python pipelines who need clickable backward traceability from every reported number to source output.

Skip if: Developers writing application READMEs, API docs, or papers without LaTeX pipelines or code-generated numeric artifacts to link.

When should I use this skill?

A developer needs clickable PDF links from paper metrics to code output, LaTeX hypertarget labels, or reproducible numeric traceability in a research manuscript.

What you get

LaTeX hypertarget labels, hyperlink references, compile-time \num formulas, and clickable PDF traceability from prose metrics to code artifacts.

  • Hypertarget label definitions
  • Hyperlink reference markup
  • Compile-time formula annotations

Files

SKILL.mdMarkdownGitHub ↗

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

Label format: {prefix}{line_number}{letter} where letter = a, b, c... for multiple values on same line.

Step 2: Reference in Paper Text

Use \hyperlink to create clickable references in the paper:

Our method achieves \hyperlink{R1a}{45.3}\% accuracy
($\pm$\hyperlink{R1b}{2.1}).

Step 3: Use \num for Computed Values

For values derived from other values, use \num{} for compile-time evaluation:

% \num{formula, "explanation"} → evaluated at compile time
The improvement is \num{45.3 - 38.7, "accuracy gain"}\%.

Step 4: Generate Appendix Code Listing

Create an appendix with the full code listing, with \hypertarget anchors at relevant lines:

\section*{Appendix: Code Listing}
\begin{lstlisting}[escapechar=@]
@\hypertarget{code1}{}@result = model.evaluate(test_data)
@\hypertarget{code2}{}@accuracy = result['accuracy']
\end{lstlisting}

Step 5: Verify Traceability

  • Every number in the paper text must have a corresponding \hypertarget in the code
  • Every \num{} formula must evaluate correctly
  • Click-test: every hyperlink in the PDF must jump to the correct code line

LaTeX Setup

Required packages:

\usepackage{hyperref}
\usepackage{listings}

Rules

  • Every numeric result in the paper MUST trace to code output
  • Never manually type numbers — always reference tagged outputs
  • Use \num{} for any derived/computed values
  • Code listing in appendix must match actual executed code
  • Verify all hyperlinks resolve correctly after compilation

Related Skills

  • Upstream: experiment-code, data-analysis
  • Downstream: paper-compilation
  • See also: paper-assembly

Related skills

How it compares

Pick backward-traceability over generic documentation skills when publishing LaTeX research papers that must link prose metrics back to code-generated outputs.

FAQ

What LaTeX commands does backward-traceability use?

backward-traceability uses \hypertarget to mark values in code-generated output, \hyperlink to reference those values in paper text with clickable PDF jumps, and \num to evaluate derived formulas at compile time with explanations.

What problem does backward-traceability solve?

backward-traceability solves unverifiable research claims by creating clickable backward links from every numeric result in a LaTeX paper to the exact code or data artifact that produced that value.

Where do backward-traceability patterns come from?

backward-traceability patterns are extracted from data-to-paper tooling such as ref_numeric_values.py, referencable_text.py, and latex_to_pdf.py workflows that generate referencable LaTeX from Python pipelines.

Is Backward Traceability safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Documentationdocsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.