ck init — Repository Initialization

SkillCloud & infra

Initialize Context King in the current repository, or migrate a repo from a legacy per-repo deployment to the global install.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the ck init — Repository Initialization skill

What this skill tells your AI

The instructions your AI receives, as published by fredrik-c/contextking in skills/ck-init/SKILL.md and read by ahel’s review.

Run once per repository after installing Context King globally. Do not confuse with ck index (which builds the semantic search index).

Commands

Initialize a new repo:

.claude/skills/ck/ck init

Creates .ck.json (minimum version requirement and default findFiles settings), adds .ck-index/ to .gitignore, and creates the .ck-knowledge/ directory. Commit these files to share the setup with your team.

Migrate a legacy repo (previously set up with the old per-repo deploy.sh):

.claude/skills/ck/ck init --migrate

Detects and removes per-repo artifacts (binary, model, hook scripts, rule file) and cleans up relative-path hook registrations and CK allowedTools entries from .claude/settings.json, leaving all non-CK content intact.

Execution Protocol

When the user asks for ck init:

  1. Run ck init directly first.
  2. Do not pre-check .claude/settings.json, .ck, or other legacy artifacts unless:
    • the user explicitly asked for migration, or
    • ck init output indicates legacy deployment conflicts.
  3. Only run ck init --migrate when explicitly requested by the user (or after confirming migration is needed from command output).

Options

OptionDescription
--migrateRemove legacy per-repo deploy artifacts and clean up settings.json
--forceRe-initialize even if .ck.json already exists
--quietSuppress informational output

After init

Commit .ck.json and .ck-knowledge/ to the repository. The .ck-index/ directory is gitignored and will be built automatically on the first ck find-files call.

Signals

GitHub stars
22
Forks
3
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
ck-init
Source
github.com/fredrik-c/contextking