Introducing a new way to review your PRs.

Read the announcement

bas3line / ascii

Animated ascii art for web pages, in TypeScript: React, Next.js, Astro, or one HTML tag

View on GitHub

21 documents · Updated Oct 26, 2026

docs / ascii-rest-skill-reference

ASCII REST skill reference

The ascii-rest skill package gives an AI assistant a focused guide for adding animated ASCII art, text banners, image conversions, and custom pieces to web pages, READMEs, and terminals. It combines a task order with offline reference pages so the assistant can select a suitable piece, output path, framework pattern, or creative-kit level without inventing names or usage rules. This page is the detailed reference for AI assistant skills.

Skill scope

The skill is designed for requests that mention ascii.rest or need a retro or terminal-style visual. It treats the package as a set of reusable pieces and banners, plus a kit for making new pieces, then maps the user's target environment to the right way to use them. The page guidance covers React, Next.js, Astro, Vue, Svelte, plain HTML, TypeScript, GitHub READMEs, and terminals.

Assistant needSkill guidance
Find existing artBrowse the named piece catalog by category and visual subject.
Add art to a pageChoose the React, Next.js, Astro, Vue, Svelte, HTML, or TypeScript path that matches the project.
Support script-free outputUse an animated SVG for a README or another image-only target.
Add terminal outputUse the command-line path for previews, banners, splash screens, or still text.
Make text artUse the banner guidance for block-letter text and motion.
Convert an imageUse the image-to-ASCII guidance or the kit's image conversion path.
Create new artStart with a kit recipe, then use lower-level kit areas only when a recipe does not fit.

References: skills/…/SKILL.md• L1-20 skills/…/SKILL.md• L46-59 skills/…/index.md• L60-73

Assistant work sequence

The skill asks the assistant to identify the destination before selecting art. This prevents the same piece from being added with a mismatched interface, such as browser components for a GitHub README or a page-only approach for a CLI.

When the target is known, the assistant selects a real piece name from the catalog or the package list. It then applies the matching integration guidance, checks the result in the target environment, and uses the FAQ when the output is empty, mis-sized, or unexpectedly still.

flowchart TD
    A[User request] --> B[Identify target environment]
    B --> C[Choose existing piece or banner]
    C --> D[Choose output path]
    D --> E[Apply framework or output guidance]
    E --> F[Check the result]
    C --> G[Use creative kit when no piece fits]
    G --> D

The package uses dashed names for pieces in runtime and URL-facing use. Imported piece exports use camel case, so the reference material keeps discovery and code use distinct.

References: skills/…/SKILL.md• L12-20 skills/…/SKILL.md• L124-153 skills/…/api.md• L26-43

Reference topic map

The offline references are grouped by the decision an assistant needs to make. Start pages explain the product and first use. Integration pages describe where a piece runs. Output pages cover places that cannot run page scripts. Creation pages describe how to make art. Reference pages define the public surface and command behavior.

Topic groupMain questionReference topics
StartWhat is the package and how can it be used?Introduction, quick start, install, examples
FrameworksHow does the art enter an application?React, Next.js, Astro, HTML, TypeScript, own copy
APIWhat public package parts are available?API, piece contract, banners
OutputHow does art work without live page code?SVG, GitHub README, terminal, CLI
Input conversionHow can an image become ASCII art?Image to ASCII
CreationHow can an assistant make new art?Kit, looks, motion, widgets, fields, drawing, math, 3D scenes, particles, effects, layouts, images, materials, SVG drawings
RecoveryWhat explains a failed or unexpected result?Questions and FAQ

The map keeps broad product guidance separate from detailed API lookup. An assistant can read only the topic that matches the request instead of loading every reference page.

References: skills/…/SKILL.md• L155-191 skills/…/index.md• L60-73

API reference

The API reference is the contract map for package imports, public functions, components, and shared types. It presents the package by import path so an assistant can connect a user goal to the smallest public surface that supports it.

The central concept is a piece, which is one animation with metadata and a frame-producing function. A piece can be mounted directly, used by a framework adapter, converted to SVG, or played in a terminal. This common shape lets the assistant move the same visual between output targets without changing what the visual is.

API areaAssistant use
Core packageMount a piece and discover or load it by name.
Piece catalogImport reusable pieces or inspect a piece's options and types.
Banner packageTurn user text into a piece that follows the same output paths.
Framework adaptersRender pieces and banners through React, Astro, or browser custom elements.
SVG outputProduce animated SVG strings for files, images, and script-free contexts.
Terminal outputPlay pieces, print banners, or return a still frame in Node.

References: skills/…/api.md• L4-43 skills/…/api.md• L107-139 skills/…/api.md• L451-489

Framework guidance

The framework references describe the same piece model through different entry points. React and Next.js use components. Astro renders an initial frame during page generation and then activates motion. Plain HTML uses custom elements loaded by one module script. Vue and Svelte can use the same custom-element path inside a bundled app.

The main framework choice is therefore about how the page loads and runs the piece, not about a different art system.

EnvironmentAssistant-facing entry pointMain behavior
React<Ascii> and <Banner>Plays imported pieces or loads named pieces in the browser.
Next.jsReact componentsUses names across server boundaries and modules inside client components.
AstroAscii and Banner Astro componentsPlaces the first frame in HTML before browser motion starts.
Plain HTML<ascii-art> and <ascii-banner>Adds art with no install or build step.
Vue or SvelteCustom elementsUses the HTML tags after the element support is enabled in the bundled app.
Other bundled appsCustom elements or mount()Uses browser tags or direct mounting from TypeScript.

The references also mark the key behavior that affects assistant choices: text pieces use a text surface while colored pieces use a canvas-like surface. Reduced-motion settings hold a still frame, and pieces pause when they are not visible.

References: skills/…/SKILL.md• L22-66 skills/…/react.md• L4-8 skills/…/react.md• L51-73 skills/…/nextjs.md• L48-78 skills/…/astro.md• L28-34 skills/…/html.md• L35-46

Output guidance

The output references explain how the same piece becomes useful in places with different runtime limits. Live web targets can run the piece over time. README and image targets use SVG animation. Terminal targets use a full-screen play mode, persistent banner output, or one still frame.

flowchart LR
    P[Piece or banner] --> W[Live web page]
    P --> S[Animated SVG]
    P --> T[Terminal output]
    W --> R[React, Astro, HTML, or mount]
    S --> M[README or image]
    T --> Q[Preview, splash, banner, or log frame]

Only logos, companies, and distros have hosted README SVG URLs. Other pieces need an SVG generated from the piece and stored for the README to use. The README guidance favors two theme-aware SVG links for light and dark GitHub themes. Terminal guidance distinguishes temporary screen playback from banner text that remains in scrollback.

References: skills/…/SKILL.md• L80-100 skills/…/pieces.md• L1-4 skills/…/svg.md• L39-51 skills/…/readme.md• L6-31 skills/…/terminal.md• L20-31 skills/…/terminal.md• L72-125

The banner reference covers user-supplied text as a first-class visual. A banner is a piece with block-letter text, a shadow, optional color, and a motion effect, so the assistant can use it anywhere a normal piece can run.

The guidance is split by output form. Components and tags expose banner choices as props or attributes. SVG and README paths add layout choices such as a tagline, a companion logo, and a background. Terminal output fits the result to the available width.

Banner concernGuidance
Letter formChoose a built-in font or a custom font where supported.
Depth and styleChoose a shadow and fill.
MotionUse glint, type, or still behavior.
ThemeUse page-aware or explicit colors.
CompositionAdd padding, a tagline, or companion art in SVG output.
Text limitsUse the supported letters, digits, spaces, and punctuation.

The assistant should preserve the distinction between the banner creator in ascii.rest/banner and the terminal printer in ascii.rest/terminal. One returns a reusable piece. The other writes output for a CLI.

References: skills/…/SKILL.md• L68-78 skills/…/banners.md• L41-81 skills/…/banners.md• L92-118 skills/…/svg.md• L114-159

Creative kit guidance

The kit is the creation layer for art that is not already in the piece catalog. It starts with named recipes that express looks, motion, and widgets in plain words. These results remain normal pieces, so the assistant can send them through the same web, SVG, and terminal output paths.

The reference set moves from simple composition to deeper control:

  • Looks create moving pictures such as seas, plasma, stars, rain, and galaxies.
  • Motion applies named movement such as spinning, floating, bouncing, orbiting, and pulsing.
  • Widgets create complete interface visuals such as gauges, charts, progress bars, cards, and countdowns.
  • Composition combines pieces with layers, rows, columns, grids, timing, borders, and effects.
  • Lower-level tools cover fields, drawing, math, 3D scenes, particles, materials, image conversion, and SVG conversion.

The recommended path is to try a recipe first. Kit options use plain words for common choices such as speed, amount, direction, scale, and palette. The assistant should only move to fields, scenes, particles, drawing, or the raw piece builder when the higher-level recipes cannot express the requested result.

References: skills/…/SKILL.md• L109-143 skills/…/kit.md• L4-8 skills/…/kit.md• L54-71 skills/…/kit.md• L189-207

Recipe layer

Recipes provide named, checked building blocks for common visual goals. They use shared words for speed, scale, amount, direction, palette, and naming, which gives an assistant a stable vocabulary for composing art.

Looks describe the visual field. Motions wrap any drawable object. Widgets package a complete UI-like display. These groups can be chained together, so a recipe can remain short while still combining a background, a subject, and a movement.

References: skills/…/kit-looks.md• L4-8 skills/…/kit-motion.md• L4-12 skills/…/kit-widgets.md• L4-8

Primitive layer

The primitive layer supports custom visuals when no named recipe fits. It provides a grid-based piece model plus tools for formulas, drawing, geometry, particles, materials, effects, layouts, images, and SVG parts.

The kit keeps these creations compatible with the package's players. A custom result is still passed to the same rendering and output surfaces as a library piece.

References: skills/…/kit.md• L281-347 skills/…/kit.md• L349-425 skills/…/pieces.md• L109-129

Image conversion guidance

Image conversion turns a logo, photo, or SVG into a piece rather than treating it as a separate output type. The browser tool keeps the source image local and can produce an embed snippet, README SVGs, and a piece file. The kit provides the code path for browser images and PNG input in Node.

The assistant should choose the image tool when the source visual is supplied by the user or when a logo does not exist in the catalog. After conversion, the resulting piece follows the normal output guidance.

References: skills/…/images.md• L4-10 skills/…/SKILL.md• L102-107

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to the skill's work order must stay aligned with the target-selection and piece-name rules in the introduction and API references.
  • Changes to an import path or component contract must update the API topic map and the framework or output guidance that routes assistants to that path.
  • Changes to piece naming must keep dashed runtime names distinct from camel-case exports in assistant-facing examples.
  • Changes to the piece catalog must keep the count, category descriptions, hosted SVG limits, and name-to-export guidance consistent.
  • Changes to kit recipe groups must preserve the recommended progression from recipes to lower-level primitives.
  • Changes to README or SVG behavior must keep light and dark output guidance consistent.

Important failure modes

TriggerConsequenceGuard
Assistant invents a piece nameThe requested art draws nothing.Search the piece reference or use the package list before choosing a name.
Assistant uses a live page path in a READMEGitHub shows no working animation.Use an animated SVG and theme-aware light and dark links.
Assistant passes a piece module through a Next.js server componentThe server-to-client boundary rejects the function-bearing value.Pass a piece name or keep the module in a client component.
Assistant treats a colored piece as plain text without choosing mono outputThe piece loses its intended color rendering or sizing behavior.Follow the text-versus-colored output guidance.
Assistant uses a kit primitive before checking recipesThe result takes more work and can miss an existing supported pattern.Start with a named look, motion, or widget.
Banner text contains unsupported charactersThe banner omits characters or cannot render.Use the supported character set and check banner errors.

Key files

FileWhy to read it
skills/…/SKILL.mdDefines the assistant's work order, target selection, package rules, troubleshooting, and reference index.
skills/…/index.mdGives the product overview, supported use modes, piece categories, and AI-agent entry point.
skills/…/api.mdMaps public imports, pieces, banners, framework adapters, SVG output, and terminal output.
skills/…/quickstart.mdShows the shortest supported paths for HTML, React or Next.js, and terminal use.
skills/…/readme.mdDefines the script-free GitHub README path and theme-aware hosted SVG use.
skills/…/svg.mdExplains conversion of pieces and banners into animated SVG output.
skills/…/terminal.mdExplains terminal playback, persistent banners, still frames, and CLI splash use.
skills/…/banners.mdDefines reusable text banners and their shared visual options.
skills/…/kit.mdDefines the creative-kit model and its progression from recipes to primitives.
skills/…/pieces.mdDefines the 240-piece catalog, runtime names, exports, output surfaces, and hosted SVG limits.