Skip to main content

history-to-skill

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

CI PyPI Python License: MIT

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.

Metadata

Release files for history-to-skill 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for history-to-skill 0.4.1
File Size Uploaded Provenance Actions
history_to_skill-0.4.1.tar.gz 31.0 kB With provenance Details for history_to_skill-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for history-to-skill 0.4.1
File Interpreter ABI Platform Actions
history_to_skill-0.4.1-py3-none-any.whl Python 3 none any Details for history_to_skill-0.4.1-py3-none-any.whl

Total release size: 60.4 kB

Release files / history_to_skill-0.4.1.tar.gz

Download URL history_to_skill-0.4.1.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7e85c2fdfffbd94661a94e7423f6f2aa6ca4fb5623f2d79a5149e96195ea8d51
BLAKE2b-256 checksum
How to use checksums
966b24ae29108ee0e48dcc3a538e867a50be4d8f35c651c7abb5104f9c4089f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / history_to_skill-0.4.1-py3-none-any.whl

Download URL history_to_skill-0.4.1-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
331e1fce7510d5b4923b407ff9d03326202db56962726a490c86d9e91f7dcc14
BLAKE2b-256 checksum
How to use checksums
2d189ba723aba971a3fb12c35f9afa43b7ca2e25f00e4aa104a1b042dba4791f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Security for history-to-skill 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for history_to_skill-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page