<!-- generated by epythet -->

# For AI agents

`hg` ships artifacts for coding agents alongside its code. This page lists
them, says where each lives in the repository, and points at the
machine-readable copies of this documentation.

## Skills

Skills are folders holding a `SKILL.md` (the [Agent Skills](https://agentskills.io) format): a description that tells an agent when to use it and a body with the procedure. Install one into your agent with `gh skill` (any host: `--agent claude-code`, `copilot`, `cursor`, `codex`, `gemini`), or use the copy bundled in the wheel.

### `hg-dev`

Use when developing or modifying the `hg` package itself — changing the public API, touching duplication detection (`hg/duplicates.py`) or frequent-itemset mining (`hg/frequent_itemsets.py`), adding algorithms, or working on its tests. Triggers on editing files under the hg repo, “add X to hg”, “fix the dedup/itemset code”, or changing what `hg/__init__.py` exports.

Source: [`.claude/skills/hg-dev`](https://github.com/thorwhalen/hg/tree/HEAD/.claude/skills/hg-dev).

### `hg-usage`

Use when you need to (a) de-duplicate repeated contiguous blocks in a sequence or text, or (b) mine frequent — optionally value-weighted — itemsets from transactions. Triggers on “remove repeated blocks/lines”, “dedupe a transcript/log/generated text”, “find the largest repeated run”, “frequent itemsets”, “market-basket / co-occurrence analysis”, “which items appear together”, or weighting co-occurrences by revenue/duration/etc. The package is `hg` (pure stdlib, `pip install hg`).

Source: [`.claude/skills/hg-usage`](https://github.com/thorwhalen/hg/tree/HEAD/.claude/skills/hg-usage).

## Instruction files

Files agents read before working in this repository.

- [`.claude/CLAUDE.md`](https://github.com/thorwhalen/hg/tree/HEAD/.claude/CLAUDE.md): read by Claude Code

## Machine-readable documentation

This site publishes the same documentation in forms that fit an agent’s context window:

- [`llms.txt`](https://thorwhalen.github.io/hg/llms.txt): an index of every page with a one-line description ([llms.txt](https://llmstxt.org) format)
- [`hg.md`](https://thorwhalen.github.io/hg/hg.md): the whole documentation as one Markdown file
- `<page>.html.md`: a rendered Markdown twin of every page, advertised from each page’s `<head>` with `<link rel="alternate" type="text/markdown">`
- [`objects.inv`](https://thorwhalen.github.io/hg/objects.inv): the Sphinx inventory: a symbol-to-URL index (`sphobjinv convert plain objects.inv -`)
