lemmalog
БесплатноБез исполняемых скриптовНе проверенExternalize working memory and logical state into the lemmalog Datalog engine (MCP). Use for ANY multi-step task where state should outlive one context window…
от lza6★ 19 звёзд на GitHubОб этом скилле
Lemmalog — external working memory
lemmalog is a Datalog engine exposed as MCP tools. It is your working
memory: assertions with provenance and confidence, derived consequences
computed by rules, hypotheses with lifecycles — persistent across agents
and context resets.
The division of labor: the engine owns state and consequence; you own perception and choice; every choice's outcome returns to the engine. A claim that isn't in the engine doesn't exist — nothing durable lives in your context.
Setup
- The
lemmalog_*tools must be registered (see the README of the lemmalog repo). If they are absent, tell the user the one-line registration command and continue without memory — never block the task. - Persistence across sessions exists if
LEMMALOG_MCP_PATHwas set at registration;lemmalog_saveforces a snapshot. Snapshots carry rule batches too — installed analyses survive restarts under their batch ids. - No MCP access (sub-agents that don't inherit MCP connections, scripts,
cron)?
lemmalog-cliworks on the SAME snapshot:LEMMALOG_MCP_PATH=... lemmalog-cli observe --facts 'S --rel--> O', plus query/retract/context/why/rules/dump. Mutations are visible to the MCP server on its next load and vice versa — but the two hold separate in-process copies, so don't write from both at once: hand sub-agents the CLI and keep the parent on it too, or have the parent only read while a sub-agent writes.
The discipline
- Assert as you verify. The moment you confirm something — a call
edge, a config value, a decision, a step completed — assert it:
S --rel[conf]--> O. Tag read-and-verified facts[1.0]and inferences[0.4]–[0.7]. Do not omit the tag on anything you expect to derive over: the default is 0.9 and confidence is a product down the proof chain, so four hops of "verified" facts land at 0.66 and a deep closure decays to noise. Anchor evidence withlocated(Entity, "file:line")(or any stable reference) so provenance survives derivation — source references are valid entity tokens as long as they contain no spaces. Never assert what you haven't checked. - Install rules when a pattern repeats. If you ask the same shape of
question twice, write the Datalog for it: transitive closures, guard
tracking, status rollups,
count/min/max/sumaggregates. Rules are experiments: one named batch per analysis idea, validated on install (rejections are spec feedback), backfilled against everything already asserted,lemmalog_uninstallwhen the idea dies. - Query before re-reasoning. Multi-hop, transitive, or
not-X-reachable questions go through rules and
lemmalog_query— never mental closure, and never re-deriving what a prior agent derived. For grounded answering,lemmalog_contextretrieves the question-relevant facts plus their verbatim source episodes under a token budget, with an attribution contrast (which subjects hold facts on the topic — a question-mentioned party with zero topic facts is a false-premise signal) and, for current-state questions, the latest value per slot with supersessions as history — use it instead oflemmalog_dumpwhen preparing answers; selection beats dumping. lemmalog_whybefore trusting any derived fact. The proof tree shows which asserted edges carry it; a chain is only as good as its lowest-confidence edge. Re-verify the weakest edges against theirlocatedanchors.- Hypotheses have lifecycles.
H --hypothesis--> claim,H --status--> proposed|supported|refuted|validated(supersedes),H --evidence--> ref(accumulates). Test counterfactuals withlemmalog_what_if— temporary facts, answered goal, store untouched. - Correct by retracting. When you learn an asserted fact was
wrong — not changed, wrong —
lemmalog_retractit: the response lists every derived conclusion that died with it, so the repair is visible, not silent. (A value that merely changed is re-asserted under the same relation; see "State that changes".) After a context reset or another agent's turn,lemmalog_changeswith your last epoch resyncs you without re-reading the store. - Reconcile vocabulary, don't enforce it. Name things naturally;
when two names mean one thing,
local --alias_of[conf]--> canonicalvialemmalog_canonicalize. Conflicts surface asalias_conflictfacts; they never silently merge. - Decide from queries. Derive candidate views — unexplored items, blocked-by-what, what-needs-attention — and choose among them. The queries propose; you dispose (including off-list when judgment says so). Then assert the decision so state stays complete.
- Report from the engine. Final deliverables render from queries and
whytrees, not from memory. A conclusion's confidence is the product of its edges (the engine multiplies down the proof chain) — deep derivations need h
Установить lemmalog в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл lemmalog?
Externalize working memory and logical state into the lemmalog Datalog engine (MCP). Use for ANY multi-step task where state should outlive one context window or span agents: long investigations, debugging sessions, audits, multi-agent searches, systematic explorations, planning with many interdependent constraints, anything needing provenance for its conclusions. Trigger when lemmalog_ MCP tools are available and the task involves accumulating verified facts, tracking hypotheses or status over time, or repeatedly re-deriving the same relationships.
Как установить скилл lemmalog?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lemmalog запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic