
If you're running a self-hosted photo management system called TrailSnap, this CLI skill lets Claude query your entire library without you typing commands. It pulls photos by date, album, location, or tagged faces, then generates those minimal aesthetic HTML galleries with the soft beige tones and rounded corners everyone's doing now. The workflow is smart: Claude tests if the tool is installed, asks for your API token if needed, then chains queries to narrow down results before fetching actual image URLs. Worth noting it includes a location timeline feature that maps where you've been over time, which is genuinely useful for travel recaps. The HTML output spec is very opinionated about the vintage journal aesthetic, so if that's not your vibe, you'll be editing templates.
$ npx -y skills add lc044/trailsnap --skill trailsnap-cli --agent claude-codeInstalls into .claude/skills of the current project.
当原生 TrailSnap MCP 工具不可用时,使用 trailsnap CLI 查询 TrailSnap;两者同时可用时优先 MCP。
使用以下命令检查是否安装了 trailsnap 工具,如果没有安装则可以参考install.md文档进行安装。
trailsnap -v
首次使用需要配置 API 地址和 ts_ 开头的只读 Agent Token。用以下命令检查配置:
trailsnap photos list --limit 1
如果收到配置错误,询问用户这两个信息,然后执行;不要把 Token 输出到日志或提交到仓库:
trailsnap config set --url <API_BASE_URL> --token <YOUR_API_TOKEN>
使用前可以通过 trailsnap <command> -h 或 trailsnap <command> <subcommand> -h 查看每个命令的详细帮助信息。通常情况下,你需要先根据用户的问题逐步筛选出检索条件(一个简单的示例),然后查询符合条件的照片列表。
locations timeline 命令能够查到时间和空间上的信息,是一个很好的工具,返回一个足迹时间轴(某一段时间去了那个地方)。medias get --format url 获取地址,保留返回值,不要编造路径。使用 Python 运行脚本:
trailsnap <command> <subcommand> [options]
Sponsors