Alt Text logo

Alt Text

Organization
posit-dev
alt-text

Generate and improve accessible alt text for data visualizations and images in R packages and Quarto documents. Use when the user wants to add, improve, or audit alt text for figures in a pkgdown site or .qmd files. Activate for requests that mention fig-alt, fig.alt, figure descriptions, or alt text in the context of an R package or Quarto document.

Overview

Publisherposit-dev
Repositoryskills
Skill namealt-text
Stars
516
Forks
53
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by posit-dev on GitHub. Read the source before you install it.

Installation

Install the Alt Text AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/posit-dev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/alt-text .claude/skills/alt-text
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alt Text in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alt Text on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alt Text is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Write Accessible Alt Text

Generate accessible alt text for data visualizations and images in this project.

ARGUMENTS

  • label: (optional) specific figure label or chunk to target
  • file: (optional) specific file to process

Detect project type

Before proceeding, identify the project context and read the relevant reference. Check for a _pkgdown.yml file in the project root to detect a pkgdown site:

bash
ls _pkgdown.yml 2>/dev/null && echo "pkgdown" || echo "not pkgdown"
  • pkgdown site (_pkgdown.yml present) → read references/pkgdown.md
  • Quarto documents (no _pkgdown.yml, .qmd files present) → read references/quarto.md

If the context is still ambiguous, ask the user which format they are working in.

Key advantage: source code access

Unlike typical alt text scenarios where you only see an image, we have access to the code that generates each chart. Use this to extract precise details:

From plotting code:

  • Variable mappings → exact variable names for axes
  • Color/fill mappings → what color encodes
  • Plot type functions → scatter, histogram, line chart, etc.
  • Trend lines or fitted curves → overlaid statistical fits
  • Faceting/subplots → number of panels and what varies
  • Color scales → encoding scheme (sequential, diverging, categorical)
  • Axis labels and titles → customized labels

From data generation code:

  • Random distributions → expected distribution shape
  • Transformations → what was done to data
  • Feature engineering → preprocessing applied
  • Filtering/subsetting → what subset is shown

From surrounding prose:

  • Text before/after the chunk explains the purpose and key insight
  • Chapter context tells you what the figure is meant to teach
  • This is often the best source for the "key insight" part of alt text

Three-part structure (Amy Cesal's formula)

  1. Chart type — first words identify the format
  2. Data description — axes, variables, what is shown
  3. Key insight — the pattern or takeaway (often found in surrounding text)

Relationship to captions

Read the caption (fig-cap, fig.cap) first. Alt text should complement, not duplicate it:

  • If the caption states the insight, alt text can focus on describing the visual structure
  • If the caption is generic, alt text should include the key insight
  • Together they should give a complete understanding

Content rules

Include:

  • Chart type as first words
  • Axis labels and what they represent
  • Specific values/ranges when code reveals them (e.g., "peaks between 25–50")
  • Number of panels/facets
  • What color/size encodes if used
  • The key pattern that supports the surrounding point

Exclude:

  • "Image of…" or "Chart showing…" (screen readers announce this)
  • Decorative color descriptions (unless color encodes data)
  • Information already in the caption
  • Implementation details (package names, function internals)

Length guidelines

ComplexitySentencesWhen to use
Simple2–3Single geom, no facets, obvious pattern
Standard3–4Multiple geoms or color encoding
Complex4–5Faceted, multiple overlays, nuanced insight

Quality checklist

  • Starts with chart type (Scatter chart, Histogram, Faceted bar chart, etc.)
  • Names the axis variables
  • Includes specific values/ranges from code when informative
  • States the key insight from surrounding prose
  • Complements (not duplicates) the caption
  • Would make sense to someone who cannot see the image
  • Uses plain language (avoid jargon like "geom" or "aesthetic")

Template patterns

Scatter chart:

Scatter chart. [X var] along the x-axis, [Y var] along the y-axis.
[Shape: linear/curved/clustered]. [Specific pattern, e.g., "peaks when X is 25–50"].
[Any overlaid fits or annotations].

Histogram:

Histogram of [variable]. [Shape: right-skewed/bimodal/normal/uniform].
[If transformed: "after [transformation], the distribution [result]"].
[Notable features: outliers, gaps, multiple modes].

Bar chart:

Bar chart. [Categories] along the x-axis, [measure] along the y-axis.
[Key comparison: which is highest/lowest, relative differences].
[Pattern: increasing/decreasing/grouped].

Tile/raster chart:

Tile chart [or heatmap]. [Row variable] along the y-axis, [column variable] along the x-axis.
Color encodes [what value]. [Pattern: where values are high/low].
[If faceted: "N panels showing [what varies]"].

Faceted chart:

Faceted [chart type] with [N] panels, one per [faceting variable].
[What's constant across panels]. [What changes/varies].
[Key comparison or insight across panels].

Correlation heatmap:

Correlation [matrix/heatmap] of [what variables]. [Arrangement].
[Overall pattern: mostly positive/negative/mixed].
[Notable clusters or strong/weak pairs].
[If relevant: contrast with expected behavior].

Before/after comparison:

[N] [chart type]s arranged [vertically/in grid]. [Top/Left] shows [original].
[Bottom/Right] shows [transformed]. [Key difference/similarity].
[If overlay: "[color] curve shows [reference]"].

Line chart with overlays:

[Line/Scatter] chart with overlaid [fits/curves]. [Axes].
[Number] of [lines/fits] shown: [list what each represents].
[Which fits well vs. poorly and why].

Example

Code context:

r
plotting_data |>
  ggplot(aes(value)) +
  geom_histogram(binwidth = 0.2) +
  facet_grid(name~., scales = "free_y") +
  geom_line(aes(x, y), data = norm_curve, color = "green4")

Surrounding prose says: "Normalization doesn't make data more normal"

Caption: "Normalization doesn't make data more normal. The green curve indicates the density of the unit normal distribution."

Good alt text:

Faceted histogram with two panels stacked vertically. Top panel shows
original data with a bimodal distribution. Bottom panel shows the same
data after z-score normalization, retaining the bimodal shape. A green
normal distribution curve overlaid on the bottom panel clearly does not
match the data, demonstrating that normalization preserves distribution
shape rather than creating normality.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alt Text AI skill do?

Generate and improve accessible alt text for data visualizations and images in R packages and Quarto documents. Use when the user wants to add, improve, or audit alt text for figures in a pkgdown site or .qmd files. Activate for requests that mention fig-alt, fig.alt, figure descriptions, or alt text in the context of an R package or Quarto document.

Why use Alt Text on TypingMind?

Because you install it once and use it with any model. Alt Text is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alt Text in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/posit-dev/skills/tree/main/alt-text. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alt Text?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alt Text?

As many as you like. As long as a model supports skills, you can use Alt Text with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alt Text AI skill free?

Yes. It is published on GitHub by posit-dev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇