llm-app-patterns

llm-app-patterns is a skill for Claude Code from tranhieutt/software_development_department. It costs 50 tokens per session (1,000 once invoked), scanned A, original, MIT.

A set of architecture patterns for AI applications and assistants, including prompt design, retrieval-augmented generation, agent loops, conversation handling, and evaluation.

In plain words
What is it for?
Use it when building chatbots, document question-answering systems, tool-using assistants, or other LLM-based features.
Why use it?
It helps choose an appropriate structure for AI features based on the type of task, such as answering questions, using tools, or completing multi-step work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it when building chatbots, document question-answering systems, tool-using assistants, or other LLM-based features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/llm-app-patterns
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.

Any agent
npx skills add tranhieutt/software_development_department --skill llm-app-patterns
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for llm-app-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/llm-app-patterns/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/llm-app-patterns)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/llm-app-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/llm-app-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for llm-app-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/llm-app-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/llm-app-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,000 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.01000
Opus 5.5 $0.00020 $0.00400
Sonnet 5.5 $0.00010 $0.00200
Haiku 4.5 $0.00005 $0.00100

Measured 2mo ago against content hash 1495215ee760, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

llm-app-patterns 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 2mo ago.

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.

.claude/skills/llm-app-patterns/SKILL.md · 122 lines

How it starts

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

LLM Application & AI Assistant Patterns

Resources

Architecture decision matrix

Pattern Use when Cost
Simple RAG FAQ, docs Q&A Low
Hybrid RAG (semantic + BM25) Mixed query types Medium
Function calling Structured tool use Low
ReAct agent Multi-step reasoning Medium
Plan-and-execute Complex decomposable tasks High
Multi-agent Research, critique-refine Very High

RAG: critical config numbers

CHUNK_CONFIG = {
    "chunk_size": 512,       # tokens — sweet spot for most docs
    "chunk_overlap": 50,     # prevents context loss at boundaries
    "separators": ["\n\n", "\n", ". ", " "],
}
# Hybrid search alpha: 1.0=semantic only, 0.0=BM25 only, 0.5=balanced

RAG: retrieval strategies

# Basic: semantic search
results = vector_db.similarity_search(embed(query), top_k=5)

# Better: hybrid (semantic + keyword via RRF)
def hybrid_search(query, alpha=0.5):
    return rrf_merge(vector_db.search(query), bm25_search(query), alpha)

# Best for recall: multi-query (3 variations, deduplicate)
queries = llm.generate_variations(query, n=3)
results = deduplicate([semantic_search(q) for q in queries])

RAG: generation prompt template

RAG_PROMPT = """Answer based ONLY on the context below.
If insufficient, say "I don't have enough information."

Context: {context}
Question: {question}
Answer:"""

Agent: function calling loop

messages = [{"role": "user", "content": question}]
while True:
    response = llm.chat(messages=messages, tools=TOOLS, tool_choice="auto")
    if not response.tool_calls:
        return response.content
    for call in response.tool_calls:
        result = execute_tool(call.name, call.arguments)
        messages.append({"role": "tool", "tool_call_id": call.id, "content": str(result)})

Production: caching (only temperature=0 responses)

def get_or_generate(prompt, model, **kwargs):
    deterministic = kwargs.get("temperature", 1.0) == 0
    if deterministic:
        key = sha256(f"{model}:{prompt}:{json.dumps(kwargs, sort_keys=True)}")
        if cached := redis.get(key): return cached
    response = llm.generate(prompt, model=model, **kwargs)
    if deterministic: redis.setex(key, 3600, response)
    return response

Read the full file on GitHub · 122 lines

Files

What ships with it

1 file 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. 2mo ago First seen · 122 lines · 50 tokens per session scan A 1495215ee760

Subscribe to this mod's changes

llm-app-patterns is a skill published in the GitHub repository tranhieutt/software_development_department (74 stars, last pushed 6mo ago), licensed MIT. It adds 50 tokens to every session and 1,000 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

llm-app-patterns compared with skills from other repositories

llm-app-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
llm-app-patternstranhieutt/software_development_departmentSkill746mo agoMITA50Claude Code
reviewing-ai-papersoaustegard/claude-skillsSkill374todayMITA105Claude Code
langchain-developmentMindrally/skillsSkill3051mo agoApache-2.0A29Claude Code
ai-productlingxling/awesome-skills-cnSkill3311mo agoMITA28Claude Code
laravel-ai-sdkfusengine/agentsSkill341mo agoMITA35Claude Code
ai-securityKin9Zeus/senior-engineer-skillsSkill320d agoMITA225Claude Code
dspy-haystack-integrationOmidZamani/dspy-skillsSkill1244mo agoMITA32Claude Code