pixel-path README

项目的 README,来自 github.com/jonwheatley/pixel-path。合并为一个 markdown 文件:README.md。

Pixel Path

A Claude Code skill that turns any two places into a pixel-art fly-through of the real road. Ask Claude for "a pixel path from Bath to Bristol" and it:

Flying through Bath, England, at the moderate level

Bath, England: real streets from OpenStreetMap, art generated with the moderate kit.

What it is for

A first-person, pixel-art view of any real road, built from the real map. Useful wherever you want a real place or route on screen:

What you get

A folder with an index.html. Open it through any static web server and you are moving down the real road:

Three levels of detail

Before anything slow happens, the first step prints an estimate for your route, and the skill asks you to choose. Only the art costs money: $0.18 a picture at RetroDiffusion's rd_pro__default (October 2026). Cost depends on the number of regions (distinct looks along the route), not on distance.

level pictures per region 1 region 2 regions what you get
placeholders 0 $0 $0 code-drawn stand-ins for every picture
sparse 4 $0.72 $1.44 three kinds of building and a tree. Every lot is still filled; mirrored and tinted copies stretch the pictures.
moderate about 14, + 4 landmarks $3.24 $5.76 about ten buildings across the main kinds, two trees, a shrub, a street prop, the four best-known landmarks
detailed about 26, + 10 landmarks $6.48 $11.16 up to six variants of each kind of building, three trees, two shrubs, three street props, ten landmarks

The levels are nested, so moving up a level only pays for the new pictures. The exact quote is free and comes after the bake. Allow about 25% on top for re-rolls: in testing, 10% (Bath) to 34% (Manhattan) of pictures came back cut off or on a background. The cleanup dropped them, and the self-check re-rolled them within the budget.

Examples

Bath to Bristol at moderate (two regions, Georgian Bath, then Victorian Keynsham and Bristol, 32 pictures, $5.76):

Bath to Bristol at moderate

Kyoto Station to Kinkaku-ji, Japan, at sparse (one region, four pictures, $0.72):

Kyoto at sparse

Both runs passed the full self-check, including the sweep: 627 and 345 moving frames, with no sky through or between buildings. The estimate printed after routing matched the exact quote in every test run.

Install

As a plugin. In Claude Code:

/plugin marketplace add jonwheatley/pixel-path
/plugin install pixel-path@pixel-path

By hand. Copy this folder into your skills folder, so that the skill is at ~/.claude/skills/pixel-path/SKILL.md. For a single project, use .claude/skills/pixel-path/ inside it.

Then ask Claude: "make me a pixel path from Paris to Versailles".

Requirements and setup

How it checks itself

The skill doesn't call a route done when the code runs. It calls it done when the pictures pass:

  1. Every building is a solid. Each building is laid along its real line and always gets a shaded end wall, so it never reads as a flat card. A neighbour that joins it paints over the part it covers.

    • Cracks under 3 m are closed.
    • In a dense street, a building mapped far back is pulled up to the sidewalk.
    • A backing building stands behind every gap in a built-up row.
    • A second row of real buildings shows across squares and car parks.
  2. Cleanup. Each picture is cleaned and its backdrop flood-filled away. Holes in facades are filled, including a roof-to-ground gap between two houses drawn in one picture. Pictures that still carry a background, painted sky, a cut-off edge or a sliver are dropped. A contact sheet of every picture is written for Claude to look at.

  3. Layout check. The whole route is laid out exactly as the page will draw it, checking for gaps in street walls and for a building with the same picture as its neighbour.

  4. The sweep. Every 75 m of built-up road, the camera moves and looks straight ahead and 30° to each side. The sky is painted magenta and every building is drawn into a mask, and it counts:

    • sky seen through a building
    • slits of sky between two parts of the same street wall that reach down to the ground

    The 20 worst frames are written side by side with the problem marked.

  5. Review. Claude is told to look at the worst frames and the samples and keep fixing until the sweep is clean.

Credits and licences

The page shows a credits line that must stay visible wherever a fly-through is shown.

Known limits

pixel-path (jonwheatley/pixel-path)

正在搜索数据库…

这是什么?Pixel Path 是一个 Claude Code 技能,它能把两地之间的真实路线转换成第一人称视角的像素艺术穿越动画,并从 OpenStreetMap 和高程数据中融入真实的建筑、地形和地标。
这是独立应用,还是在 Claude Code 内运行的?它是一个 Claude Code 技能,不是独立应用:你把它安装到 Claude 的技能文件夹中,然后用日常语言向 Claude 请求路线,生成的结果是一个普通的 index.html 文件夹,可通过任意静态网页服务器打开。
如何安装和使用?可以将其作为 Claude Code 插件安装,也可以手动把文件夹复制到技能文件夹中,使技能最终位于 ~/.claude/skills/pixel-path/SKILL.md(若仅用于单个项目,则为 .claude/skills/pixel-path/)。然后直接让 Claude 生成路线,例如“从巴斯到布里斯托尔的像素路径”。
除了 Claude Code,我还需要什么?生成占位路线只需 Node 18 或更高版本;要生成真正的艺术图像,需要一个有余额的 RetroDiffusion 账户,并将 API 密钥设置为环境变量;可选的截图自检功能需要 Node 20+,并安装 Playwright 和 Chromium。
主要的局限有哪些?它只能生成驾车路线,不包含交通、行人或天气;OpenStreetMap 中缺失的建筑会获得看似合理的猜测形状和高度;同一区域复用同一套美术素材,因此很长的街道会出现重复;Overpass(地图数据来源)速度较慢且可能超时,因此一条长路线可能需要多达一小时。
这个技能会看到我的 RetroDiffusion API 密钥吗?不会,密钥由你自己设置为环境变量,或存放在 macOS 钥匙串中;技能从不在对话中索取,也不会将其打印到任何地方。
生成一条路线要花多少钱?只有美术图像需要付费,RetroDiffusion 每张图 $0.18;一条包含两个区域的路线,费用从使用代码绘制占位图的 $0 起,到精细等级(每个区域最多 26 张图加地标)约 $11.16 不等。
技能在交付前如何检查自己的成果?它会渲染所有生成图片的缩略图总览,将整条路线铺开以发现街道墙面的缝隙;然后每隔 75 米移动一次镜头,查看建筑之间是否透出天空;并让 Claude 审查最糟糕的画面,重新生成不合格的美术图像。
生成的穿越动画可以用来做什么?可用于驾驶或无尽跑酷类游戏的真实道路关卡、旅行回顾和旅游内容、直播背景和 lo-fi 循环画面,或作为带注释的伪 3D 渲染器和 OpenStreetMap 烘焙流程,供学习或扩展使用。
大小
6.9 MB
星标
331
更新
提交Oct 12
时长
1个月
提交 · 90 天