linngem

Topoguard — AI skill for Claude Code

AI community

Topology design and a k-of-n corroboration firewall against hallucination spread in multi-agent LLM systems.

How to install Topoguard

This entry records only its repository, not the path inside it, so there is no exact command to give. Open linngem/topoguard and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Topoguard does

Topology design and a k-of-n corroboration firewall against hallucination spread in multi-agent LLM systems. Tested with Claude agents on 12 synthetic clinical cases, including autoimmunity. Code, data, prompts and a Claude Code template.

Alternatives in AI

  • User Research Skill — Cookiy AI Skill for AI agents (Claude, Codex, Cursor, OpenClaw) — end-to-end user research: AI interviews, syn 1.5k ★
  • Browser Search — A skill for AI agents: search the web with SearXNG, browse with Camofox, bypass protections with CloakBrowser 499 ★
  • onWatch — Open-source Go CLI that tracks AI API quota usage across 7 providers (Synthetic, Z.ai, Anthropic, Codex, GitHu 397 ★

README

topoguard

**Topology design and a k-of-n corroboration firewall against hallucination spread in multi-agent LLM systems.**

📄 **Article with the experiments and results: [ARTICLE.md](ARTICLE.md)** 🧩 **Ready-to-use Claude Code template: [templates/claude-code](templates/claude-code/README.md)** · 📋 [Cases and prompts](docs/CASES_AND_PROMPTS.md)

Based on consensus and contagion dynamics on networks (Savari et al., *Sci. Rep.* 2026; Horsevad et al., *Nat. Commun.* 2022) and validated with Claude agents on 12 synthetic clinical cases.

![Summary](docs/figures/linkedin_card.png)

Key findings (Claude Haiku 4.5, 12 synthetic clinical cases)

  • Agents filter by plausibility first: implausible errors almost never spread.
  • A plausible error repeated by 4–8 neighbours is adopted 94–100 % of the time.
  • In a star network, an error entering at the hub contaminated up to 80 % of the team.
  • A k = 2 corroboration gate kept every error in its source agent, at the cost of slowing down unexpected true findings.

Full details, figures and limitations in the [article](ARTICLE.md).

Two components

**1. Offline design (no LLM calls)** — `spectral`, `contagion`

  • topology_report(G): clustering, transitivity, mean shortest path, Kirchhoff index and leader–follower bandwidth (the instruction-change frequency at which the team stops following the orchestrator), with the orchestrator at the hub and at the periphery.
  • firewall_curve(G) / best_threshold: the threshold θ that lets a finding asserted by several modules spread while blocking one asserted by a single hallucinating agent.

**2. Runtime** — `reliability`, `gate`

  • design_gate(n, p_fp, sens, rho): smallest k guaranteeing a false-acceptance rate below a target, with correlated errors (beta-binomial, ρ = intraclass correlation).
  • estimate_rho(errors): ρ from each module's validation errors.
  • CorroborationGate: a workspace that only publishes findings corroborated b