apply-base

Synchronize shared rules, skills, and harness tooling from a base repository into the current repository.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/kai-kou/gem-hunter --skill apply-base-kai-kou
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: apply-base
Source: https://github.com/kai-kou/gem-hunter/tree/main/.claude/skills/apply-base
Command: npx skills add https://github.com/kai-kou/gem-hunter --skill apply-base-kai-kou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping Claude Code configuration (rules, skills, hooks, tools) consistent across many repositories is tedious and error-prone when done by hand. This Skill applies and re-syncs the shared base repository kai-kou/claude-code-repository-base into the current repository from a single natural-language request, without the user running any commands. ## Core Features & Use Cases - Idempotent apply and re-sync: Runs scripts/apply-to-repo.sh to install or update rules, skill definitions, harness, and tools, protecting existing CLAUDE.md and project-mission.md files. - Three-way merge with drift detection: Uses the previous sync SHA (.claude/base-sync-state.json) to merge base updates with downstream customizations, placing conflicts as .base-latest files and running check_apply_base_drift.py to detect lost repository-specific extensions. - Update review: Shows commits since the last application and manual migration notes before applying, with --check-updates and --dry-run modes. - Use Case: A maintainer says "apply the claude-code-base updates to this repo" and the Skill clones the public base via git, runs the sync, reports merged and needs-review files, and commits the result. ## Quick Start Apply the claude-code-base rules, skills, and harness to this repository and show me what changed since the last sync.

Frequently Asked Questions about apply-base

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

FAQPage Schema
How do I sync a shared Claude Code base configuration into my repository?▼

Invoke the skill with a natural request like "apply claude-code-base to this repo". It clones kai-kou/claude-code-repository-base via git, runs scripts/apply-to-repo.sh, and installs rules, skills, and tools idempotently without manual commands.

How do I check for base repository updates before applying them?▼

Run the apply script with the --check-updates flag to display commits since the last applied SHA and any manual migration notes, without modifying the repository. Use --dry-run to preview the four-way file classification.

Will syncing overwrite my existing CLAUDE.md or custom rules?▼

No. CLAUDE.md and docs/project-mission.md are protected by default, with base versions placed alongside as .base files. Synced paths use three-way merges against the recorded base SHA, and conflicts are preserved as .base-latest files.

Why does gh repo clone fail in cloud Claude Code sessions?▼

Cloud environments lack a real gh binary and repo-scope REST calls return 403. The skill uses git clone over HTTPS or the GitHub MCP get_file_contents tool instead, which survive proxy and token variations.

What happens when a merge conflict occurs during base sync?▼

The three-way merger validates JSON syntax, duplicate keys, and order-sensitive arrays before adopting a merge. On failure it keeps the downstream file and writes the base version as <path>.base-latest for manual review.