Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:51:52 +08:00
commit e164ba674c
9 changed files with 242 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"name": "recommendation-engine",
"description": "Build recommendation systems and engines",
"version": "1.0.0",
"author": {
"name": "Claude Code Plugins",
"email": "[email protected]"
},
"skills": [
"./skills"
],
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# recommendation-engine
Build recommendation systems and engines

View File

@@ -0,0 +1,15 @@
---
description: Execute AI/ML task with intelligent automation
---
# AI/ML Task Executor
You are an AI/ML specialist. When this command is invoked:
1. Analyze the current context and requirements
2. Generate appropriate code for the ML task
3. Include data validation and error handling
4. Provide performance metrics and insights
5. Save artifacts and generate documentation
Support modern ML frameworks and best practices.

65
plugin.lock.json Normal file
View File

@@ -0,0 +1,65 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/ai-ml/recommendation-engine",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "7a828af3ca4e05126b23e4f7336d2b47221ad77f",
"treeHash": "79aaacb7d7ed17815a3bd309fb0bbb2b12c95fc00aa5ad02e4aaab2179883256",
"generatedAt": "2025-11-28T10:18:41.210875Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "recommendation-engine",
"description": "Build recommendation systems and engines",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "651994b7a8125dbcb25348bb182e70d07ce3b3db709fd5c157706fde4126a708"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "012fbc4013ed852d3c2ecd76e9c2d418d771e0d3eda6f32d2e0645efa63ce6a3"
},
{
"path": "commands/build-recommender.md",
"sha256": "043efb83e2f02fc6d0869c8a3a7388d6e49f6c809292b93dd6a97a1b142e5647"
},
{
"path": "skills/recommendation-engine/SKILL.md",
"sha256": "c80b75bb80ea147295ca23e08ae71a7c21ec073c10db57343c5013279eb9f8b9"
},
{
"path": "skills/recommendation-engine/references/README.md",
"sha256": "1855a93ea8396778ee10dc136b989bce73051dbf7a28ff388b6c30f1610ce7ef"
},
{
"path": "skills/recommendation-engine/scripts/README.md",
"sha256": "08a0c836f8f0b40a487eb75f9e2f879216b8a586315fa32dd0a64ca3c6081469"
},
{
"path": "skills/recommendation-engine/assets/configuration_template.yaml",
"sha256": "85fe1fac1fbe291c2ed4965e200adeef238184db3e96a6030a406d96eda23639"
},
{
"path": "skills/recommendation-engine/assets/README.md",
"sha256": "625a015b656c9359b3e21b0456c75b45d2230b08d75421fb7e1074fa0f13f6ad"
}
],
"dirSha256": "79aaacb7d7ed17815a3bd309fb0bbb2b12c95fc00aa5ad02e4aaab2179883256"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,52 @@
---
name: building-recommendation-systems
description: |
This skill empowers Claude to construct recommendation systems using collaborative filtering, content-based filtering, or hybrid approaches. It analyzes user preferences, item features, and interaction data to generate personalized recommendations. Use this skill when the user requests to build a recommendation engine, needs help with collaborative filtering, wants to implement content-based filtering, or seeks to rank items based on relevance for a specific user or group of users. It is triggered by requests involving "recommendations", "collaborative filtering", "content-based filtering", "ranking items", or "building a recommender".
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## Overview
This skill enables Claude to design and implement recommendation systems tailored to specific datasets and use cases. It automates the process of selecting appropriate algorithms, preprocessing data, training models, and evaluating performance, ultimately providing users with a functional recommendation engine.
## How It Works
1. **Analyzing Requirements**: Claude identifies the type of recommendation needed (collaborative, content-based, hybrid), data availability, and performance goals.
2. **Generating Code**: Claude generates Python code using relevant libraries (e.g., scikit-learn, TensorFlow, PyTorch) to build the recommendation model. This includes data loading, preprocessing, model training, and evaluation.
3. **Implementing Best Practices**: The code incorporates best practices for recommendation system development, such as handling cold starts, addressing scalability, and mitigating bias.
## When to Use This Skill
This skill activates when you need to:
- Build a personalized movie recommendation system.
- Create a product recommendation engine for an e-commerce platform.
- Implement a content recommendation system for a news website.
## Examples
### Example 1: Personalized Movie Recommendations
User request: "Build a movie recommendation system using collaborative filtering."
The skill will:
1. Generate code to load and preprocess movie rating data.
2. Implement a collaborative filtering algorithm (e.g., matrix factorization) to predict user preferences.
### Example 2: E-commerce Product Recommendations
User request: "Create a product recommendation engine for an online store, using content-based filtering."
The skill will:
1. Generate code to extract features from product descriptions and user purchase history.
2. Implement a content-based filtering algorithm to recommend similar products.
## Best Practices
- **Data Preprocessing**: Ensure data is properly cleaned and formatted before training the recommendation model.
- **Model Evaluation**: Use appropriate metrics (e.g., precision, recall, NDCG) to evaluate the performance of the recommendation system.
- **Scalability**: Design the recommendation system to handle large datasets and user bases efficiently.
## Integration
This skill can be integrated with other Claude Code plugins to access data sources, deploy models, and monitor performance. For example, it can use data analysis plugins to extract features from raw data and deployment plugins to deploy the recommendation system to a production environment.

View File

@@ -0,0 +1,8 @@
# Assets
Bundled resources for recommendation-engine skill
- [ ] example_user_data.csv: Example user data for testing the recommendation engine.
- [ ] example_item_data.csv: Example item data for testing the recommendation engine.
- [ ] recommender_template.py: Template for creating a new recommendation engine.
- [ ] configuration_template.yaml: Template for configuring the recommendation engine.

View File

@@ -0,0 +1,68 @@
# Configuration template for the recommendation engine plugin.
# Data source configuration
data_source:
type: "csv" # Type of data source: csv, database, api, etc.
path: "data/user_item_interactions.csv" # Path to the data file or API endpoint
# Database connection details (if applicable)
database:
host: "localhost" # REPLACE_ME: Database host
port: 5432 # Database port
name: "recommendations_db" # REPLACE_ME: Database name
user: "recommendations_user" # REPLACE_ME: Database user
password: "YOUR_DATABASE_PASSWORD" # REPLACE_ME: Database password
# Feature engineering configuration
feature_engineering:
user_features:
- "age" # List of user features to use
- "location"
- "interests"
item_features:
- "category" # List of item features to use
- "price"
- "description"
interaction_features:
- "rating" # List of interaction features to use
- "timestamp"
feature_scaling: "standard" # Feature scaling method: standard, minmax, none
# Model configuration
model:
type: "collaborative_filtering" # Type of recommendation model: collaborative_filtering, content_based, hybrid
algorithm: "als" # Algorithm to use for the model: als, sgd, knn, etc.
hyperparameters:
n_factors: 50 # Number of latent factors in collaborative filtering
reg_param: 0.01 # Regularization parameter
epochs: 10 # Number of training epochs
cold_start_strategy: "popularity" # Strategy for handling cold start problems: popularity, average, etc.
# Evaluation configuration
evaluation:
metrics:
- "precision" # List of evaluation metrics to use
- "recall"
- "ndcg"
split_ratio: 0.8 # Ratio of data to use for training (remaining for testing)
k: 10 # Number of recommendations to consider for evaluation
# Deployment configuration
deployment:
model_path: "models/recommendation_model.pkl" # Path to save the trained model
api_endpoint: "/recommendations" # API endpoint for serving recommendations
num_recommendations: 5 # Default number of recommendations to return
# Logging configuration
logging:
level: "INFO" # Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
file: "logs/recommendation_engine.log" # Path to the log file
# Performance optimization configuration
optimization:
enable_caching: true # Enable caching of recommendations
cache_expiry: 3600 # Cache expiry time in seconds (1 hour)
# Error handling configuration
error_handling:
retries: 3 # Number of retries for failed requests
retry_delay: 60 # Delay between retries in seconds

View File

@@ -0,0 +1,8 @@
# References
Bundled resources for recommendation-engine skill
- [ ] collaborative_filtering_guide.md: Detailed explanation of collaborative filtering techniques.
- [ ] content_based_filtering_guide.md: Detailed explanation of content-based filtering techniques.
- [ ] evaluation_metrics.md: Explanation of evaluation metrics for recommendation systems.
- [ ] data_schema.md: Defines the schema for user and item data.

View File

@@ -0,0 +1,8 @@
# Scripts
Bundled resources for recommendation-engine skill
- [ ] build_collaborative_filtering.py: Automates the creation of a collaborative filtering recommendation engine.
- [ ] build_content_based_filtering.py: Automates the creation of a content-based filtering recommendation engine.
- [ ] evaluate_recommender.py: Evaluates the performance of the recommendation engine using metrics like precision, recall, and NDCG.
- [ ] data_preprocessing.py: Script to preprocess the user-item interaction data.