# Infrastructure Documentation

> Skill for the documentation infrastructure module providing figure management, image handling, markdown integration, and API glossary generation. Use when managing research figures, inserting images into manuscripts, auto-numbering figures, or generating API documentation.

- **Type:** Skill
- **Install:** `agentstack add skill-docxology-template-documentation`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [docxology](https://agentstack.voostack.com/s/docxology)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [docxology](https://github.com/docxology)
- **Source:** https://github.com/docxology/template/tree/main/infrastructure/documentation
- **Website:** https://doi.org/10.5281/zenodo.19139090

## Install

```sh
agentstack add skill-docxology-template-documentation
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Documentation Module

Figure management, image handling, and documentation integration for research manuscripts.

## FigureManager (`figure_manager.py`)

Automatic figure numbering, cross-referencing, and metadata tracking:

```python
from infrastructure.documentation import FigureManager, FigureMetadata

manager = FigureManager()

# Register a figure (label auto-generated from filename if omitted)
manager.register_figure(
    filename="results.png",
    caption="Experimental results showing...",
    label="fig:results",
    section="Results",
)

# Get figure metadata by label
meta = manager.get_figure("fig:results")  # Returns FigureMetadata | None
```

## ImageManager (`image_manager.py`)

Image file management and processing:

```python
from pathlib import Path
from infrastructure.documentation import ImageManager, FigureManager

img_manager = ImageManager(FigureManager())

# Insert a registered figure into a markdown file under a section
img_manager.insert_figure(Path("manuscript/01_intro.md"), "fig:results", section="Results")

# Validate that referenced figures exist and labels are registered
errors = img_manager.validate_figures(Path("manuscript/01_intro.md"))  # list[(label, error)]
```

## MarkdownIntegration (`markdown_integration.py`)

Auto-insertion of figures and content into markdown manuscripts:

```python
from pathlib import Path
from infrastructure.documentation import MarkdownIntegration, FigureManager

integrator = MarkdownIntegration(Path("manuscript"), FigureManager())

# Insert a figure into a named section of a markdown file
integrator.insert_figure_in_section(Path("manuscript/01_intro.md"), "fig:results", "Results")
```

## Glossary & API Documentation (`glossary_gen.py`)

Generate API documentation and glossaries from source code:

```python
from infrastructure.documentation import build_api_index, generate_markdown_table, ApiEntry
from infrastructure.documentation.glossary_gen import inject_between_markers

# Build API index from source
api_entries = build_api_index(source_dir)

# Generate markdown table
table = generate_markdown_table(api_entries)

# Inject between markers in a markdown file (operates on text, not a file path)
updated_text = inject_between_markers(
    text=original_text,
    begin_marker="",
    end_marker="",
    content=table,
)
```

**CLI:**

```bash
# Positional args: SRC_DIR GLOSSARY_MD (no --project flag)
uv run python -m infrastructure.documentation.generate_glossary_cli \
  projects/{name}/src projects/{name}/manuscript/98_symbols_glossary.md

# With no args, defaults to /project/src and /project/manuscript/98_symbols_glossary.md
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [docxology](https://github.com/docxology)
- **Source:** [docxology/template](https://github.com/docxology/template)
- **License:** Apache-2.0
- **Homepage:** https://doi.org/10.5281/zenodo.19139090

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** yes
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-docxology-template-documentation
- Seller: https://agentstack.voostack.com/s/docxology
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
