lihaozheCharlie/the-way-here / knowledge-engine/skills/common/retrieval
common-retrieval
Verified知识库共享检索:绑定资料范围,关键词召回、来源和时间辨析、渐进阅读、双链追溯与证据核验。由查询、预测、了解度和构建 Skill 按需调用;不负责回答格式、未来推演或写入。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.1 KB |
| references/source-policy.json | config | 1.4 KB |
| references/tools.md | markdown | 2.2 KB |
| scripts/evidence_reader.py | script | 5.3 KB |
| scripts/snapshot.mts | other | 1.4 KB |
scripts/snapshot.mts
View on GitHubimport { copyFile, mkdtemp, readFile, writeFile, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { WikiIndex, createEvidenceSnapshot, parseRetrievalPolicy } from "../../../../../studio/packages/wiki-core/src/index.js";
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
const root = path.resolve(scriptDir,"../../../../..");
const id = process.env.THE_WAY_HERE_KNOWLEDGE_BASE;
if (!id) throw new Error("显式设置 THE_WAY_HERE_KNOWLEDGE_BASE,整个任务沿用同一个 ID");
const index = new WikiIndex(root,id);
await index.rebuild();
const policy = parseRetrievalPolicy(JSON.parse(await readFile(path.join(scriptDir,"../references/source-policy.json"),"utf8")));
const snapshot = createEvidenceSnapshot(id,index.list().map(p=>index.get(p.id)!),policy);
const directory = await mkdtemp(path.join(tmpdir(),"twh-retrieval-"));
const file = path.join(directory,"evidence.json");
const reader = path.join(directory,"evidence_reader.py");
try {
await writeFile(file,JSON.stringify(snapshot),{mode:0o600});
await copyFile(path.join(scriptDir,"evidence_reader.py"),reader);
} catch(error) { await rm(directory,{recursive:true,force:true}); throw error; }
console.log(JSON.stringify({knowledgeBaseId:id,inputHash:snapshot.inputHash,file,reader,pages:snapshot.pages.length}));
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |