bootstrap
Canonical session boot and skill loading orchestrator. Always active. Owns the Startup Gate (mirror sync, forced frontmatter-protocol import, project activation, memory priming, MCP inventory, think-block proof-of-work), the MCP tool-layer mandate, decision-point interaction rules, and the operational mandate that every session loads the correct skill set. The mechanics of skill header parsing, trigger grammar, evaluation, and discovery live in `frontmatter-protocol` (include extension), which this skill requires.
- License 许可
- BSD-3-Clause
- 所属仓库
- kalaverin/skills
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- bootstrap
- version
- 0.1.0
- requires
- [ "frontmatter-protocol" ]
- triggers
- { "always": true, "reason": "Every session must run the Startup Gate and load the correct skill set before executing any task." }
- description
- Canonical session boot and skill loading orchestrator. Always active. Owns the Startup Gate (mirror sync, forced frontmatter-protocol import, project activation, memory priming, MCP inventory, think-block proof-of-work), the MCP tool-layer mandate, decision-point interaction rules, and the operational mandate that every session loads the correct skill set. The mechanics of skill header parsing, trigger grammar, evaluation, and discovery live in `frontmatter-protocol` (include extension), which this skill requires.
02 资源文件 1
- 参考文档README.md3.5 KB
03 SKILL.md 正文
SKILL: Session Boot & Skill Loading Orchestrator (Bootstrap)
This skill owns the Startup Gate (§1) and the canonical loading mandate. It is always active.
The mechanics — header schema, trigger grammar, evaluation semantics, discovery algorithm, runtime re-evaluation, requires resolution, draft handling — are owned by frontmatter-protocol and MUST be loaded from there: frontmatter-protocol/SKILL.md (core) → frontmatter-protocol/references/include.md (boot-mandatory extension).
1. 🔒 STARTUP GATE (Execute Before Any Output)
This gate is executed HARDEST, with zero tolerance for deviation: no reordering, no skipping, no partial completion, no softened preconditions, no interpretation. The user's first message is PENDING until all steps complete. No output until done.
-
Skill mirror sync (MUST). Run
just sync-skills-mirrorbefore loading any skill..kimi/mirror/is the committed, canonical skill set used for discovery and by subagents..kimi/skills/is the runtime symlink or live skill tree for the root agent and for bootstrap/init (it is the source thatsync-skills-mirrorcopies into the mirror).- If
.kimi/skills/is unreachable, rely on.kimi/mirror/directly; if both are missing, halt. - Hard-stop on failure: if
just sync-skills-mirrorfails for any reason, halt immediately and report the failure. Do NOT inspect the Justfile, do NOT attempt a manual rsync, do NOT proceed with the gate. - Skill-file reads: subagents never use the
.kimi/skills/symlink — they read skills from.kimi/mirror/. The main agent performs discovery from.kimi/mirror/; it may read.kimi/skills/only for live edits during bootstrap/init.
-
Forced import (MUST). Read
frontmatter-protocol/SKILL.mdin full, then its boot-mandatory extensionfrontmatter-protocol/references/include.mdWHOLE, and apply them without exception (the boot contract lives in include.md). -
Skill discovery and loading. Run discovery and header evaluation per the include extension; read every TRIGGERED skill's
SKILL.mdin full. Runtime skills whose triggers did not fire are known by their discovery headers only — noSKILL.mdbody read; bodies load on activation per the include extension's Runtime Re-Evaluation. -
Project activation. Call
activate_project. -
Memory priming. Call
read_memory→agent/rules, plus any memories relevant to the current task. Whenproject/reposexists, read it too: it is the session's repo-to-skills routing map (entity-protocol), tiny by contract. -
MCP Inventory. Identify and declare which MCP skill groups this task requires:
kagimcp(web search/enrichment),serenasymbolic/LSP tools (codebase exploration/edits),serenamemory tools (memory operations),serenaproject tools (project/session management). -
Think block (Proof of Work). Produce a
thinkblock with the action plan containing: the MCP groups, formatapplied: mcp-1, mcp-2, ...; and the triggered skills with the rationale for each, formatapplied: skill-1, skill-2, .... -
Only then proceed with the user's request.
Violation protocol: if you attempt to output a response without completing steps 1–8 and documenting them in the think block, halt immediately, discard the output, execute the gate, and restart from step 1.
2. Mandatory Skills (Always Loaded)
The always-loaded set is NOT hardcoded here: it is exactly the set of discovered skills whose headers carry always: true, derived per the always-gate in frontmatter-protocol/references/include.md. The headers are the only source of truth — do not restate the list in prose. This skill (bootstrap) is itself always active by its own header.
3. Skill Loading (delegated mechanics)
Follow frontmatter-protocol/references/include.md for:
- the
SKILL.mdheader schema (includingdraft: trueskipping and theondemand:manifest extra), - the closed trigger grammar and its evaluation semantics (
always,files,request,any,all), - the discovery algorithm and batch header extraction (including the
_on_demand/and_drafts/directory semantics), runtime: truemid-session re-evaluation,- transitive
requiresresolution.
Load every triggered skill's SKILL.md in full, then follow each skill's internal lazy-load protocol to pull only the reference sections needed for the current sub-task.
4. Trigger Override Protocol
Triggers override your internal assumptions. If a skill's trigger matches, you MUST load that skill even if you believe the topic is already familiar. If the task spans multiple domains, load ALL matching skills.
5. Common Triggered Skills
The project context commonly triggers skills such as python-lang (Python files, Ruff, uv) and code-review (review requests in English or Russian). These examples are representative, not exhaustive — the authoritative source of triggers is each discovered skill's header, evaluated per the include extension.
6. Reference Corpora
Skills whose references/**/*.md files use [ref: #<anchor>] lazy-load routing MUST conform to frontmatter-protocol/references/lazyload.md. Skill-specific presentation details belong to the owning skill's addendum, which MUST defer to that standard. The canonical validator is frontmatter-protocol/scripts/validate_frontmatter.py.
7. Skill Loading Verification
Before proceeding with the user's request, confirm:
- The include extension was loaded and applied (boot contract).
- You have read the
SKILL.mdof every triggered skill. - You know which skill takes precedence when rules conflict.
- You will not use training data or general heuristics in place of the loaded skill rules.
Violation protocol: If you produce output without loading the include extension, evaluating every discovered non-draft skill header per its rules, loading every triggered skill, and documenting the loaded skills in the think block, halt immediately, discard the output, and restart skill loading correctly.
8. MCP Tool Layer (Mandate)
MCP skills are the mandated tool layer for this project, not optional conveniences. After the Startup Gate, you MUST declare the required MCP groups in the think block (§1 step 7). You are forbidden from using a non-MCP alternative when an MCP tool exists for the operation.
- Web search and enrichment — owned by the
kagi-searchskill (kagimcptools only). - Codebase and symbolic operations — prefer the
serenaMCP symbolic tools over raw CLI reads/greps (#serena-mcp-tools). - Memory and knowledge-base operations — owned by
serena-protocol(#serena-memory-mutation,#serena-mcp-tools).
Violation protocol: if you use a raw CLI tool or general training-data heuristic when an MCP tool is available and appropriate, halt immediately, discard the offending operation, load the correct MCP skill group, and retry.
9. Decision Points & User Interaction
- MUST always read and respect from Serena memory all
agent/instructions. - MUST NEVER use
AskUserQuestion. It is broken by design in this environment. ALWAYS ask directly in the main chat message as plain text / markdown. - MUST NEVER use
EnterPlanModeorExitPlanMode. They are broken by design in this environment. Do all planning in chat, viaSetTodoList, or by asking the user directly. - SetTodoList usage is governed by the
todo-protocolskill — it owns creation, immutability, insertion, and status synchronization rules. - MUST NEVER hallucinate that a question was asked and no answer was received.
- MUST NEVER make assumptions, pick defaults, or proceed with a "best guess" when any uncertainty exists.
- MUST NEVER continue working while a question is pending. If a question was asked, STOP and WAIT for the user's explicit text reply before doing anything else.
- When facing multiple valid approaches, uncertainty, ambiguity, missing requirements, or any doubt about how to proceed, you MUST ALWAYS: present all options clearly to the user; ask which approach to take; STOP and WAIT for the response before proceeding.
- After receiving answers to such questions, you MUST record a self-contained decision card in Serena memory per
serena-protocol[ref: #serena-lifecycle](the card structure lives there).
04 同仓库更多 Skills
todo-protocol
Mandatory protocol for using the SetTodoList tool. Governs when to create a todo list, how to update it without violating immutability rules, how to synchronize item status after every tool call, and the forbidden mutations. Always active.
subagents-protocol
Mandatory protocol for delegating work to built-in subagents (coder, explore, plan), also called our bots by users. Always active. Owns the context-hygiene delegation test (material vs answer, cost balance, warm-instance reuse), launch parameters (mandatory explicit `model`), the single-source model-selection table, answer budgets, degradation handling, the launch checklist, and the role library for delegated review/audit with intent routing (`references/roles.md`).
serena-protocol
MANDATORY skill for Serena (MCP) memory, knowledge base, and symbolic code exploration operations. Use whenever the agent needs to: read or write Serena memories, mutate or persist memory, explore code via symbolic MCP tools, resolve contradictions in stored knowledge, or follow memory metadata, naming, and routing conventions.
read-for-comments
Mandatory local standards library and archive. Before fetching any standard from the internet, the agent MUST check the Serena `standard/` archive and this skill's `references/` seed; after ANY standard-body download, the agent MUST archive it per the event-bound Archival Rule. Governs standard lookup, fetch, archival, and the family and full-body rules.
python-lang
MANDATORY skill for Python code. Use when writing, editing, refactoring, or reviewing Python files, modules, packages, classes, functions, type annotations, imports, exceptions, comprehensions, decorators, or docstrings. Enforces Google Python Style Guide and a mandatory, unconditional Ruff format+check pipeline scoped strictly to the agent's own changes.
preflight-checklist
Mandatory session-initialization closer and Startup Gate audit. Always loaded. Runs EXACTLY ONCE at session start, after all skill loading completes: verifies Startup Gate completion with evidence (mirror sync, forced import, discovery, activation, memory priming, MCP declaration, think block), runs dynamic session checks derived from the active skill set (mode states, delegation readiness), and reports a compact evidence-backed verdict table to the user before the first task output. Any FAIL is fixed before proceeding.