dwgx/SmartCLI / skills/cmd-art
cmd-art
VerifiedDesign and render terminal/CMD visual effects and ASCII art from a one-line request via the pluggable `fx` engine (30 effects, hot-swappable and themeable, plus scripted shows). Effects include donut, matrix rain, plasma, fire, a spinning 3D ball, a solar-system orrery, Game of Life, wireframe cube, 3D text banners, rainbow/lolcat gradient text, starfield, tunnel, fireworks, image-to-ASCII, and more. Use when the request is for a terminal animation, ANSI/CLI art, or a new console effect. Pure Python stdlib; truecolor.
fx/effects/plasma.py
View on GitHub"""Plasma / interference wave field (legacy cmd-art effect, framework port).
Sum-of-sines field (Lode Vandevenne's classic), rendered as truecolor
BACKGROUND cells so the whole screen becomes the canvas.
"""
from __future__ import annotations
import colorsys
import math
from ..core import RESET, rgb
from ..base import Effect, FrameCtx, Param
from ..registry import register
def plasma_frame(t, width=80, height=40, palette="hsv", theme=None):
"""One plasma frame. ``palette``: hsv | rgb | theme (theme gradient)."""
cx, cy = width / 2.0, height / 2.0
lines = []
for y in range(height):
row = []
last = None
for x in range(width):
v = (math.sin(x * 0.10 + t)
+ math.sin(y * 0.15 + t * 0.8)
+ math.sin((x + y) * 0.08 + t * 1.2)
+ math.sin(math.hypot(x - cx, y - cy) * 0.12 - t))
n = (v + 4.0) / 8.0
if palette == "rgb":
r = 128 + 127 * math.sin(math.pi * n)
g = 128 + 127 * math.sin(math.pi * n + 2 * math.pi / 3)
b = 128 + 127 * math.sin(math.pi * n + 4 * math.pi / 3)
c = (int(r), int(g), int(b))
elif palette == "theme" and theme is not None:
if theme.hsv:
c = theme.cycle(n)
else:
c = theme.color_at(n)
else:
rf, gf, bf = colorsys.hsv_to_rgb(n, 1.0, 1.0)
c = (int(rf * 255), int(gf * 255), int(bf * 255))
if c != last:
row.append(rgb(*c, bg=True))
last = c
row.append(" ")
lines.append("".join(row) + RESET)
return "\n".join(lines)
@register
class Plasma(Effect):
name = "plasma"
aliases = ("wave",)
description = "Full-screen interference wave field (sum of sines, bg-colored cells)."
tags = ("field", "classic", "psychedelic")
default_fps = 24.0
params = (
Param("palette", "str", "theme", "color source", choices=("theme", "hsv", "rgb")),
)
def render(self, ctx: FrameCtx) -> str:
return plasma_frame(ctx.t, width=ctx.width, height=ctx.height,
palette=ctx.params["palette"], theme=ctx.theme)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |