Dianel555/DSkills / skills/agent-wiki
agent-wiki
UnverifiedIncremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.
tests/test_benchmark_index.py
View on GitHub"""Index performance benchmark (stdlib only, no benchmark framework).
Builds a synthetic vault (100 topics + 5 queries), measures full vs
incremental rebuild. The assertions are loose regression bounds so CI noise
doesn't flake; the printed timings are the record (visible with `pytest -s`).
"""
from __future__ import annotations
import time
from pathlib import Path
from agent_wiki import config, frontmatter, wiki_index
N_TOPICS = 100
N_QUERIES = 5
def _synthetic_vault(tmp_path: Path) -> Path:
topics = config.topics_dir(tmp_path)
topics.mkdir(parents=True, exist_ok=True)
for i in range(N_TOPICS):
(topics / f"t{i:03d}.md").write_text(
frontmatter.dump(
{"title": f"Topic {i}", "sources": [f"src{i}.md"], "summary": "x" * 200},
"Body text " * 50 + " [[t000]] [[t001]]",
),
encoding="utf-8",
)
queries = config.queries_dir(tmp_path)
queries.mkdir(parents=True, exist_ok=True)
for i in range(N_QUERIES):
(queries / f"q{i:03d}.md").write_text(
frontmatter.dump({"title": f"Query {i}"}, "body " * 20),
encoding="utf-8",
)
return tmp_path
def test_full_vs_incremental_benchmark(tmp_path):
vault = _synthetic_vault(tmp_path)
start = time.perf_counter()
data, errors = wiki_index.rebuild(vault)
full_elapsed = time.perf_counter() - start
assert len(data["topics"]) == N_TOPICS
assert len(data["queries"]) == N_QUERIES
assert errors == []
wiki_index.save_index(vault, data)
start = time.perf_counter()
data2, errors2 = wiki_index.rebuild(vault, incremental=True)
incr_elapsed = time.perf_counter() - start
assert data2["topics"] == data["topics"]
assert data2["queries"] == data["queries"]
assert errors2 == []
print(f"\nfull rebuild ({N_TOPICS} topics): {full_elapsed:.3f}s | "
f"incremental unchanged: {incr_elapsed:.3f}s | "
f"speedup: {full_elapsed / incr_elapsed:.1f}x")
# Loose bounds: reuse must not be slower than re-parsing everything
assert incr_elapsed <= full_elapsed
assert full_elapsed / incr_elapsed >= 1.0
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 | 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 |