Agent Skills
› szw321127/repowise
› llm-wiki-for-code
llm-wiki-for-code
GitHub用于在项目内构建和维护基于Markdown的项目知识库,支持初始化、状态检查、图谱重建及知识结晶,确保本地代码与文档作为唯一事实源。
Trigger Scenarios
需要初始化项目知识库
检查或更新项目知识状态
从任务中提炼稳定知识
Install
npx skills add szw321127/repowise --skill llm-wiki-for-code -g -y
SKILL.md
Frontmatter
{
"name": "llm-wiki-for-code",
"description": "Build and maintain a project-serving knowledge base inside the current project's `.project-knowledge\/` directory. Use when Codex should initialize a project knowledge base, inspect current project knowledge status, rebuild the project knowledge graph, or crystallize stable knowledge from the current task into project-local Markdown."
}
LLM Wiki for Code Skill
Treat .project-knowledge/ as the only fact source for a project's persisted knowledge.
Core Rules
- Write project knowledge only under
.project-knowledge/ - Read only local code and local docs for
pk-init - Do not read
git logor browse the web for project analysis - Do not modify business code as part of knowledge maintenance
- Keep Obsidian-facing files (
index.md,log.md,_views/,.obsidian/) derived from Markdown knowledge - Before finishing a task, do one lightweight crystallization judgment
- Prefer
pk-auto-crystallizeafter task completion when touched files and a task summary are available; pass explicittouchedFileswhen possible, and use git-status fallback only when explicitly intended pk-auto-crystallizemay read generictaskId/taskDirprocess context from.tasks/,tasks/, or compatible external workflow layouts; process files are not durable source evidence by default- If
.project-knowledge/project-profile.mdis missing, skip project knowledge workflows and suggestpk-initonly when the user wants this project to opt in - Use
pk-crystallizewith a JSON input file when recording hand-curated adopted nodes or stable updates
Skill Entry Points
pk-init: analyze the current project and bootstrap.project-knowledge/pk-preflight: inspect project knowledge before a task and return matching practices, match reasons, task intent, or local evidence hintspk-status: summarize current project knowledge statepk-graph: rebuild graph data and graph page from.project-knowledge/pk-crystallize: persist a session and, when justified, update stable or incubating knowledgepk-auto-crystallize: infer adopted recommendations or new incubating candidates from task text and touched filespk-lint: report recommendation-pool lifecycle governance, evidence health, wiki quality, stale verification, ownership, and possible duplicate knowledge without modifying filespk-govern: preview reversible governance actions by default; apply promotion, demotion, and strong duplicate rejection only when explicitly requestedpk-serve: serve the project knowledge graph locally
Knowledge Rules
- Markdown is the only fact source
- New stable insights should default into low-score incubating space unless they are already clearly project defaults
sessionrecords are always allowed; knowledge nodes require stable evidencesource_evidencemay be a string path or a structured record withpath,symbol,reason,observed_pattern,stability, andlast_verified_at; stable structured records should includereason.project-knowledge/is an Obsidian-compatible vault; generated node bodies should keepLinkssections useful for backlink navigationpk-preflightoutput is context-budgeted: load full node Markdown or source files only after a summarized match needs deeper verificationpk-preflightmatches through keywords plus deterministic task intent; useapplies_when/does_not_apply_whenfor task kinds, technologies, and path prefixes when keywords are too weakpk-preflightremains read-only unless explicitly invoked with hit recording, which updatespreflight_hitsandlast_hit_atinstate/usage-index.jsonpk-lintgovernance findings are review prompts only: promotion candidates, eviction candidates, stale verification, wiki quality findings, and possible duplicates still require human judgment before moving or deleting filespk-lintalso reports usefulness signals such as never-hit knowledge, hit-but-never-adopted knowledge, and recommendations frequently rejected after a hitpk-lintreports conflict signals including active conflicting rules, superseded nodes still exposed by recommendations, and duplicate practice scopes- Stable
practice,option, andrulenodes should have an explicit summary, useful keywords, durable evidence, and verification metadata; strong rules should have an owner - Use
conflicts_with,supersedes,superseded_by, andscopeto make rule/practice conflicts explicit and auditable pk-governmay move Markdown nodes between stable and incubating directories, but it must not physically delete knowledge files
Crystallization Input
pk-auto-crystallize accepts a JSON input file after the project path. Use it at task end when the task adopted existing recommendations or produced a new code practice that should start in incubation.
{
"sessionId": "session-YYYY-MM-DD-topic",
"title": "本轮任务标题",
"topic": "本轮任务主题",
"taskText": "用于匹配已有实践的任务描述",
"taskId": "",
"taskDir": "",
"decisionSummary": "一句话总结本轮关键决策。",
"touchedFiles": [],
"adoptedNodeIds": [],
"rejectedNodeIds": [],
"incubatingNodes": [],
"stableUpdates": []
}
Version History
- fa4164e Current 2026-07-24 16:07


