praneybehl/llm-wiki-plugin / skills/llm-wiki
llm-wiki
VerifiedBuild and maintain an LLM-curated knowledge base from papers, articles, transcripts, notes and project findings. Ingest sources into linked Markdown, answer questions with citations, lint or upgrade a wiki, and preserve useful synthesis across sessions and agents. Also capture verified task experience, consolidate success/failure patterns, and propose, evaluate, apply or roll back evidence-linked skill improvements. Trigger on "add this to my wiki", "what does the wiki say", "learn from this task", "improve this procedure", /wiki:learn or /wiki:evolve. Works on a local folder or a hosted wiki URL (MCP). Use index-first navigation, atomic pages and hybrid search.
scripts/wiki_evolve_claude.py
View on GitHub#!/usr/bin/env python3
"""Optional Claude Code runner for wiki_evolve.py's query pilot.
Reads one JSON request on stdin, returns one JSON result on stdout. Requires
an installed, authenticated Claude CLI with --restricted and --json-schema.
Uses the shared neutral adapter, disables ambient skills/MCP servers, and counts observed
tool-use events. Model inference uses your Claude account; it is not local.
Runner argv JSON: ["python3", "/absolute/skill/scripts/wiki_evolve_claude.py"]
"""
import json
from pathlib import Path
import subprocess
import sys
SCHEMA = {
'type': 'object', 'properties': {
'answer': {'type': 'string'},
'abstain': {'type': 'boolean'},
'citations': {'type': 'array', 'items': {'type': 'string'}},
}, 'required': ['answer', 'abstain', 'citations'], 'additionalProperties': False,
}
def parse_events(lines):
events = [json.loads(line) for line in lines.splitlines() if line.strip()]
results = [e for e in events if e.get('type') == 'result']
if len(results) != 1 or results[0].get('is_error') or results[0].get('subtype') != 'success':
raise ValueError('Claude did not complete a structured answer')
result = results[0]
output = result['structured_output']
# Count each emitted tool-use ID once, excluding the JSON output formatter.
calls = {block['id'] for e in events if e.get('type') == 'assistant'
for block in e.get('message', {}).get('content', [])
if block.get('type') == 'tool_use' and block.get('name') != 'StructuredOutput'}
output['tool_calls'] = len(calls)
output['cost'] = result['total_cost_usd']
return output
def main():
request = json.load(sys.stdin)
skill = Path(request['skill_root']).resolve()
wiki = Path(request['wiki_root']).resolve()
from wiki_evolve_agent import execute
from wiki_evolve_loop import skill_text
from wiki_evolve import digest, encode
supplied = skill_text(skill)
request.update(role='inference', skill_files=supplied,
skill_sha256=digest(encode(supplied).encode()), allow_write=[])
print(json.dumps(execute('claude', request), allow_nan=False))
if __name__ == '__main__':
try:
main()
except (ValueError, KeyError, OSError, subprocess.SubprocessError) as exc:
print(f'Claude runner failed: {type(exc).__name__}', file=sys.stderr)
sys.exit(1)
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: 471k | Updated | Claude CodeCodex | Verified | 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 |