SuperAPI AI 工具集

specstory-link-trail

编程与开发

查看项目

更新于 10-15 09:42

技能介绍

用途

SpecStory Link Trail 用于追踪 SpecStory AI 编程会话中所有被获取的 URL。它会审查你的 .specstory/history 会话,汇总所有通过 WebFetch 工具调用获取的 URL,便于审计开发期间访问的外部资源。

主要能力

  • 解析 SpecStory 历史文件中的 WebFetch 工具调用
  • 提取 URL、状态码和上下文
  • 按会话分组并附带时间戳
  • 区分成功获取与失败获取
  • 对重复 URL 去重并统计获取次数
  • 对大型历史文件使用流式解析
  • 失败获取在可用时包含 HTTP 状态码

为什么追踪链接

在 AI 辅助编程过程中,助手会代你获取文档、API 和资源。Link Trail 帮助你:

  • 审计访问了哪些外部资源
  • 找回之前看过的文档页面
  • 复查可能需要重试的失败获取
  • 了解你的研究模式

使用方式

斜杠命令

用户输入 脚本行为
/specstory-link-trail 历史中的所有会话
/specstory-link-trail today 仅今天的会话
/specstory-link-trail last session 最近一次会话
/specstory-link-trail 2026-01-22 指定日期的会话
/specstory-link-trail *.md 自定义 glob 模式

直接运行脚本

# All sessions
python skills/specstory-link-trail/parse_webfetch.py .specstory/history/*.md | \
  python skills/specstory-link-trail/generate_report.py -

# Specific session
python skills/specstory-link-trail/parse_webfetch.py .specstory/history/2026-01-22*.md | \
  python skills/specstory-link-trail/generate_report.py -

# Sessions from a date range
python skills/specstory-link-trail/parse_webfetch.py .specstory/history/2026-01-2*.md | \
  python skills/specstory-link-trail/generate_report.py -

输出

Link Trail Report
=================

Sessions analyzed: 5
Total URLs fetched: 23 (18 successful, 5 failed)

Session: fix-authentication-bug (2026-01-22)
--------------------------------------------
Successful fetches:
  - https://docs.github.com/en/rest/authentication (×2)
  - https://jwt.io/introduction
  - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

Failed fetches:
  - https://internal.company.com/api/docs (403 Forbidden)

Session: add-caching-layer (2026-01-21)
---------------------------------------
Successful fetches:
  - https://redis.io/docs/latest/commands
  - https://docs.python.org/3/library/functools.html#functools.lru_cache
  - https://stackoverflow.com/questions/... (×3)

Summary by Domain
-----------------
  github.com: 5 fetches
  stackoverflow.com: 4 fetches
  docs.python.org: 3 fetches
  redis.io: 2 fetches
  (9 other domains): 9 fetches

向用户呈现结果

脚本输出即为报告。直接呈现,无需额外评论,但你可以:

  • 突出关键发现——最常访问的域名、任何失败的获取
  • 提供后续操作——“需要我重试失败的获取吗?”或“需要其中某个的详细信息吗?”

示例响应

以下是近期会话的链接轨迹:

[此处为脚本输出]

我注意到有 5 次失败的获取——大多是要求身份验证的内部 URL。访问最多的域名是 github.com(5 次获取),主要用于其 REST API 文档。

你是否希望我:

  • 重试任何失败的获取?
  • 打开其中任何链接?
  • 筛选到特定会话?

适用场景

  • 审计 AI 辅助编程期间访问的外部资源
  • 找回之前看过的文档页面
  • 复查可能需要重试的失败获取
  • 了解研究模式

限制

  • URL 从历史中的 WebFetch 工具调用提取,仅覆盖通过 WebFetch 获取的链接
  • 失败获取的 HTTP 状态码仅在可用时包含
  • 其他限制暂未提供