agentleFS
DBQDSSDBQDSS/aimath-translations-skill/skills/latex-array-diagram-audit/SKILL.md

latex-array-diagram-audit

Skill5 starsChanged 56 days agoMITView on GitHub

Audit commutative diagrams in a LaTeX translation against the original PDF. Convert array-based diagrams to tikzcd where needed and verify existing tikzcd arrow directions, styles, labels, rows, and columns. Use for diagram fidelity review or repair, not for converting neural architectures or general flowcharts into commutative diagrams.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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 tikzcd for commutative/morphism diagrams.

    line 17
  2. Very specific:

    Use the translated .aux to locate the translated statement or figure.

    line 24
  3. Distinctive:

    Check node order and relative placement, including entire missing rows/columns.

    line 41
  4. Distinctive:

    Check leading and trailing zeros, quotient nodes, and exact-sequence endpoints.

    line 42
  5. Distinctive:

    Check each edge's endpoints, direction, label, and label side.

    line 43
  6. Distinctive:

    Use the actual full build, including bibliography and index steps when needed.

    line 79
  7. Distinctive:

    If texindy has a locale failure, use a working locale and verify the generated index file, rather than trusting a stale survivor.

    line 80
  8. Distinctive:

    Remove only temporary artifacts created by this audit after review.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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

LaTeX Commutative Diagram Audit

Locate diagrams, compare the original and translated pages, make the smallest confirmed correction, then compile and inspect the repaired diagrams.

Scope

  • Inspect array-based mathematical diagrams and existing tikzcd blocks.
  • Distinguish diagrams from ordinary arrays, formulas, filtrations, and matrices.
  • Use tikzcd for commutative/morphism diagrams. Neural-network architecture diagrams, computation graphs, flowcharts, and plots may need ordinary TikZ or faithful source assets instead.

Locate The Evidence

  1. Inventory all relevant environments with file names and source lines.
  2. Use the translated .aux to locate the translated statement or figure. Its page field is a translated printed page, not the original book's page. Determine each PDF's physical/printed page mapping independently; do not transfer a translation offset to the original.
  3. Find the original statement by its heading, number, or nearby prose. Formula text extraction can be incomplete; failure to find a formula is not proof that it is absent. A statement and a diagram inside its proof may lie on different pages.
  4. Render corresponding regions and compare them. If direct image inspection is unavailable, use text and geometric evidence and report the missing visual pass.

For a vector PDF, page.get_drawings() can help locate nonhorizontal strokes and distinguish arrowheads from plain inclusion lines. It is supporting evidence: text glyphs or raster graphics may not appear as drawing segments.

Compare Every Diagram

  • Check node order and relative placement, including entire missing rows/columns.
  • Check leading and trailing zeros, quotient nodes, and exact-sequence endpoints.
  • Check each edge's endpoints, direction, label, and label side.
  • Distinguish ordinary, hooked, two-headed, equal, double, dashed, and curved edges.
  • Preserve crossings and commutativity as the original states or depicts them.
  • A field tower or ideal chain may use lines without arrowheads. Preserve that choice; do not assume an upward arrow is equivalent to an unheaded inclusion line.

Rebuild Only Confirmed Defects

For an array assembled with \Big\downarrow and \xrightarrow, rebuild the same node layout with tikzcd, retaining every label. Examples of edge options: \ar[r,"\phi"], \ar[d,"\tau \mapsto \tau|_L"], hook, two heads, equal, no head, and no head, double. Empty rows change the distance to the target node; use explicit directions such as ddl when required.

An exact-sequence grid with zero padding can use:

\begin{tikzcd}[column sep=1.1em, row sep=1.1em]
 & 0 \ar[d] & 0 \ar[d] & 0 \ar[d] & \\
0 \ar[r] & B\cap C \ar[r, hook] \ar[d, hook] & B \ar[r, two heads] \ar[d, hook] & BC/C \ar[d, hook] \ar[r] & 0 \\
0 \ar[r] & A\cap C \ar[r, hook] \ar[d, two heads] & A \ar[r, two heads] \ar[d, two heads] & AC/C \ar[d, two heads] \ar[r] & 0 \\
0 \ar[r] & A\cap C/B\cap C \ar[r, two heads] \ar[d, two heads] & A/B \ar[r, two heads] \ar[d, two heads] & AC/BC \ar[r, two heads] \ar[d, two heads] & 0 \\
 & 0 & 0 & 0 &
\end{tikzcd}

The top zeros have downward arrows; the bottom zeros have no outgoing vertical arrows. This is an example, not a universal grid: select every edge from the actual source.

Edit And Verify

  • Edit the same file sequentially. For batch replacements, confirm every old block occurs exactly once before applying changes.
  • Preserve the source encoding and line endings. Avoid unrelated prose or macro changes; keep project-specific adjustments in the existing preamble when possible.
  • Use the actual full build, including bibliography and index steps when needed. If texindy has a locale failure, use a working locale and verify the generated index file, rather than trusting a stale survivor.
  • Require resolved references and inspect repaired pages for alignment, clipping, arrowheads, labels, and narrow-column overflow. Source correctness alone does not prove the diagram renders correctly.
  • Report changed diagrams, source pages, checks, and unresolved uncertainties. Remove only temporary artifacts created by this audit after review.

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.