用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/knowns-dev/knowns --skill kn-init命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | kn-init |
| description | Use at the start of a new session to read project docs, understand context, and see current state |
Announce: "Using kn-init to initialize session."
Core principle: BOOTSTRAP WITH MCP INITIAL → DISCOVER WITH HELP → READ ONLY RELEVANT DOCS.
initial first when available; it is the runtime bootstraphelp("tool.*") or help("workflow.*") when an action schema or workflow route is not visibleREADME, ARCHITECTURE, or CONVENTIONS do not exist, choose the closest equivalents from the docs listmcp_knowns_initial({})
If the MCP client exposes the tool as initial rather than mcp_knowns_initial, call that tool. Summarize project state, tool domains, active timer, and any warnings.
mcp_knowns_docs({ "action": "list" })
mcp_knowns_docs({ "action": "get", "path": "README", "smart": true })
For large docs, do not read the whole file. Use:
mcp_knowns_docs({ "action": "get", "path": "<path>", "toc": true })
mcp_knowns_docs({ "action": "get", "path": "<path>", "section": "<heading-or-number>" })
mcp_knowns_tasks({ "action": "list", "status": "in-progress" })
mcp_knowns_tasks({ "action": "board" })
Note the shape of the Task IDs you get back. A project that sets
settings.defaultTaskIdPrefix generates IDs like KN-4F7Q2M; without it they
look like 4f7q2m. Either way, pass the ID exactly as printed — the hyphen in
KN-4F7Q2M is part of the ID, not a task- reference prefix to strip.
The initial tool reports the active format. Over MCP you can override the
prefix per Task with tasks({ action: "create", prefix: "SPC" }); changing the
project default is a CLI or Settings action, not an MCP one:
knowns config get settings.defaultTaskIdPrefix --plain # empty = legacy format
knowns config set settings.defaultTaskIdPrefix SPC
Check for accumulated critical learnings from past work:
mcp_knowns_search({ "action": "search", "query": "critical patterns", "type": "doc", "tag": "critical" })
If learnings/critical-patterns exists:
mcp_knowns_docs({ "action": "get", "path": "learnings/critical-patterns", "smart": true })
These are promoted learnings that cost the most to discover and save the most by knowing. Include a brief summary in the session context if any exist.
mcp_knowns_memory({ "action": "list", "layer": "project" })
Project memories contain accumulated patterns, conventions, preferences, and failures from past work. Include only entries relevant to the user's focus; do not serialize the entire memory list. Retrieve relevant accepted/current first-class System Decisions separately; Memory category decision is legacy and must not be used for new capture.
## Session Context
- **Project**: [name]
- **Key Docs**: README, ARCHITECTURE, CONVENTIONS
- **Critical Learnings**: [count, or "none yet"]
- **Project Memories**: [count, or "none yet"]
- **In-progress tasks**: [count]
- **Current risks / gaps**: [missing docs, unclear conventions, broken search, etc.]
- **Ready for**: tasks, docs, questions
All built-in skills in scope must end with the same user-facing information order: kn-init, kn-spec, kn-flow, kn-go, kn-plan, kn-research, kn-handoff, kn-implement, kn-test, kn-review, kn-debug, kn-decision, kn-verify, kn-doc, kn-template, kn-extract, and kn-commit.
Required order for the final user-facing response:
Keep this concise for CLI use. Skill-specific content may extend the key-details section, but must not replace or reorder the shared structure.
Do not manage platform-synced skill copies; this source defines the built-in workflow contract.
For kn-init, the key details should cover:
initial is unavailable, fall back to project({ action: "status" }) and targeted docsWhen a follow-up is natural, recommend exactly one next command such as:
/kn-plan <task-id>
/kn-flow @doc/<approved-spec-path>
/kn-research <query>
/kn-handoff