"algo-nlp-lda"

"algo-nlp-lda" is a skill for Claude Code from charlieviettq/awesome-agent-skill. It costs 69 tokens per session (1,008 once invoked), scanned A, a copy of algo-nlp-lda, MIT.

A statistical method for discovering recurring themes in a collection of documents. It represents each document as a mixture of topics and each topic as a pattern of words, without needing labeled examples.

In plain words
What is it for?
Use it to discover themes, group documents by automatically found topics, and explore the structure of an unfamiliar text collection.
Why use it?
It helps explore large text collections when the categories are not known in advance. It is less suitable for very short texts or when you need deeper meaning rather than word-based themes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to discover themes, group documents by automatically found topics, and explore the structure of an unfamiliar text collection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/charlieviettq/awesome-agent-skill/algo-nlp-lda
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 charlieviettq/awesome-agent-skill --skill algo-nlp-lda
Clone the repo
git clone --depth 1 https://github.com/charlieviettq/awesome-agent-skill

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 "algo-nlp-lda"

README.md
[![agentmods](https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda/github.svg)](https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda)
Your own site
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda/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 "algo-nlp-lda"

Your own site · 80×15
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-nlp-lda.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,008 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 89% copy Near-identical to another mod 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.00069 $0.01008
Opus 5 $0.00034 $0.00504
Sonnet 5 $0.00014 $0.00202
Haiku 4.5 $0.00007 $0.00101

Measured 12d ago against content hash 238344df6a56, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

"algo-nlp-lda" 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 12d 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.

Origin

This is a copy

89% identical to algo-nlp-lda — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/algo-nlp-lda/SKILL.md · 87 lines

How it starts

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

LDA Topic Modeling

Overview

Latent Dirichlet Allocation models each document as a mixture of topics and each topic as a distribution over words. Discovers K latent topics from a corpus without supervision. Uses Gibbs sampling or variational inference. Complexity: O(N × K × iterations) where N = total word tokens.

When to Use

Trigger conditions:

  • Discovering latent themes in a large document collection
  • Organizing/categorizing documents by automatically discovered topics
  • Exploratory text analysis when categories are unknown

When NOT to use:

  • When categories are known (use supervised classification)
  • For short texts (tweets, titles) — too few words per document for reliable topic assignment
  • When you need semantic understanding (use embeddings)

Algorithm

IRON LAW: The Number of Topics K Must Be Chosen, Not Discovered
LDA does NOT tell you how many topics exist. K is a hyperparameter.
Too few topics: overly broad, mixed themes. Too many: fragmented,
redundant topics. Use coherence score (C_v) to compare K values,
but the final choice requires human judgment on topic interpretability.

Phase 1: Input Validation

Preprocess: tokenize, remove stop words, apply lemmatization. Build document-term matrix. Filter: remove terms appearing in <5 or >50% of documents. Gate: Clean DTM, vocabulary size reasonable (1K-50K terms).

Phase 2: Core Algorithm

  1. Choose K (start with √(N/2), try range K=5,10,15,20,...)
  2. Set hyperparameters: α = 50/K (document-topic density), β = 0.01 (topic-word density)
  3. Run LDA (Gibbs sampling: 1000+ iterations, or variational inference)
  4. Extract: topic-word distributions (top 10-20 words per topic) and document-topic distributions

Phase 3: Verification

Evaluate: topic coherence (C_v score, higher is better), manual inspection of top words per topic, check for "junk" topics (mixed incoherent words). Gate: Coherence score acceptable, topics are humanly interpretable.

Phase 4: Output

Return topics with top words and document assignments.

Read the full file on GitHub · 87 lines

Files

What ships with it

3 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. 12d ago First seen · 87 lines · 69 tokens per session scan A 238344df6a56

Subscribe to this mod's changes

"algo-nlp-lda" is a skill published in the GitHub repository charlieviettq/awesome-agent-skill (25 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,008 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to algo-nlp-lda, differing in 8 lines, and is treated as a copy.