Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:20:20 +08:00
commit b1f89ff340
21 changed files with 1279 additions and 0 deletions

34
commands/log.md Normal file
View File

@@ -0,0 +1,34 @@
---
description: Log a new AI experiment with terminal report
shortcut: log-exp
---
# Log AI Experiment
When the user runs `/log-exp` or `/log`, help them log a new AI experiment by gathering the following information:
## Required Information
1. **AI Tool Used** - e.g., "ChatGPT o1-preview", "Claude Sonnet 3.5", "Gemini Pro"
2. **Prompt/Query** - What they asked the AI
3. **Result Summary** - Brief summary of the AI's response
4. **Effectiveness Rating** - 1 (poor) to 5 (excellent)
5. **Tags** (optional) - Comma-separated tags like "code-generation, python, debugging"
6. **Date** (optional) - Defaults to now if not provided
## Process
1. Ask for the information conversationally (don't make it feel like a form)
2. Once you have all required info, use the `log_experiment` MCP tool
3. Display a formatted terminal report showing:
- ✅ Success confirmation
- 📊 Experiment ID
- 🤖 AI Tool
- ⭐ Rating
- 🏷️ Tags
- 📅 Date/Time
## Example Interaction
```
User: /log-exp

123
commands/report.md Normal file
View File

@@ -0,0 +1,123 @@
---
description: Generate comprehensive terminal report of AI experiments
shortcut: ai-report
---
# AI Experiments Report
When the user runs `/ai-report`, generate a comprehensive, well-formatted terminal report of their AI experiments.
## Report Sections
### 1. Summary Statistics
Display at the top:
```
╔══════════════════════════════════════════════════════════════╗
║ AI EXPERIMENT LOGGER - SUMMARY REPORT ║
╚══════════════════════════════════════════════════════════════╝
📊 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Experiments: [count]
Average Rating: [X.XX] ⭐
Date Range: [earliest] → [latest]
```
### 2. Top Performing AI Tools
Show the top 5 AI tools by average rating:
```
🏆 TOP AI TOOLS BY PERFORMANCE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. ChatGPT o1-preview ⭐ 4.85 avg (20 experiments)
2. Claude Sonnet 3.5 ⭐ 4.75 avg (18 experiments)
3. Gemini Pro ⭐ 4.20 avg (12 experiments)
```
### 3. Rating Distribution
Show distribution visually:
```
⭐ RATING DISTRIBUTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5 stars ████████████████████████████ (28)
4 stars ████████████████████ (20)
3 stars ██████████ (10)
2 stars ████ (4)
1 star ██ (2)
```
### 4. Most Used Tags
Show top 10 tags:
```
🏷️ POPULAR TAGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
code-generation (15) debugging (12) research (10)
creative-writing (8) data-analysis (7) testing (6)
```
### 5. Recent Activity
Show last 7 days:
```
📈 RECENT ACTIVITY (Last 7 Days)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-10-13: ████████ (8 experiments)
2025-10-12: ██████ (6 experiments)
2025-10-11: ████ (4 experiments)
```
### 6. Latest Experiments
Show the 5 most recent:
```
📝 LATEST EXPERIMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Oct 13, 2:30 PM] ChatGPT o1-preview ⭐⭐⭐⭐⭐
Prompt: Write a Python function to calculate Fibonacci
Tags: code-generation, python
[Oct 13, 1:15 PM] Claude Sonnet 3.5 ⭐⭐⭐⭐
Prompt: Debug React useState issue with async
Tags: debugging, react, javascript
```
## Data Sources
Use the `get_statistics` and `list_experiments` MCP tools to gather all data.
## Optional Filters
Support these filters via arguments:
- `/ai-report tool:ChatGPT` - Show report for specific tool
- `/ai-report tag:code-generation` - Show report for specific tag
- `/ai-report days:30` - Show last 30 days only
- `/ai-report rating:5` - Show only 5-star experiments
## Error Handling
If no experiments exist:
```
╔══════════════════════════════════════════════════════════════╗
║ AI EXPERIMENT LOGGER - SUMMARY REPORT ║
╚══════════════════════════════════════════════════════════════╝
📊 NO EXPERIMENTS YET
Get started by logging your first AI experiment:
/log-exp
Or use the MCP tool directly:
Use the log_experiment tool
```
## Implementation Notes
- Use Unicode box drawing characters for clean terminal output
- Ensure all sections are properly aligned
- Use emoji for visual appeal but keep it professional
- Calculate percentages and averages with 2 decimal precision
- Sort all rankings by count/rating descending
- Format dates in user-friendly format (Oct 13, 2:30 PM)

131
commands/search.md Normal file
View File

@@ -0,0 +1,131 @@
---
description: Search AI experiments and display formatted results
shortcut: search-exp
---
# Search AI Experiments
When the user runs `/search-exp [query]`, search through all AI experiments and display formatted terminal results.
## Search Behavior
Search across these fields:
- AI tool name
- Prompt text
- Result text
- Tags
## Usage Examples
```bash
/search-exp code # Search for "code"
/search-exp tool:ChatGPT # Filter by tool
/search-exp tag:debugging # Filter by tag
/search-exp rating:5 # Filter by rating
/search-exp "python function" # Search phrase
```
## Output Format
```
╔══════════════════════════════════════════════════════════════╗
║ AI EXPERIMENTS - SEARCH RESULTS ║
╚══════════════════════════════════════════════════════════════╝
Found 12 experiments matching "code generation"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Oct 13, 2:30 PM | ChatGPT o1-preview | ⭐⭐⭐⭐⭐
📝 Prompt:
Write a Python function to calculate Fibonacci numbers recursively
💡 Result:
Provided clean recursive implementation with base cases. Included
time complexity analysis (O(2^n)).
🏷️ Tags: code-generation, python, algorithms
🆔 ID: exp_1697234567890_abc123def
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[2] Oct 12, 4:15 PM | Claude Sonnet 3.5 | ⭐⭐⭐⭐
📝 Prompt:
Generate TypeScript interfaces from JSON schema
💡 Result:
Created well-typed interfaces with proper nested types and
optional fields.
🏷️ Tags: code-generation, typescript, types
🆔 ID: exp_1697148912345_xyz789abc
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 QUICK STATS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total results: 12 experiments
Average rating: 4.42 ⭐
Most common tool: ChatGPT o1-preview (7 experiments)
Most common tag: code-generation (12 experiments)
```
## Advanced Filters
Support combined filters:
```bash
/search-exp tool:ChatGPT rating:5 tag:python
```
Parse and apply each filter:
- `tool:X` → Filter by AI tool
- `rating:X` → Filter by rating (1-5)
- `tag:X` → Filter by tag
- `date:YYYY-MM-DD` → Filter by specific date
- `from:YYYY-MM-DD` → From date
- `to:YYYY-MM-DD` → To date
## Empty Results
```
╔══════════════════════════════════════════════════════════════╗
║ AI EXPERIMENTS - SEARCH RESULTS ║
╚══════════════════════════════════════════════════════════════╝
🔍 No experiments found matching "xyz123"
Try:
• Broadening your search terms
• Checking spelling
• Using /ai-report to see all experiments
• Using different filter criteria
```
## Sorting Options
Support sorting with suffix:
```bash
/search-exp code :date # Sort by date (newest first)
/search-exp code :rating # Sort by rating (highest first)
/search-exp code :tool # Sort by tool name (alphabetical)
```
## Limit Results
Default to showing 10 results, with pagination hint:
```
Showing 10 of 45 results. Use filters to narrow down.
```
## Implementation
Use the `list_experiments` MCP tool with appropriate filters:
- `searchQuery` for text search
- `aiTool` for tool filter
- `rating` for rating filter
- `tags` for tag filter
- `dateFrom` / `dateTo` for date range
Format output to be readable in terminal with proper spacing and visual hierarchy.