技能图谱SKILLSGROVE
技能图谱/视频制作/neethanwu/ascii-art/ascii-art

ascii-art

安装

$npx skills add https://github.com/neethanwu/ascii-art --skill ascii-art
$git clone --depth 1 https://github.com/neethanwu/ascii-art.git /tmp/ascii-art && mkdir -p ~/.claude/skills && cp -r /tmp/ascii-art/. ~/.claude/skills/ascii-art
请帮我安装这个 Agent Skill:https://github.com/neethanwu/ascii-art/tree/cf596737315ebac3f16b22192d536c4653dd4dbb/ ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MITConverts text, images, or video to ASCII art with multiple styles and export formats. Use when the user asks to create ASCII art, convert images/videos to text art, or mentions ascii-art, braille art, or block art.
以下 SKILL.md 内容转载自 neethanwu/ascii-art(提交 cf59673),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 ascii-art contributors 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

ASCII Art Converter

Setup

Before first use, run the environment setup (idempotent, <1s after first run):

bash {{SKILL_DIR}}/scripts/setup.sh

Input Detection

  1. File path → check extension: .jpg/.jpeg/.png/.webp/.bmp/.tiff → image, .mp4/.webm/.avi/.mov/.mkv → video, .gif → check if animated (video) or static (image)
  2. Pasted/attached image → save IMMEDIATELY before doing anything else. Run:
    {{SKILL_DIR}}/scripts/.venv/bin/python {{SKILL_DIR}}/scripts/save_image.py --clipboard
    
    This grabs the image from the system clipboard (still there after paste), saves to ascii/tmp/ with a timestamped name, and prints the saved path to stdout. Use that output path as --input. If --clipboard fails (no image in clipboard), fall back to asking: "Please provide the file path (e.g. ~/Downloads/photo.jpg)." You can also pass a known file path directly: save_image.py <path>. Do NOT proceed to options until you have a valid file path on disk.
  3. Plain text (no file, or file doesn't exist) → text (FIGlet banner)
  4. Nothing provided → ask what they want to convert

Options Prompt

Parse the user's message for pre-specified options. Then prompt for unspecified options using AskUserQuestion.

  • "defaults" or "just do it" → skip prompting, use all defaults
  • "random" or "surprise me" → skip prompting, use --random
  • All options specified → skip prompting

Use questions array (max 4 per call, 3 options per question). List ALL choices with numbers in the question text. Top 3 as selectable options — user can type any number/name in free-text. No "Other" option. Default as option 1.

Image/video — ask in two rounds:

  1. Round 1 (4 questions): Style → Color → Export → Background
  2. Round 2 (only if export is interactive or tsx): Mouse Mode → Animation

Text: Font → Color → Export → Background (single round).

Image/video options

Option Choices Default
Style classic, braille, block, edge, dot-cross, halftone, particles, retro-art, terminal classic
Color grayscale, original, matrix, amber, custom (hex/named) grayscale
Ratio original, 16:9, 4:3, 1:1, 3:4, 9:16 original
Background dark, light, transparent dark
Dither none, floyd-steinberg, bayer, atkinson none
Font size 6-30 px 14
Export png, html, svg, txt, md, clipboard, interactive, tsx auto (image→png, video→gif)
Mouse mode push, attract push
Animation none, noise-field, intervals, beam-sweep, glitch, crt none

Mouse mode and animation only apply to interactive/tsx exports. Only ask when export is interactive or tsx. Don't ask for --hover-strength, --area-size, or --spread — use defaults.

Text options

Option Choices Default
Font standard, doom, banner, slant, big, small, block, lean, mini, script, shadow, speed, ansi_shadow, ansi_regular standard
Color grayscale, original, matrix, amber, custom grayscale
Background dark, light, transparent dark
Export terminal (stdout), txt, md, png, html, svg, clipboard terminal

Interactive/tsx exports require image or video input — text is not supported.

Disambiguation

  • "block" as a style = Unicode block elements (█▓▒░) for images
  • "block" as a font = block-letter FIGlet font for text
  • For block-style text art, use --font ansi_shadow or --font block
  • Custom colors: hex (#ff6600) or named (coral, skyblue). Translate creative descriptions to hex.

Running the Conversion

{{SKILL_DIR}}/scripts/.venv/bin/python {{SKILL_DIR}}/scripts/convert.py \
  --input "<input>" \
  --type <text|image|video> \
  --style <style> \
  --color <color> \
  --background <background> \
  --export <format> \
  [--dither <algorithm>] \
  [--ratio <ratio>] \
  [--font-size <pixels>] \
  [--cols <number>] \
  [--font <font_name>] \
  [--custom-color "<hex>"] \
  [--mouse-mode <push|attract>] \
  [--animation <preset>] \
  [--invert] [--random] \
  [--fps <number>] \
  [--filename <custom_name>]

Output

All files save to an ascii/ folder in the current working directory (created automatically).

  • Text (terminal): prints to stdout + auto-copies to clipboard. Show in a code block.
  • File exports (png, html, svg, txt, md, gif): show the file path. Use Read tool to display images inline.
  • Interactive HTML: show the file path. Suggest: open <path> to view in browser.
  • React TSX: show the file path. Show usage: import { AsciiArt } from './<filename>'
  • Never preview in terminal for image/video/interactive exports.

Error Handling

  • Video fails: likely missing ffmpeg or opencv. Suggest: pip install opencv-python-headless
  • Image fails: check file exists and is a valid image format
  • Interactive/tsx + text: prints error — interactive requires image/video input

Follow-up

After showing the result, offer to: try a different style/color, adjust settings, export in another format, or try random mode. Remember the previous input path for re-runs.

查看许可证全文(MIT)
MIT License

Copyright (c) 2026 ascii-art contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.