linguistic-semantic-algorithms
БесплатноБез исполняемых скриптовНе проверенMapping out an unfamiliar codebase via NLP and graph algorithms — 40 algorithms across topic modelling, semantic embeddings, code graphs, repository mining…
от pproenca★ 231 звезда на GitHubОб этом скилле
pproenca Linguistic and Semantic Algorithms Best Practices
Reference of 40 algorithms an agent should reach for when extracting structure, meaning, history, or risk signals from source code and commit data. Categories are ordered by insight-per-effort — how much non-obvious truth the technique exposes relative to how easy it is to apply. The first two categories target the highest-leverage questions: what business entities live in this code? and where else does this concept already exist? — questions that grep and intuition cannot answer.
When to Apply
Reach for these algorithms when:
- Orienting in an unfamiliar codebase: PageRank the import graph to find the core, run LDA over identifier tokens to discover business themes, mine change coupling to surface hidden architectural couplings.
- Hunting a bug from a description: BM25 + history prior + embedding re-rank produces a ranked file shortlist far better than grep.
- Scoping a feature: find prior PRs that did similar work via embedding similarity; map the feature's vocabulary against the codebase's domain via TF-IDF and noun-phrase mining.
- Reviewing a refactor: AST-level GumTree diff reveals semantic impact text diff hides; PDG isomorphism finds the "same logic, different code" twin you should also update.
- Auditing risk: hotspots (churn × complexity), bus factor, defect-magnet density, dead-code candidates — together they direct attention to the parts of the codebase that pay back attention.
- Identifying domain entities and bounded contexts: noun-phrase mining + TF-IDF rare-term extraction + Louvain communities + Jensen-Shannon divergence on per-cluster vocabulary.
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Question answered |
|---|---|---|---|---|
| 1 | Concept & Domain Extraction | CRITICAL | concept- |
What business entities live in this code? |
| 2 | Semantic Similarity & Feature Mapping | CRITICAL | sim- |
Where else does this concept already exist? |
| 3 | Architectural Topology | HIGH | graph- |
What is the shape of this codebase? |
| 4 | Co-Change & Temporal Mining | HIGH | mine- |
What hidden couplings does history reveal? |
| 5 | Clone & Duplication Detection | MEDIUM-HIGH | clone- |
Where are we repeating ourselves? |
| 6 | Bug & Feature Localization | MEDIUM-HIGH | local- |
Given a description, where in code? |
| 7 | Identifier Linguistics | MEDIUM | ling- |
How to prepare tokens so the other algorithms work? |
| 8 | Complexity & Risk Metrics | MEDIUM | risk- |
Where is the danger concentrated? |
Quick Reference
1. Concept & Domain Extraction (CRITICAL)
concept-lda-topic-modeling— LDA over identifier tokens surfaces latent business themesconcept-noun-phrase-mining— POS-tag + chunk identifiers to extract entity candidatesconcept-tfidf-rare-terms— IDF against a generic corpus isolates domain vocabulary from framework noiseconcept-identifier-cooccurrence-network— PMI-weighted co-occurrence graph reveals conceptual neighborhoodsconcept-entity-name-resolution— Cluster name variants (user/usr/u/userAccount) via embedding + edit distanceconcept-bounded-context-detection— Louvain + Jensen-Shannon divergence detects DDD bounded contexts
2. Semantic Similarity & Feature Mapping (CRITICAL)
sim-codebert-embeddings— CodeBERT + cosine for semantic code search across renamessim-pdg-semantic-clones— Program Dependence Graph isomorphism finds Type-4 clonessim-cross-pr-feature-mapping— Embed merged PRs once, retrieve precedent at feature-design timesim-cosine-vsm-files— TF-IDF VSM file similarity when no GPU is availablesim-call-pattern-similarity— N-grams on call-sequence find behavioral twinssim-doc-code-alignment— Joint code-doc embedding flags drift between docs and code
3. Architectural Topology (HIGH)
graph-pagerank-core— PageRank the import graph to find the codebase coregraph-betweenness-bottlenecks— Betweenness centrality surfaces bottleneck modulesgraph-louvain-modules— Louvain community detection reveals natural module boundariesgraph-scc-cycle-tangles— Tarjan's SCC algorithm exposes circular-dependency tangles- [
graph-feedback-arcs](references/graph-fe
Установить linguistic-semantic-algorithms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл linguistic-semantic-algorithms?
Mapping out an unfamiliar codebase via NLP and graph algorithms — 40 algorithms across topic modelling, semantic embeddings, code graphs, repository mining, clone detection, IR-based bug localization, identifier linguistics, and complexity metrics. Trigger when hunting bugs across many files, scoping a new feature, identifying domain entities, or analyzing commit history — even if the user doesn't explicitly mention algorithms — apply when they ask "where does X live in this codebase?", "what is this codebase about?", "find duplicated logic", "what changed recently?", "who owns this code?", or "is this function risky?".
Как установить скилл linguistic-semantic-algorithms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл linguistic-semantic-algorithms запускает скрипты?
Нет, скилл состоит только из инструкций (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