Oxyd22/ContextKit / .claude/skills/ck-refs-sync
ck-refs-sync
UnverifiedUpdate reference repos (git pull) and rebuild the condensed contract index. Run: /ck-refs-sync
ck-refs-sync
Keeps the condensed reference index current. Two parts: a script (pull + skeleton) and Claude (extraction).
If
.claude/contextkit/is missing (script orcontextkit.config.jsonnot found) → ContextKit is not installed here: stop, and install via/ck-setupin the hub.
Resolve project root
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
echo "$CK_ROOT"
{platform} below is the platform value in $CK_ROOT/.claude/contextkit/contextkit.config.json (generic, ios, android, or web).
Step 1 — Pull + stub refresh (script)
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
python3 "$CK_ROOT/.claude/contextkit/scripts/reindex.py"
Runs git pull --ff-only on every configured reference repo (dirty or diverged → warning, no pull), compares HEAD SHAs, and writes an index stub at $CK_ROOT/.claude/contextkit/cache/references/<repo>.md for changed repos. Unchanged repos are skipped.
Step 2 — Extraction (Claude)
For each stub with status: needs-extraction:
- Read the reference repo at
<referencesPath>/<repo>selectively — only whatindexScopecovers:- Contracts: public interfaces, public types, DTOs
- API specs: endpoints, routing, OpenAPI
- Parity ({platform} <-> {repo}): counterparts on
{platform}, and deliberate divergences No implementation detail.
- Fill those sections in the stub. Use the heading
Parity ({platform} <-> {repo}). - In the frontmatter set
status: indexedandindexed: <today's date>.
Writing style (optimized for the model; a person does not read the index):
- Terse: one fact per line. No prose, filler, or repetition.
- Point, do not copy:
file:line,repo@sha. Never code blocks.- Only the signature, name, or path needed to find it again. No implementation detail.
Step 3 — Freshness stamp
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
mkdir -p "$CK_ROOT/.claude/contextkit/cache" && date > "$CK_ROOT/.claude/contextkit/cache/.last-refresh"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |