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_worklist_cli.py
View on GitHub"""Tests for worklist CLI subcommand."""
import json
from pathlib import Path
import pytest
from agent_wiki import config, frontmatter, wiki_index
def _topic(vault: Path, name: str, meta: dict, body: str = "x") -> Path:
"""Create a topic with frontmatter and body."""
topics = config.topics_dir(vault)
topics.mkdir(parents=True, exist_ok=True)
path = topics / name
path.write_text(frontmatter.dump(meta, body), encoding="utf-8")
return path
def _init(vault: Path) -> None:
"""Initialize wiki structure."""
config.topics_dir(vault).mkdir(parents=True, exist_ok=True)
def test_worklist_cli_requires_initialized_wiki(tmp_path, capsys):
"""worklist CLI fails when wiki not initialized."""
import agent_wiki_cli
with pytest.raises(SystemExit) as exc_info:
agent_wiki_cli.main(["worklist", "--vault", str(tmp_path)])
assert exc_info.value.code == 1
captured = capsys.readouterr()
output = json.loads(captured.err)
assert output["error"] == "wiki_not_initialized"
def test_worklist_cli_returns_wanted_and_stale(tmp_path, capsys):
"""worklist CLI returns wanted and stale lists."""
_init(tmp_path)
_topic(tmp_path, "A.md", {"title": "A"}, "Links [[Missing]].")
_topic(tmp_path, "stub.md", {"title": "Stub"}, "Short.")
# Save index
data, _ = wiki_index.rebuild(tmp_path)
wiki_index.save_index(tmp_path, data)
import agent_wiki_cli
result = agent_wiki_cli.main(["worklist", "--vault", str(tmp_path)])
assert result == 0
captured = capsys.readouterr()
output = json.loads(captured.out)
assert output["ok"] is True
assert "wanted" in output
assert "stale" in output
# Check wanted
assert len(output["wanted"]) == 1
assert output["wanted"][0]["target"] == "Missing"
# Check stale
stale_paths = [s["path"] for s in output["stale"]]
assert "stub.md" in stale_paths
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 |