pure-borrow: Skill for Codex

.codex/skills/haddock/SKILL.md

haddock is a skill for Codex from SoftwareFoundationGroupAtKyotoU/pure-borrow. It costs 73 tokens per session (906 once invoked), scanned A, original, BSD-3-Clause.

A reader for Haskell package documentation and dependency source code. Haddock is Haskell's documentation format, and Hackage is its public package repository.

In plain words
What is it for?
Use it to inspect documentation and source for packages in a Cabal project, using local build files and cached dependencies before Hackage.
Why use it?
It helps you find the right local documentation first and avoids relying on incomplete or mismatched dependency information.

Skill for Codex

Written for Codex: installed under .codex/. Also seen: reads ~/.codex paths; mentions Codex.

This is SoftwareFoundationGroupAtKyotoU/pure-borrow's own configuration. It tells Codex how to work on pure-borrow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pure-borrow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SoftwareFoundationGroupAtKyotoU/pure-borrow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SoftwareFoundationGroupAtKyotoU/pure-borrow/main/.codex/skills/haddock/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/SoftwareFoundationGroupAtKyotoU/pure-borrow

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for haddock

README.md
[![agentmods](https://agentmods.dev/badge/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock/github.svg)](https://agentmods.dev/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock)
Your own site
<a href="https://agentmods.dev/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock"><img src="https://agentmods.dev/badge/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for haddock

Your own site · 80×15
<a href="https://agentmods.dev/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock"><img src="https://agentmods.dev/badge/skills/softwarefoundationgroupatkyotou/pure-borrow/haddock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 906 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00906
Opus 5.5 $0.00029 $0.00362
Sonnet 5.5 $0.00015 $0.00181
Haiku 4.5 $0.00007 $0.00091

Measured 1mo ago against content hash 4259627704e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

haddock scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/locate-dep.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/haddock/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Haskell Haddock And Source Reader

Read documentation and source code for dependencies of a cabal nix-style project, preferring local files over the network. Exhaust local sources before fetching from Hackage.

Which Source To Use

  • Package is a dependency of the current project: read locally.
  • Package is outside the project's dependency set: fall back to Hackage.
  • Prefer the hoogle skill for symbol or type lookup before fetching full documentation pages.

One-Time Setup

If local docs are missing, enable documentation and build once after dependency changes:

cabal configure --enable-documentation
cabal build all

Resolving A Dependency

Run the bundled resolver from the project root:

.codex/skills/haddock/scripts/locate-dep.sh <package>

The resolver regenerates the build plan, reads cabal's store and repo-cache paths, looks up the package's exact UnitId in dist-newstyle/cache/plan.json, and prints JSON:

{
  "store_path": "<cabal-store>/<UnitId>",
  "doc_dir": "<store_path>/share/doc/html",
  "source": "<repo-cache>/.../<pkg>-<ver>.tar.gz"
}
  • store_path is the resolved unit directory in the cabal store.
  • doc_dir is the Haddock HTML directory, or null if docs were not built.
  • source is a Hackage/Stackage source tarball path, source-repository-package metadata, or null.

Do not construct store paths from package names. Cabal abbreviates and hashes store entries, so use the resolved UnitId.

Reading Docs

When doc_dir is non-null, module pages sit directly inside it. A module page is its dotted name with . replaced by - plus .html, for example System.Random.SplitMix becomes System-Random-SplitMix.html. Use index.html or list *.html files if the module name is uncertain.

Reading Source

For a string tarball path, stream a single file without unpacking everything:

tar -tzf <source>
tar -xzOf <source> <pkg>-<ver>/<path/to/File.hs>

For a source-repository-package object, use its { type, location, tag, subdir } metadata. Cabal checks the repo out under dist-newstyle/src/ in a directory named from the repo plus a content hash, not from the tag. Locate the source with a glob such as:

Read the full file on GitHub · 88 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 88 lines · 73 tokens per session scan A 4259627704e7

Subscribe to this mod's changes

haddock is a skill published in the GitHub repository SoftwareFoundationGroupAtKyotoU/pure-borrow (63 stars, last pushed 1mo ago), licensed BSD-3-Clause. It adds 73 tokens to every session and 906 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

haddock compared with skills from other repositories

haddock next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
haddockSoftwareFoundationGroupAtKyotoU/pure-borrowSkill631mo agoBSD-3-ClauseA73Codex
erlang-otp-behaviorsbenchflow-ai/skillsbenchSkill1.9k2d agoApache-2.0A52Claude Code, Codex
omh-rustrlaope/oh-my-hermesSkill5.2kyesterdayMITA74Claude Code, Codex
axiom-concurrencyCharlesWiltgen/AxiomSkill1.3kyesterdayMITA49Claude Code
tddcodewithmukesh/dotnet-claude-kitSkill8052d agoMITA81Claude Code
splitting-oversized-modulesPostHog/posthogSkill41kyesterdaynoneA197Claude Code, Codex
precisemicroprediction/preciseSkill3385d agoMITA76Claude Code, Codex