Skip to content

Commit d66a1fe

Browse files
committed
Merge branch 'development' of https://github.com/mendix/docs into development
2 parents bbe9d92 + 6f4a8f4 commit d66a1fe

3 files changed

Lines changed: 83 additions & 6 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: docs-alt-text
3+
description: Generates W3C-compliant alt text for images in documentation pages. Analyzes each image's purpose and adds descriptive alt text for informative images or empty alt for decorative images, improving accessibility and SEO.
4+
user-invocable: true
5+
disable-model-invocation: false
6+
---
7+
8+
> **Accessibility skill:** Generates alt text following W3C/WCAG 2.1 guidelines. Analyzes actual image content plus context to create concise, meaningful descriptions.
9+
10+
## Workflow
11+
12+
Follow this order for each image:
13+
14+
1. **STEP 1 - View the image file** (REQUIRED)
15+
- Extract image src path from figure shortcode
16+
- Convert path: `src="/attachments/path/file.png"``static/attachments/path/file.png`
17+
- Use Read tool to view the actual image
18+
- Understand what the image shows BEFORE reading context
19+
20+
2. **STEP 2 - Read surrounding context**
21+
- Read the heading, preceding/following text, list item, or numbered step
22+
- Understand the image's purpose within the documentation
23+
- Consider if context + image together make the image informative or decorative
24+
25+
3. **STEP 3 - Determine if informative or decorative**
26+
- **Technical docs assumption:** Images are informative unless obviously decorative
27+
- **Informative:** Images that convey information → write descriptive alt text
28+
- **Decorative:** Images where the information is already given in adjacent text, or pure visual styling with no informational value → use `alt=""`
29+
30+
4. **STEP 4 - Generate alt text**
31+
- **If decorative, use `alt=""`.** Never omit the alt attribute entirely.
32+
- **If informative, generate descriptive alt text:**
33+
- Focus on the information the image communicates, not what it looks like
34+
- Give the most concise description possible
35+
- Maximum 30 words (flag complex images needing longer descriptions for body text)
36+
- Don't include "screenshot of", "image of", or "picture of" (screen readers already announce it's an image)
37+
- Use Mendix terminology
38+
- Avoid redundancy with nearby text
39+
- **Based on surrounding context:**
40+
- In a procedure: emphasize the action/element relevant to the step (e.g., "Download button in Registration dialog")
41+
- Showing UI elements: name the relevant elements (e.g., "Properties pane")
42+
- Showing structure or relationships: describe what entities/components are connected (e.g., "Domain model with Customer and Order entities connected by one-to-many association")
43+
- Showing logic or process flow: describe what the flow accomplishes (e.g., "Microflow that retrieves FileDocument list and updates encryption keys")
44+
45+
5. **STEP 5 - Edit the figure shortcode**
46+
- Use Edit tool to add/update only the `alt` attribute
47+
- Preserve all other attributes: `class`, `width`, `max-width`, `link`
48+
- Maintain exact indentation and spacing
49+
50+
## Special Cases
51+
52+
- **Images in numbered lists:** Common in procedures—describe the procedural step shown
53+
- **Before/after sequences:** Describe what changed or the state shown
54+
- **Existing alt text:** May update if it's empty, generic, or poor quality (e.g., `alt=""`, `alt="button"`, `alt="before"`)
55+
- **File format icons:** Use format name (e.g., "PDF", "ZIP", "Word document")
56+
- **Complex diagrams:** If needs >30 words, flag to user and suggest adding description to body text
57+
58+
## What NOT to do
59+
60+
- Don't modify `src` path or attributes other than `alt`
61+
- Don't change surrounding text or document structure
62+
- Don't process images outside the determined scope
63+
- Don't generate alt text based solely on filename—always view the image first
64+
65+
## After Processing
66+
67+
Report summary:
68+
- How many images processed
69+
- How many updated
70+
71+
**Always suggest user review:** Recommend that the user review the images themselves to confirm alt text accuracy, as AI-generated descriptions may miss important nuances or context-specific details.

.claude/skills/docs-polish/SKILL.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
name: docs-polish
3-
description: Proofreads a single documentation page and improves clarity, readability, and word choice without changing meaning or reorganizing structure. Simplifies complex sentences, applies style guide standards, and converts passive voice to active voice. Use when the user wants to polish, improve language and clarity, make more readable, check style guide compliance, or clean up documentation while preserving its structure.
3+
description: Applies style guide standards to a documentation page without changing meaning or reorganizing structure. This includes fixing grammar, improving clarity and readability, simplifying complex sentences, using active voice, and standardizing terminology and formatting. Use when the user wants to polish, check style guide compliance, improve language, or clean up documentation while preserving its structure.
44
user-invocable: true
55
disable-model-invocation: false
66
---
77

8-
> **Skill progression:** This does everything `/docs-proofread` does plus clarity improvements and style guide enforcement. If only grammar and spelling fixes are needed, use `/docs-proofread`. For deeper reorganization, suggest `/docs-enhance`.
8+
> **Skill progression:** This does everything `/docs-proofread` does plus style guide enforcement including clarity improvements. If only grammar and spelling fixes are needed, use `/docs-proofread`. For deeper reorganization, suggest `/docs-enhance`. If missing alt text is found, suggest `/docs-alt-text`.
99
1010
Improve clarity and readability without changing meaning, structure, or paragraph order:
1111

1212
**docs-polish should**:
1313
* Read Mendix style guides first (in parallel): `grammar-formatting.md`, `terminology.md`, and `product-naming-guide.md` from `/content/en/docs/community-tools/contribute-to-mendix-docs/style-guide/`
1414
* Fix all spelling, grammar, and punctuation errors
15-
* Add missing alt text to images (use simple, factual descriptions)
15+
* Check all figure shortcodes for missing alt text. If the alt text parameter is missing, insert `alt=""` as a placeholder.
1616
* Ensure required front matter fields are present (title, url, description) and make descriptions concise and action-oriented
1717
* Fix broken Markdown syntax
1818
* Fix capitalization and terminology inconsistencies
@@ -24,10 +24,15 @@ Improve clarity and readability without changing meaning, structure, or paragrap
2424
* Apply Mendix style guide standards (overrides the Microsoft Writing Style Guide)
2525
* Apply Microsoft Writing Style Guide standards, unless they conflict with the Mendix style guide standards
2626

27+
**After completing edits**:
28+
* Report what was changed in a concise summary
29+
* If any images were found with missing or empty alt text, state "I found [N] image(s) with missing alt text. Consider running `/docs-alt-text` to generate alt text."
30+
2731
**docs-polish should NOT**:
2832
* Move paragraphs or restructure sections (that's `/docs-enhance`)
2933
* Change technical meaning or accuracy
3034
* Significantly increase document length
35+
* Generate alt text for images
3136
* Change command syntax, code identifiers, variable names, placeholders, or any other text that appears in code formatting (inline backticks or code blocks). Code-formatted text represents literal technical content that must remain unchanged. If you notice an issue with code-formatted text, flag it in the chat but don't edit it directly.
3237

3338
Every edit should serve a clear purpose in making the text easier to read, scan, and understand.

content/en/docs/community-tools/contribute-to-mendix-docs/using-ai-tools.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ Do not modify `.claude/settings.json` or other files in the `.claude/` directory
5151
This repository includes custom Claude Code skills optimized for documentation work:
5252

5353
* `/docs-proofread` - Checks spelling, grammar, punctuation, and basic Markdown formatting
54-
* `/docs-polish` - Improves clarity, readability, and word choice without changing meaning
54+
* `/docs-polish` - Applies the Mendix style guide and improves clarity, readability, and word choice without changing meaning
5555
* `/docs-enhance` - Performs comprehensive editing including reorganization, restructuring, and stronger phrasing
56-
* `/docs-review` - Analyzes documentation and generates suggestions for improvements
5756
* `/docs-add` - Adds new content to an existing page while preserving original structure
58-
* `/docs-pr-review` - Reviews all changes in the PR rather than just a single document
57+
* `/docs-review` - Analyzes a page and generates suggestions for improvements without making any edits
58+
* `/docs-pr-review` - Reviews all changes in a PR rather than just a single document
59+
* `/docs-alt-text` - Suggests W3C-compliant alt text for images on a page
5960

6061
These skills are available to all contributors using Claude Code with this repository.
6162

0 commit comments

Comments
 (0)