Skip to content

praneybehl/llm-wiki-plugin / skills/llm-wiki

llm-wiki

Verified

Build 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.

FileKindSize
SKILL.mdskill md24.6 KB
assets/SCHEMA.md.templateother7.4 KB
assets/decision-questions.jsonconfig3.1 KB
assets/evolution_README.md.templateother2.3 KB
assets/experience.json.templateother660 B
assets/graph_README.md.templateother2.0 KB
assets/graph_gitignore.templateother27 B
assets/index.md.templateother775 B
assets/log.md.templateother499 B
assets/ontology.yaml.templateother3.2 KB
assets/page.md.templateother805 B
assets/pattern.md.templateother839 B
assets/wiki-cache_gitignore.templateother14 B
references/agent-memory-integration.mdmarkdown7.5 KB
references/architecture.mdmarkdown9.6 KB
references/decision-models.mdmarkdown6.5 KB
references/evolution-workflow.mdmarkdown19.7 KB
references/graph-workflow.mdmarkdown7.1 KB
references/hosted-mode.mdmarkdown11.4 KB
references/ingest-workflow.mdmarkdown11.1 KB
references/lint-workflow.mdmarkdown8.3 KB
references/page-conventions.mdmarkdown5.8 KB
references/query-workflow.mdmarkdown8.6 KB
references/retrieval-setup.mdmarkdown5.6 KB
references/scaling-playbook.mdmarkdown6.8 KB
scripts/init_wiki.pyscript9.5 KB
scripts/setup_wiki.pyexecutablescript2.5 KB
scripts/test_link_resolution.pyscript6.2 KB
scripts/wiki_decide.pyexecutablescript31.6 KB
scripts/wiki_evolve.pyscript29.1 KB
scripts/wiki_evolve_agent.pyscript15.1 KB
scripts/wiki_evolve_api.pyscript7.0 KB
scripts/wiki_evolve_claude.pyscript2.4 KB
scripts/wiki_evolve_loop.pyscript43.4 KB
scripts/wiki_evolve_stream.pyscript13.0 KB
scripts/wiki_graph_extract.pyscript21.0 KB
scripts/wiki_graph_lint.pyscript22.0 KB
scripts/wiki_graph_query.pyscript9.3 KB
scripts/wiki_lint.pyscript14.5 KB
scripts/wiki_remote.pyexecutablescript76.6 KB
scripts/wiki_search.pyscript35.9 KB
scripts/wiki_stats.pyscript5.9 KB

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)
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall