Skip to content

[ENH] Provide an Agent Skill for chainladder workflows #718

@EKtheSage

Description

@EKtheSage

Motivation

A growing number of users interact with Python libraries through AI coding assistants (Claude Code, Cursor, Codex, Gemini, etc.). When asked to perform chainladder tasks ("estimate ultimate losses on this triangle", "fit a Mack chainladder", "produce a development pattern"), these assistants currently rely on whatever they happen to know from training data, which is often outdated or incomplete.

A dedicated "Agent Skill" (a structured markdown file describing chainladder workflows in a format consumable by any AI assistant) would let users and their AI tools reliably reproduce the canonical chainladder workflow from data load to ultimate estimate.

What an Agent Skill is

Agent Skills are vendor-neutral markdown documents (typically named SKILL.md or similar) that describe how to use a library: setup, common tasks, code templates, and links to deeper docs. Claude Code, Cursor, Codex, and others consume them via convention. Some tooling (e.g. Posit's Great Docs) generates them automatically.

Proposed structure

A single SKILL.md (or .claude/skills/chainladder/SKILL.md for the Claude-specific path) at the repo root or in a dedicated skills/ directory, covering:

  1. Setup: install via uv / pixi / pip; import conventions
  2. Core workflow, end to end:
    • Load a triangle (built-in samples and custom DataFrames)
    • Inspect grain, shape, latest diagonal
    • Fit a development pattern (volume-weighted, simple, etc.)
    • Apply tail factors
    • Produce ultimate estimates (Chainladder, BornhuetterFerguson, CapeCod, MackChainladder)
    • Inspect results (link ratios, IBNR, ultimate, std_err)
  3. Common variations: cumulative vs incremental, multi-LOB triangles, custom origin/dev formats, trailing periods
  4. Pointers to canonical docs and tutorials for deeper exploration

Why now

  • The skill pattern is new enough that no one has raised it yet, but adoption is accelerating across major Python libraries.
  • chainladder is well-suited because the canonical workflow is well-defined (it follows a standard actuarial pipeline).
  • It dovetails naturally with the Great Docs migration discussion in [DISCUSSION] Migrate documentation to Great Docs + GitHub Pages #716, since Great Docs produces Agent Skill output as a build artifact.

Scope of this issue

  • Initial skeleton SKILL.md with the structure above (some sections will be rough drafts to be refined over time).
  • Treat as an ongoing document: subsequent PRs would refine each section based on user/assistant feedback.

Happy to take this on as a starter PR if maintainers agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation 📚Changes to docstrings or the documentation site. No codebase changes.Effort > Brief 🐇Small tasks expected to take a few hours up to a couple of days.Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to join our community!Impact > Minor 🔷Small, backward compatible change. Treat like a patch release (e.g., 0.5.8 → 0.5.9).

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions