history-to-skill

history-to-skill

Turns GitHub repository history into a cited maintainer skill for coding agents, providing tools to collect evidence, query the knowledge graph, and inspect bundles.

Category
访问服务器

README

<div align="center">

history-to-skill

Turn GitHub history into a cited maintainer skill for your coding agent.

CI PyPI Python License: MIT

</div>

Pull requests, issues, commits, CI, and architecture docs contain the maintenance knowledge a README leaves out. history-to-skill connects that evidence in a repository knowledge graph and gives an Agent Skills-compatible coding agent the material to generate a source-linked operating guide.

A connected slice of the Flask repository maintenance evidence graph

The image is a real pallets/flask run: 20 completed changes + 13 documents → 267 nodes, 928 edges, and 3 change communities. See the reproducible Flask example.

Get started in 30 seconds

Install the CLI, MCP server, and Agent Skill:

uv tool install 'history-to-skill[mcp]'
history-to-skill install --platform codex
codex mcp add history-to-skill -- history-to-skill-mcp

Then ask your coding agent:

/history-to-skill pallets/flask

Claude Code and Cursor users can select their own skill directory convention. See the coding-agent setup for their MCP configuration:

history-to-skill install --platform claude
history-to-skill install --platform cursor

Use --project to install inside the current repository, or --force to replace an older installation. With pipx, run pipx install 'history-to-skill[mcp]'.

The MCP server exposes three stateless tools: collect repository evidence, query the evidence graph, and inspect an existing bundle. Every call has explicit inputs; no hidden conversation or server session is required.

What you get

The read-only collector produces a bounded evidence bundle:

repository history + docs
            │
            ▼
  evidence-graph.json   typed nodes and source-linked edges
  graph-context.md      hotspots, communities, and ranked retrieval views
  corpus.md             bounded and redacted repository evidence
  source-map.md         stable URLs for every citation
  SYNTHESIS.md          contract for the coding agent
            │
            ▼
  <repo>-maintainer/
  ├── SKILL.md
  └── references/
      ├── architecture.md
      ├── conventions.md
      ├── workflows.md
      ├── failure-patterns.md
      └── source-map.md

The generated skill answers practical questions such as:

  • Which test, lint, type-check, and release commands does CI actually run?
  • Which implementation and test paths repeatedly change together?
  • Where are the repository's component boundaries and change hotspots?
  • Which fixes or approaches have already failed?
  • What evidence supports each repository-specific instruction?

Every claim must cite a repository file, PR, issue, or commit. Graph relationships guide retrieval; they are never presented as proof on their own.

Run the collector directly

You can generate the evidence bundle without installing the Agent Skill:

history-to-skill pallets/flask flask-maintainer --output ./history_skill_work

For an existing checkout:

history-to-skill ~/code/my-service --limit 100 --max-documents 30

Private repositories use GITHUB_TOKEN or GH_TOKEN. Public repositories work without a token, subject to GitHub's unauthenticated rate limit.

Why a graph

A flat search can find a change mentioning a parser regression. The evidence graph can also retrieve the implementation paths, their tests, the component they belong to, and other completed changes that touched the same boundary.

The graph contains inspectable relationships:

  • completed PRs and commits change files;
  • files belong_to top-level components;
  • files changed together receive weighted co_changed edges;
  • repeated co-changes form deterministic Louvain communities;
  • labels, documents, issues, and repository structure remain linked to their sources.

Graph-aware retrieval combines lexical seeds with personalized PageRank. NetworkX models the graph, SciPy performs sparse ranking, and broad changes are excluded from pairwise co-change expansion to avoid noisy, quadratic edge growth.

Designed for inspectability

Guarantee Behavior
Read only Remote repositories are queried through the GitHub API; their code is never executed.
Bounded History items, documents, and text sizes have explicit limits.
Source linked Claims resolve to stable file, PR, issue, or commit identifiers.
Injection resistant Repository text is quarantined as untrusted evidence.
Honest graph semantics Co-change and PageRank results are retrieval leads, not dependency claims.
Reproducible Graph construction, Louvain communities, and ranking are deterministic.

See the architecture, evidence format, coding-agent integration, live benchmarks, and research notes.

Scope

This is a change-history graph, not a symbol-level call graph, vulnerability scanner, or replacement for reading current implementation code. It extracts maintenance knowledge evidenced by repository history and documentation. Vague squash commits, private review conversations, and undocumented release procedures necessarily provide weaker evidence.

Development

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
ruff format --check .
ruff check .
mypy history_to_skill
agentskills validate "$PWD"
pytest --cov=history_to_skill --cov-report=term-missing
python -m build
twine check dist/*

CI runs the checks across Python 3.10–3.13 and smoke-tests the built wheel. Contributions are welcome; see CONTRIBUTING.md.

If history-to-skill saves you a repository-archeology pass, a star helps other maintainers find it.

License

MIT. Repository content processed by the tool remains subject to its original license and access rules.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选