infrastructure-llm

A local Large Language Model integration for research work, using Ollama to run models on your own computer. It includes prompts, conversation context, output checks, manuscript-review generation, and a command-line interface.

In plain words
What is it for?
Use it to query local models, summarize papers, generate manuscript reviews, compose prompts, and validate model output.
Why use it?
It provides one project interface for asking a local model questions and checking the quality of its responses.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/docxology/template/llm
Any agent
npx skills add docxology/template --skill llm
Clone the repo
git clone --depth 1 https://github.com/docxology/template

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,175 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.01175
Opus 5 $0.00033 $0.00588
Sonnet 5 $0.00013 $0.00235
Haiku 4.5 $0.00007 $0.00118

Measured 3d ago against content hash 7ca5006b6be4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

infrastructure-llm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 34 executable files (__init__.py, cli/__init__.py, cli/__main__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

infrastructure/llm/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LLM Module

Local Large Language Model integration for research assistance via Ollama.

Module Structure

flowchart LR
    LLM[llm/]
    LLM --> CORE[core<br/>client · config · context]
    LLM --> TPL[templates<br/>prompt templates for research]
    LLM --> VAL[validation<br/>output quality validation]
    LLM --> RV[review<br/>manuscript review generation]
    LLM --> PR[prompts<br/>fragment composition system]
    LLM --> UT[utils<br/>Ollama server management]
    LLM --> CLI[cli<br/>command-line interface]

    classDef d fill:#0f172a,stroke:#0f172a,color:#fff
    classDef pkg fill:#1e3a8a,stroke:#0f172a,color:#fff
    class LLM d
    class CORE,TPL,VAL,RV,PR,UT,CLI pkg

LLM Client (core/client.py)

from infrastructure.llm import LLMClient, OllamaClientConfig, GenerationOptions

# Initialize with defaults
client = LLMClient()

# Custom configuration
config = OllamaClientConfig(default_model="gemma3:4b", temperature=0.7)
client = LLMClient(config)

# Generate a response
response = client.query("Summarize this paper...", options=GenerationOptions(
    max_tokens=2000,
    temperature=0.3,
))

Conversation Context (core/context.py)

from infrastructure.llm.core import ConversationContext, Message

context = ConversationContext()
context.add_message(role="user", content="What is active inference?")
context.add_message(role="assistant", content="Active inference is...")

Prompt Templates (templates/)

Pre-built research task templates:

from infrastructure.llm import get_template
from infrastructure.llm.templates import (
    ResearchTemplate, PaperSummarization,
    ManuscriptExecutiveSummary, ManuscriptQualityReview,
    ManuscriptMethodologyReview, ManuscriptImprovementSuggestions,
    ManuscriptTranslationAbstract,
)

# Get a template by name
template = get_template("paper_summarization")

# Use specific template classes
summary_template = ManuscriptExecutiveSummary()
prompt = summary_template.render(text=text)

Read the full file on GitHub · 179 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 179 lines · 66 tokens per session scan A 7ca5006b6be4

Subscribe to this mod's changes

infrastructure-llm is a skill published in the GitHub repository docxology/template (19 stars, last pushed 3d ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,175 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shipjaw-prompt

Turns a rough, messy, or vague product idea into a dense build-ready product prompt and persists it at documentation/product/source-prompt.md for shipjaw-build. Use when the user wants to express/clarify/polish a product before scaffolding, mentions idée vague, brainstorm app, help me write the prompt, notes produit…

XyDisorder/shipjaw · 147 tokens

9router-chat

Chat / code generation via 9Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 9Router.

decolua/9router · 63 tokens

best-practices

Transforms vague prompts into optimized Claude Code prompts. Adds verification, specific context, constraints, and proper phasing. Invoke with /best-practices.

MoizIbnYousaf/Ai-Agent-Skills · 35 tokens

llm-application-dev

Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.

MoizIbnYousaf/Ai-Agent-Skills · 40 tokens

firebase-ai

Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

evanca/flutter-ai-rules · 30 tokens

compress-prompt

Compress a Rosetta KB prompt artifact (skill · workflow · phase · rule · agent · template · generic) by stripping structural tautology and ineffective scaffolding while preserving every importance-bearing token. Use when the user asks to compress, shorten, tighten, densify, or reduce a prompt / skill / workflow /…

griddynamics/rosetta · 71 tokens