code-presentation

Apply token-driven, accessibility-aware code-block presentation to UI documentation.

Updated May 6, 2026
One-click install
npx skills add https://github.com/shipiit/shipit-ui-design --skill code-presentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-presentation
Source: https://github.com/shipiit/shipit-ui-design/tree/main/skills/code-presentation
Command: npx skills add https://github.com/shipiit/shipit-ui-design --skill code-presentation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents developer-content from looking generic by enforcing consistent, token-driven, accessibility-aware code-block presentation.

Core Features & Use Cases

  • Senior code-block anatomy: terminal/editor/plain chrome variants with captioned figure wrapping for coherent reading and assistive-tech navigation.
  • Token-driven syntax highlighting: maps syntax token-types to the project’s existing CSS variables to preserve dark mode contrast and brand alignment.
  • Interactive polish: adds a first-class copy button with hover/active/focus/disabled states and safe clipboard feature-detection.
  • Readability controls: supports opt-in line numbers and opt-in line highlighting using calibrated subtle tints.
  • Choice-aware highlighters: guides selection among hand-rolled tokenization, Shiki, or Prism based on language count, bundle budget, SSR target, and theme control.

Quick Start

Ask Claude to generate or refine a CodeBlock or CodeSample for your UI docs and ensure it uses the project tokens for syntax colors, chrome, and interaction states.

Frequently Asked Questions about code-presentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I style code blocks for documentation UI with dark mode and accessibility support?

Code blocks for documentation UI require token-driven syntax highlighting mapped to CSS variables, ensuring dark mode parity and accessibility landmarks. Apply senior patterns like captioned figure wrapping and interactive copy buttons with full state styling for coherent reading and assistive-tech navigation.

What is the best way to add a copy-to-clipboard button to syntax highlighted code samples?

Copy-to-clipboard buttons need first-class interactive states including hover, active, focus, and disabled, alongside safe clipboard feature-detection. Implement copy actions within terminal, editor, or plain chrome variants to ensure consistent interactive polish across all documentation code blocks.

How do I choose between Shiki and Prism for syntax highlighting in MDX docs?

Choose between Shiki and Prism by evaluating language count, bundle budget, SSR target, and theme control requirements. Guide highlighter selection based on whether your MDX docs need hand-rolled tokenization or framework-driven parsing to maintain optimal performance and visual consistency.

Can I enforce UI tokens for syntax highlighting colors across developer marketing pages?

Yes, syntax highlighting can map token-types directly to existing project CSS variables, preserving brand alignment and dark mode contrast across developer marketing pages. Token-driven theming ensures consistent visual presentation without hardcoding colors into code block components.

Does code presentation support reduced-motion compliance for interactive snippet dashboards?

Reduced-motion compliance is enforced alongside accessibility landmarks and full interactive state styling for snippet-heavy dashboards. Code presentation patterns ensure copy actions, line highlighting, and chrome variants respect user motion preferences while maintaining readable structure.

How do I add line numbers and line highlighting to README code blocks without breaking readability?

Line numbers and line highlighting should be opt-in features using calibrated subtle tints to maintain readability. Wrap README and changelog code blocks in captioned figures with terminal or editor chrome variants, ensuring highlighted lines remain accessible without overwhelming the visual hierarchy.