contextual-intelligence
БесплатноБез исполняемых скриптовНе проверенProject fingerprinting, association rule mining (Apriori), and cosine-similarity plugin recommendations
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Contextual Plugin Intelligence
Analyze a project's technology stack and recommend plugins using machine learning techniques: $ARGUMENTS
Overview
The intelligence module provides three core capabilities:
- Project Fingerprinting — Scans a project directory to extract a feature vector covering frameworks, languages, infrastructure, and architectural patterns.
- Association Rule Mining (Apriori) — Discovers which features commonly co-occur across projects, then identifies capability gaps in the current project.
- Plugin Recommendations — Ranks available plugins by cosine similarity to the project fingerprint, weighted by gap-filling potential.
Architecture
ProjectFingerprinter
|
|-- detectFrameworks() -> package.json, pyproject.toml, go.mod, Cargo.toml
|-- detectLanguages() -> file extension distribution (recursive walk)
|-- detectInfrastructure() -> config files (Dockerfile, Chart.yaml, .github/workflows, etc.)
|-- detectPatterns() -> monorepo, event-driven, api-gateway, microservices, serverless
|-- findGaps() -> uses AprioriMiner rules to identify missing capabilities
|
v
ProjectFingerprint { frameworks, languages, infrastructure, patterns, missing }
|
v
RecommendationEngine
|-- buildVocabulary() -> union of all feature terms
|-- toBinaryVector() -> project/plugin features -> [0,1,0,1,...] vectors
|-- cosineSimilarity() -> dot(A,B) / (||A|| * ||B||)
|-- computeGapCoverage() -> weighted gap fill score
|-- recommend() -> ranked PluginRecommendation[]
|
v
RecommendationReport { projectSummary, recommendations, gaps, scanDate }
Key Algorithms
Apriori Algorithm
The Apriori algorithm mines association rules from a dataset of project profiles. It works in two phases:
Phase 1: Find Frequent Itemsets
L1 = { items appearing in >= minSupport fraction of transactions }
k = 2
while L(k-1) is non-empty:
Candidates = apriori-gen(L(k-1)) // join + prune
Count each candidate's support across all transactions
L(k) = candidates with support >= minSupport
k++
The Apriori principle (anti-monotone property) states: if {A,B} is infrequent, no superset {A,B,C,...} can be frequent. This allows aggressive pruning of the candidate space.
Phase 2: Generate Rules
For each frequent itemset S where |S| >= 2:
For each item B in S:
A = S \ {B}
confidence = support(S) / support(A)
lift = confidence / support({B})
if confidence >= minConfidence: emit rule A => {B}
Cosine Similarity
Projects and plugins are both represented as binary vectors over a shared vocabulary of feature terms:
vocabulary = sorted union of all terms
project_vector[i] = 1 if vocabulary[i] in project_features else 0
plugin_vector[i] = 1 if vocabulary[i] in plugin_capabilities else 0
similarity = dot(project, plugin) / (norm(project) * norm(plugin))
Final Scoring
relevance = 0.6 * cosine_similarity + 0.4 * gap_coverage
gap_coverage = sum(confidence[gap] for filled gaps) / sum(confidence[gap] for all gaps)
File Structure
plugins/marketplace-pro/
src/intelligence/
types.ts — All TypeScript interfaces
fingerprint.ts — ProjectFingerprinter, AprioriMiner, RecommendationEngine
config/
project-profiles.json — Training dataset (~22 project profiles)
commands/
recommend.md — /mp:recommend slash command
skills/intelligence/
SKILL.md — This file
Usage Examples
Scan Current Project
import { ProjectFingerprinter } from './src/intelligence/fingerprint.js';
const fp = new ProjectFingerprinter('/path/to/project');
const fingerprint = await fp.scan();
console.log('Frameworks:', fingerprint.frameworks);
console.log('Languages:', fingerprint.languages);
console.log('Infrastructure:', fingerprint.infrastructure);
console.log('Patterns:', fingerprint.patterns);
console.log('Missing capabilities:', fingerprint.missing);
Mine Association Rules
import { AprioriMiner } from './src/intelligence/fingerprint.js';
const profiles = [
{ features: ['typescript', 'react', 'nextjs', 'eslint', 'jest', 'ci-cd'] },
{ features: ['typescript', 'nodejs', 'express', 'docker', 'kubernetes', 'helm', 'ci-cd'] },
{ features: ['python', 'fastapi', 'docker', 'terraform', 'aws', 'monitoring'] },
// ...more profiles
];
const miner = new AprioriMiner(profiles, 0.3, 0.6);
const rules = miner.mineRules();
for (const rule of rules) {
console.log(
`{${rule.antecedent.join(', ')}} => {${rule.consequent.join(', ')}}`,
`support=${rule.support} confidence=${rule.confidence} lift=${rule.lift}`
);
}
// Example output:
// {kubernetes, helm} => {ci-cd} support=0.318 confidence=0.875 lift=1.05
// {docker, kubernetes} => {monitoring} support=0.364 confidence=0.8 lift=1.12
Get Plugin Recommendations
import { RecommendationEngine } from './src/intelligen
Установить contextual-intelligence в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл contextual-intelligence?
Project fingerprinting, association rule mining (Apriori), and cosine-similarity plugin recommendations
Как установить скилл contextual-intelligence?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл contextual-intelligence запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic