
Preview
Captures screenshots of SwiftUI #Preview blocks so the agent can see the view
Preview is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 102
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Preview
This skill drives the axe command line tool to render a SwiftUI View's #Preview block and save it as a PNG. The agent resolves a view name to its Swift file, runs the report subcommand, which waits for rendering and retries on failure, and then opens the resulting image to describe the layout to the user.
For files with several #Preview blocks, the skill can save one image per preview into a directory, or fall back to the oneshot mode with a title or index selector. The oneshot mode captures right after the app reports ready, so it can produce blank images for slow-rendering views.
The skill expects the axe CLI and idb_companion to be installed, and a project configuration (.axerc or a --scheme flag) for building. It includes a one-line install command for when axe is missing. Screenshots reflect the files saved on disk, so unsaved edits will not appear.
When your agent uses it
Capture a SwiftUI preview screenshot using axe CLI. Use when the user wants to see the current appearance of a SwiftUI View, check layout, or verify changes visually.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Bash(axe *), Bash(cat *), Read(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 1 file (3 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the axe-preview plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add k-kohey/axe
/plugin install axe-preview@axeOr copy only this skill to ~/.claude/skills/preview:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k-kohey/axe.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/preview &&
cp -R "$tmp/claude-plugin/skills/preview" ~/.claude/skills/preview &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/preview inside it instead.
Copy the skill folder to ~/.agents/skills/preview to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k-kohey/axe.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/preview &&
cp -R "$tmp/claude-plugin/skills/preview" ~/.agents/skills/preview &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/preview inside it instead.
Copy the skill folder to ~/.cursor/skills/preview to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k-kohey/axe.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/preview &&
cp -R "$tmp/claude-plugin/skills/preview" ~/.cursor/skills/preview &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/preview inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/k-kohey/axe.git --path claude-plugin/skills/previewOr copy the folder to ~/.gemini/skills/preview yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/preview:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k-kohey/axe.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/preview &&
cp -R "$tmp/claude-plugin/skills/preview" ~/.copilot/skills/preview &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/preview inside it instead.
Get the folder:
git clone --depth 1 https://github.com/k-kohey/axe.gitThen copy axe/claude-plugin/skills/preview into your agent's skills folder as preview. Agents that support SKILL.md read one folder per skill.
What it does
- Preview screenshot capture
- Renders a SwiftUI #Preview block to a PNG image using the axe CLI.
- Rendering wait and retries
- The report mode waits for rendering to finish and retries on failure, with an adjustable delay.
- Multiple preview selection
- Selects a specific preview by title or index, or saves every preview in a file to a directory.
- Build artifact reuse
- Can skip the Xcode build and reuse artifacts when capturing several previews in a row.
- Error log reporting
- Reads the error log when a capture fails and reports likely causes to the user.
Good for
- Show me how the ProfileView looks right now
- Check whether my new login layout renders correctly
- Capture every preview in OnboardingView.swift
- Verify visually that my button style change worked
Preview FAQ
What does the skill need to run?
It needs the axe CLI and idb_companion installed, plus a .axerc file or a --scheme option. If axe is missing, the skill gives a curl install command.
Does Preview change my source code?
No. It captures a screenshot of the current files on disk and removes generated screenshot and log files once they are no longer needed.
Why might a screenshot come out blank?
Oneshot mode captures as soon as the app signals readiness with no rendering delay, so slow views can appear blank. The report mode is preferred for this reason.
Can it capture a specific preview in a file with several?
Yes, through the oneshot mode with the --preview option, which takes a title or index.
How do I install Preview in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/preview to use it in all your projects, or to .claude/skills/preview in one project. Or install the axe-preview plugin, which includes it: /plugin marketplace add k-kohey/axe, then /plugin install axe-preview@axe.
Does Preview run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Preview?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Preview?
The closest alternatives to Preview are Preview report, UI review, Fix UI, Build and verify and Inspect view.
Where this comes from
- Description: from the skill's own SKILL.md.
More from k-kohey/axe

Iteratively adjusts a SwiftUI view until its preview matches a design image
- Open source
- 102 GitHub stars
- Developer tools

Lets your agent inspect a running iOS simulator app's UIKit and SwiftUI view hierarchy
- Open source
- 102 GitHub stars
- Developer tools

Captures SwiftUI #Preview screenshots across files into one visual report
- Open source
- 102 GitHub stars
- Developer tools

Captures a SwiftUI preview and reviews its layout, HIG fit and accessibility
- Open source
- 102 GitHub stars
- Developer tools


