Imported from kibocha-solutions/skills (
bootstrap/SKILL.md). Install upstream withnpx skills add kibocha-solutions/skills --skill bootstrap. Copyright stays with the author.
Bootstrap
1. Establish scope
- Identify the installed agent hosts.
- Identify native Linux, macOS, and WSL target paths.
- Confirm that the user requested alignment or bootstrap propagation.
- Read the repository root
AGENTS.md. - Read
references/hook-registration.mdonly when registering hooks. - Do not run a script for an unrequested host.
2. Verify the source repository
- Resolve the repository root.
- Verify the configured
originURL. - Verify that the intended branch is
main. - List every top-level directory containing
SKILL.md. - Confirm that the working tree changes intended for deployment are committed and pushed.
- Stop if the remote state does not contain the intended rules and skills.
3. Resolve targets
Use these instruction files:
| Host | Instruction file |
|---|---|
| Claude Code | ~/.claude/CLAUDE.md |
| Codex | ~/.codex/AGENTS.md |
| Gemini CLI | ~/.gemini/GEMINI.md |
| Gemini Antigravity | ~/.gemini/antigravity/builtin/GEMINI.md |
| GitHub Copilot | ~/.copilot/copilot-instructions.md |
- Resolve each installed host's home directory.
- Under WSL, resolve the active Windows user under
/mnt/c/Users/. - Include an existing Windows-host instruction path.
- Keep Gemini CLI and Gemini Antigravity targets separate.
- Skip a target whose product directory does not exist.
4. Align rules
- Use these block markers:
<!-- BEGIN SHARED SKILLS RULES -->
<!-- END SHARED SKILLS RULES -->
- Replace the content between the first start marker and the last end marker.
- Preserve all content outside the marker block.
- Remove legacy
@skills/AGENTS.mdimport pointers. - Replace a legacy instruction-file symlink with a regular file when the host requires one.
- Never overwrite unrelated user instructions.
5. Synchronize skills
- Initialize the target
skills/directory as a Git working copy when required. - Preserve unrelated untracked host-native skills.
- Resolve
originfrom the source checkout. - Fall back to
git@github.com:kibocha-solutions/skills.gitonly when the source checkout has no usableorigin. - Configure non-cone sparse checkout.
- Include
AGENTS.mdand every top-level skill directory. - Exclude
sources/,docs/, and unrelated root files. - Fetch
origin/main. - Reapply the sparse-checkout patterns.
- Reset the managed working copy to
origin/main. - Remove a stale collision only when its top-level name matches a managed skill.
- Never remove an unrelated host-native skill.
6. Run host scripts
Run only the scripts for confirmed targets:
bash ~/.claude/skills/bootstrap/scripts/ensure-claude-link.sh
bash ~/.codex/skills/bootstrap/scripts/ensure-codex-link.sh
bash ~/.gemini/skills/bootstrap/scripts/ensure-gemini-link.sh
bash ~/.copilot/skills/bootstrap/scripts/ensure-copilot-link.sh
bash ~/.gemini/skills/bootstrap/scripts/ensure-gemini-builtin-skills.sh
For a source-checkout invocation, use the matching script under
bootstrap/scripts/.
7. Handle Gemini Antigravity
- Target
~/.gemini/antigravity/builtin/. - Align
builtin/GEMINI.md. - Synchronize managed skills into
builtin/skills/. - Preserve
agy-customizations,antigravity_guide,permissioned-github, and other unmanaged native skills. - Check for
builtin/.checksum. - Warn the user before modifying
builtin/when the checksum exists. - Stop if Antigravity reports corruption or resets the directory.
8. Register automated alignment
- Read
references/hook-registration.md. - Add only the requested host's
SessionStarthook. - Preserve unrelated hook configuration.
- Run the registered command once.
- Confirm that repeated execution produces no unintended change.
9. Verify
- Confirm that each target instruction file contains exactly one complete marker block.
- Confirm that content outside the block is unchanged.
- Confirm that each managed skill matches
origin/main. - Confirm that deleted repository skills are absent from managed mirrors.
- Confirm that native skills remain present.
- Confirm that no
sources/,docs/, or unrelated root files entered a mirror. - Report changed targets, skipped targets, warnings, and failures.