cairn-init

Scaffolds, repairs, or migrates cairn milestone-tracking files in a git repository.

4|Updated Jul 11, 2026
One-click install
npx skills add https://github.com/jmgirard/cairn --skill cairn-init-jmgirard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cairn-init
Source: https://github.com/jmgirard/cairn/tree/main/skills/cairn-init
Command: npx skills add https://github.com/jmgirard/cairn --skill cairn-init-jmgirard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a consistent, agent-maintained project tracking system across repositories is repetitive and error-prone; this Skill adopts the cairn milestone-tracking system in any repo by scaffolding its files, migrating legacy tracking layouts, or repairing damaged installations. ## Core Features & Use Cases - Fresh scaffold: Creates the cairn/ directory tree (DESIGN.md, ROADMAP.md, DECISIONS.md, LESSONS.md, PROFILE.md, milestone and review archives), appends a CLAUDE.md section, and adds ignore entries. - Migration: Detects precursor tracking footprints (root-level MILESTONES.md/ROADMAP.md, older project/ layouts, repo-local milestone skills) and migrates them via a dedicated protocol. - Repair mode: Idempotently restores missing scaffold pieces, backfills missing toolchain profiles, and migrates deprecated scaffold names without overwriting user content. - Environment detection: Probes git, python3, and gh availability, detects the default branch, selects a toolchain profile (R package, Python, Docker image, or generic), and supports owner/guest collaboration modes. - Use Case: After cloning a new R package repo, run the init flow to get a governed tracking system with a roadmap, decision log, and CI path-ignore configuration in one pass. ## Quick Start Ask the agent to set up cairn tracking in this repository by running /cairn-init.

Frequently Asked Questions about cairn-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up milestone tracking in a new repository?

Run the cairn-init flow in the repo; it detects the toolchain (R package, Python, Docker image, or generic), scaffolds the cairn/ directory with ROADMAP.md, DESIGN.md, and related files, and commits the result on the default branch.

How do I migrate an existing ROADMAP.md or MILESTONES.md to cairn?

The init flow recognizes precursor footprints such as root-level MILESTONES.md, ROADMAP.md, or older project/ layouts and runs a migration protocol instead of a fresh scaffold. Unrecognized footprints trigger an interview rather than a guess.

Can I use cairn in a repo I only contribute to?

Yes. Guest mode keeps cairn/ local and uncommitted by adding it to .git/info/exclude, skips CLAUDE.md and .gitignore writes, and never pushes to the default branch. The mode is chosen via a prompt based on your GitHub permission level.

What happens if python3 or gh is not installed?

The environment check reports each gap with its degradation path. Missing python3 disables validation scripts and hooks, missing gh makes PR and merge gating manual, and only a missing git is fatal since cairn is git-based.

Is it safe to re-run cairn-init on an already tracked repo?

Yes, it is idempotent. Re-running enters repair mode, which restores missing scaffold pieces, backfills a missing PROFILE.md by inference, and migrates deprecated scaffold names without overwriting user-authored content.