feat: add comprehensive environment and trending analysis prompt templates

Environment Analysis Templates:
- analyze_environment_dependencies: Analyze current Python environment and dependencies
- check_outdated_packages: Check for outdated packages with update priorities
- generate_update_plan: Create comprehensive package update plans with strategies

Trending Analysis Templates:
- analyze_daily_trends: Analyze daily PyPI download trends and popular packages
- find_trending_packages: Discover trending packages over different time periods
- track_package_updates: Track recent package updates and releases

Key Features:
- Follow standard MCP workflow with {{parameter}} template variables
- Support environment analysis (uvx pip list integration ready)
- Enable trending package discovery and popularity analysis
- Provide structured update planning with different strategies
- Include comprehensive parameter validation and documentation
- Add usage examples and integration guides

All templates follow the established MCP prompt workflow:
1. User calls tool → MCP client sends request
2. Tool function executes → Collects necessary data and parameters
3. Call Prompt generator → Pass parameters to corresponding generator
4. Load template → Get template with {{parameter}} placeholders
5. Parameter replacement → Replace {{parameter_name}} with actual values
6. Return final prompt → As tool's response back to AI

Updated documentation and README with new template examples and usage patterns.

Signed-off-by: longhao <hal.long@outlook.com>
This commit is contained in:
longhao 2025-05-29 16:36:58 +08:00 committed by Hal
parent 4bdf38d455
commit d63ef02ef3
6 changed files with 989 additions and 0 deletions

View file

@ -186,6 +186,124 @@ Generate a detailed migration checklist prompt.
}
```
### Environment Analysis Templates
#### 9. `analyze_environment_dependencies`
Generate a prompt for analyzing current environment dependencies.
**Parameters:**
- `environment_type` (optional): Type of environment (local, virtual, docker, conda)
- `python_version` (optional): Python version in the environment
- `project_path` (optional): Path to the project directory
**Use Case:** When you need to analyze your current Python environment and check for outdated packages.
**Example:**
```json
{
"environment_type": "virtual",
"python_version": "3.11",
"project_path": "/path/to/project"
}
```
#### 10. `check_outdated_packages`
Generate a prompt for checking outdated packages with update priorities.
**Parameters:**
- `package_filter` (optional): Filter packages by name pattern
- `severity_level` (optional): Focus level (all, security, major, minor)
- `include_dev_dependencies` (optional): Include development dependencies
**Use Case:** When you want to identify and prioritize package updates.
**Example:**
```json
{
"package_filter": "django*",
"severity_level": "security",
"include_dev_dependencies": true
}
```
#### 11. `generate_update_plan`
Generate a prompt for creating comprehensive package update plans.
**Parameters:**
- `update_strategy` (optional): Update strategy (conservative, balanced, aggressive)
- `environment_constraints` (optional): Environment constraints or requirements
- `testing_requirements` (optional): Testing requirements before updates
**Use Case:** When you need a structured plan for updating packages in your environment.
**Example:**
```json
{
"update_strategy": "balanced",
"environment_constraints": "Production environment, zero downtime required",
"testing_requirements": "Full test suite + integration tests"
}
```
### Trending Analysis Templates
#### 12. `analyze_daily_trends`
Generate a prompt for analyzing daily PyPI download trends.
**Parameters:**
- `date` (optional): Specific date to analyze (YYYY-MM-DD) or 'today'
- `category` (optional): Package category to focus on (web, data, ml, etc.)
- `limit` (optional): Number of top packages to analyze (5-50)
**Use Case:** When you want to understand what packages are trending on PyPI.
**Example:**
```json
{
"date": "today",
"category": "machine-learning",
"limit": 20
}
```
#### 13. `find_trending_packages`
Generate a prompt for discovering trending packages over time periods.
**Parameters:**
- `time_period` (optional): Time period for trend analysis (daily, weekly, monthly)
- `trend_type` (optional): Type of trends to focus on (rising, declining, new, all)
- `domain` (optional): Specific domain or category (web, ai, data, etc.)
**Use Case:** When you want to discover packages that are gaining or losing popularity.
**Example:**
```json
{
"time_period": "weekly",
"trend_type": "rising",
"domain": "web-development"
}
```
#### 14. `track_package_updates`
Generate a prompt for tracking recent package updates and releases.
**Parameters:**
- `time_range` (optional): Time range for update tracking (today, week, month)
- `update_type` (optional): Type of updates to track (all, major, security, new)
- `popular_only` (optional): Focus only on popular packages (>1M downloads)
**Use Case:** When you want to stay informed about recent package updates and releases.
**Example:**
```json
{
"time_range": "week",
"update_type": "security",
"popular_only": true
}
```
## 🚀 Usage Examples
### In Claude Desktop