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

View File

@@ -0,0 +1,8 @@
# Assets
Bundled resources for ai-experiment-logger skill
- [ ] dashboard_template.html: HTML template for the web dashboard, providing a starting point for customization.
- [ ] example_experiments.json: Example JSON file containing sample experiment data.
- [ ] visualization_styles.css: CSS file to style visualizations generated by the analysis scripts.
- [ ] experiment_report_template.docx: Word template for generating experiment reports.

View File

@@ -0,0 +1,32 @@
{
"skill": {
"name": "skill-name",
"version": "1.0.0",
"enabled": true,
"settings": {
"verbose": false,
"autoActivate": true,
"toolRestrictions": true
}
},
"triggers": {
"keywords": [
"example-trigger-1",
"example-trigger-2"
],
"patterns": []
},
"tools": {
"allowed": [
"Read",
"Grep",
"Bash"
],
"restricted": []
},
"metadata": {
"author": "Plugin Author",
"category": "general",
"tags": []
}
}

View File

@@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Experiment Logger Dashboard</title>
<style>
/* Basic Reset */
body, h1, h2, h3, p, ul, li {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
background-color: #f4f4f4;
color: #333;
line-height: 1.6;
}
.container {
max-width: 960px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
margin-bottom: 20px;
}
/* Experiment Summary Section */
.experiment-summary {
margin-bottom: 20px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
}
.experiment-summary h2 {
margin-bottom: 10px;
}
/* Experiment List Section */
.experiment-list {
list-style: none;
padding: 0;
}
.experiment-list li {
margin-bottom: 10px;
padding: 10px;
border: 1px solid #eee;
background-color: #f9f9f9;
border-radius: 5px;
}
.experiment-list li:hover {
background-color: #f0f0f0;
}
/* Responsive Design */
@media (max-width: 600px) {
.container {
padding: 10px;
}
h1 {
font-size: 24px;
}
}
/* Placeholder Styling */
.placeholder {
color: #999;
font-style: italic;
}
</style>
</head>
<body>
<div class="container">
<!-- Main Heading -->
<h1>AI Experiment Logger Dashboard</h1>
<!-- Experiment Summary Section -->
<section class="experiment-summary">
<h2>Experiment Summary</h2>
<p>Total Experiments: <span id="total-experiments">{{total_experiments}}</span></p>
<p>Successful Experiments: <span id="successful-experiments">{{successful_experiments}}</span></p>
<p>Average Success Rate: <span id="average-success-rate">{{average_success_rate}}</span>%</p>
</section>
<!-- Experiment List Section -->
<section>
<h2>Recent Experiments</h2>
<ul class="experiment-list">
<!-- Placeholder for dynamically generated list items -->
<li>
<strong>Experiment ID:</strong> <span class="placeholder">{{experiment_id_1}}</span><br>
<strong>Description:</strong> <span class="placeholder">{{experiment_description_1}}</span><br>
<strong>Status:</strong> <span class="placeholder">{{experiment_status_1}}</span>
</li>
<li>
<strong>Experiment ID:</strong> <span class="placeholder">{{experiment_id_2}}</span><br>
<strong>Description:</strong> <span class="placeholder">{{experiment_description_2}}</span><br>
<strong>Status:</strong> <span class="placeholder">{{experiment_status_2}}</span>
</li>
<li>
<strong>Experiment ID:</strong> <span class="placeholder">{{experiment_id_3}}</span><br>
<strong>Description:</strong> <span class="placeholder">{{experiment_description_3}}</span><br>
<strong>Status:</strong> <span class="placeholder">{{experiment_status_3}}</span>
</li>
<!-- Add more list items as needed -->
</ul>
</section>
</div>
</body>
</html>

View File

@@ -0,0 +1,110 @@
{
"_comment": "Example JSON file for AI Experiment Logger plugin. Represents a collection of experiments.",
"experiments": [
{
"_comment": "First experiment - a simple sentiment analysis task",
"experiment_id": "sentiment-analysis-v1",
"experiment_name": "Sentiment Analysis with Claude",
"description": "Experiment to evaluate Claude's sentiment analysis accuracy on customer reviews.",
"model": "Claude-v2",
"dataset": "Customer Reviews - Product A",
"date_created": "2024-01-15",
"date_completed": "2024-01-16",
"status": "completed",
"parameters": {
"temperature": 0.2,
"max_tokens": 200,
"prompt_template": "Analyze the sentiment of the following review: {review}"
},
"metrics": {
"accuracy": 0.92,
"precision": 0.90,
"recall": 0.94,
"f1_score": 0.92
},
"artifacts": {
"results_csv": "sentiment_analysis_results.csv",
"model_config": "claude_config.json"
},
"notes": "High accuracy achieved. Consider testing with more diverse datasets."
},
{
"_comment": "Second experiment - a more complex text summarization task",
"experiment_id": "text-summarization-v2",
"experiment_name": "Text Summarization Experiment with Gemini",
"description": "Experiment to compare different summarization techniques using Gemini.",
"model": "Gemini-Pro",
"dataset": "News Articles - Technology",
"date_created": "2024-01-20",
"date_completed": "2024-01-22",
"status": "completed",
"parameters": {
"temperature": 0.5,
"max_tokens": 500,
"summarization_type": "extractive",
"prompt_template": "Summarize the following article: {article}"
},
"metrics": {
"rouge_1": 0.45,
"rouge_2": 0.22,
"rouge_l": 0.38,
"bleu_score": 0.28
},
"artifacts": {
"summaries_json": "summaries.json",
"hyperparameter_search_log": "hyperparameter_search.log"
},
"notes": "Extractive summarization performed better than abstractive. Needs further tuning."
},
{
"_comment": "Third experiment - still in progress",
"experiment_id": "image-classification-v1",
"experiment_name": "Image Classification with a Custom Model",
"description": "Training and evaluating a custom image classification model.",
"model": "Custom CNN",
"dataset": "Custom Image Dataset - Flowers",
"date_created": "2024-01-25",
"date_completed": null,
"status": "running",
"parameters": {
"learning_rate": 0.001,
"batch_size": 32,
"epochs": 10
},
"metrics": {
"training_loss": 0.25,
"validation_accuracy": 0.85
},
"artifacts": {
"model_checkpoint": "model_checkpoint_epoch_5.pth",
"training_logs": "training.log"
},
"notes": "Training in progress. Validation accuracy is improving."
},
{
"_comment": "Fourth experiment - trying to compare the models",
"experiment_id": "model-comparison-v1",
"experiment_name": "Model Comparison for Question Answering",
"description": "Comparing Claude and Gemini for question answering accuracy",
"model": "Claude-v2, Gemini-Pro",
"dataset": "SQuAD",
"date_created": "2024-02-01",
"date_completed": "2024-02-03",
"status": "completed",
"parameters": {
"question_length": "short",
"context_length": "medium"
},
"metrics": {
"claude_exact_match": 0.75,
"claude_f1": 0.82,
"gemini_exact_match": 0.78,
"gemini_f1": 0.85
},
"artifacts": {
"results_table": "qa_results.csv"
},
"notes": "Gemini slightly outperforms Claude on F1 score. Further investigation needed with longer contexts."
}
]
}

View File

@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
<w:body>
<w:p>
<w:r>
<w:t>AI Experiment Report</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="true"/>
<w:sz w:val="36"/>
<w:szCs w:val="36"/>
</w:rPr>
<w:t>Experiment Title: [EXPERIMENT_TITLE]</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:rPr>
<w:i w:val="true"/>
</w:rPr>
<w:t>Generated on: [REPORT_GENERATION_DATE]</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>1. Introduction</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>This report summarizes the results of the AI experiment titled "[EXPERIMENT_TITLE]". The experiment aimed to [EXPERIMENT_OBJECTIVE].</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>2. Experiment Setup</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>2.1 AI Model:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[AI_MODEL_USED]</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>2.2 Input Data:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[INPUT_DATA_DESCRIPTION] (e.g., dataset name, size, preprocessing steps)</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>2.3 Parameters:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[PARAMETER_SETTINGS] (e.g., learning rate, batch size, number of epochs)</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>2.4 Evaluation Metrics:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[EVALUATION_METRICS] (e.g., accuracy, precision, recall, F1-score)</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>3. Results</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>3.1 Overall Performance:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[OVERALL_PERFORMANCE_SUMMARY] (e.g., The model achieved an accuracy of 92%.)</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>3.2 Detailed Results:</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[DETAILED_RESULTS_TABLE] (Insert a table or chart showing the results for each evaluation metric.)</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t> [INCLUDE_VISUALIZATIONS_HERE] (Optional: Insert charts or graphs visualizing the results. For example, a graph of accuracy vs. epoch.)</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>4. Analysis</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[ANALYSIS_OF_RESULTS] (Discuss the results, including strengths, weaknesses, and potential areas for improvement.)</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>5. Conclusion</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[CONCLUSION_SUMMARY] (Summarize the main findings of the experiment and their implications.)</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>6. Recommendations</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[RECOMMENDATIONS_FOR_FUTURE_EXPERIMENTS] (Suggest next steps or modifications for future experiments.)</w:t>
</w:r>
</w:p>
<w:p/>
<w:p>
<w:r>
<w:t>7. Appendix (Optional)</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>[APPENDIX_CONTENT] (Include any additional information, such as code snippets, raw data, or detailed logs.)</w:t>
</w:r>
</w:p>
<w:sectPr>
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="708" w:footer="708" w:gutter="0"/>
<w:cols w:space="708"/>
</w:sectPr>
</w:body>
</w:document>

View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Skill Configuration",
"type": "object",
"required": ["name", "description"],
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z0-9-]+$",
"maxLength": 64,
"description": "Skill identifier (lowercase, hyphens only)"
},
"description": {
"type": "string",
"maxLength": 1024,
"description": "What the skill does and when to use it"
},
"allowed-tools": {
"type": "string",
"description": "Comma-separated list of allowed tools"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"description": "Semantic version (x.y.z)"
}
}
}

View File

@@ -0,0 +1,27 @@
{
"testCases": [
{
"name": "Basic activation test",
"input": "trigger phrase example",
"expected": {
"activated": true,
"toolsUsed": ["Read", "Grep"],
"success": true
}
},
{
"name": "Complex workflow test",
"input": "multi-step trigger example",
"expected": {
"activated": true,
"steps": 3,
"toolsUsed": ["Read", "Write", "Bash"],
"success": true
}
}
],
"fixtures": {
"sampleInput": "example data",
"expectedOutput": "processed result"
}
}

View File

@@ -0,0 +1,100 @@
/*
visualization_styles.css - Stylesheet for AI Experiment Logger visualizations.
This file provides CSS rules to style visualizations generated by the
analysis scripts within the AI Experiment Logger plugin.
Customize these styles to match your desired aesthetic and ensure
clarity and readability of your visualizations.
Remember to link this stylesheet to your HTML files where visualizations
are displayed. Example:
<link rel="stylesheet" href="visualization_styles.css">
*/
/* General Styles */
body {
font-family: sans-serif; /* Placeholder: Choose your preferred font */
margin: 0;
padding: 0;
}
.visualization-container {
/* Styles for the container holding the entire visualization */
width: 100%; /* Adjust as needed */
margin: 10px auto; /* Center horizontally */
padding: 15px;
border: 1px solid #ddd; /* Light gray border */
background-color: #f9f9f9; /* Light background */
box-sizing: border-box; /* Include padding and border in element's total width and height */
}
h2 {
/* Styles for visualization titles */
font-size: 1.5em;
margin-bottom: 10px;
color: #333; /* Dark gray title color */
}
/* Styles for tables */
table {
width: 100%;
border-collapse: collapse; /* Remove spacing between table cells */
margin-bottom: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2; /* Light gray background for header cells */
font-weight: bold;
}
/* Styles for charts (modify based on your charting library) */
.chart-container {
/* Placeholder: Styles for containing chart elements */
width: 100%;
height: 300px; /* Adjust height as needed */
margin-bottom: 20px;
}
/* Placeholder: Add styles for specific chart elements
Example (using a hypothetical chart library):
.chart-bar {
background-color: steelblue;
color: white;
}
*/
/* Styles for labels */
.label {
font-size: 0.8em;
color: #777;
margin-top: 5px;
display: block; /* Ensure label is on its own line */
}
/* Styles for error messages */
.error-message {
color: red;
font-weight: bold;
margin-top: 10px;
}
/* Add more styles as needed for different visualization types and elements */
/* Example: Styles for a specific type of chart */
.experiment-comparison-chart {
/* Add specific styling for experiment comparison charts here */
/* Example: adjust colors, fonts, etc. */
}
/* Example: Styles for a specific element within a chart */
.experiment-comparison-chart .axis-label {
font-size: 0.9em;
color: #555;
}

View File

@@ -0,0 +1,8 @@
# References
Bundled resources for ai-experiment-logger skill
- [ ] experiment_schema.md: Detailed documentation of the experiment data schema, including field descriptions, data types, and validation rules.
- [ ] statistics_definitions.md: Definitions and explanations of the statistical metrics used in the analysis reports.
- [ ] best_practices.md: Best practices for designing and conducting AI experiments, including prompt engineering tips and tool selection guidelines.
- [ ] api_documentation.md: Documentation for interacting with the experiment logger's data programmatically.

View File

@@ -0,0 +1,69 @@
# Skill Best Practices
Guidelines for optimal skill usage and development.
## For Users
### Activation Best Practices
1. **Use Clear Trigger Phrases**
- Match phrases from skill description
- Be specific about intent
- Provide necessary context
2. **Provide Sufficient Context**
- Include relevant file paths
- Specify scope of analysis
- Mention any constraints
3. **Understand Tool Permissions**
- Check allowed-tools in frontmatter
- Know what the skill can/cannot do
- Request appropriate actions
### Workflow Optimization
- Start with simple requests
- Build up to complex workflows
- Verify each step before proceeding
- Use skill consistently for related tasks
## For Developers
### Skill Development Guidelines
1. **Clear Descriptions**
- Include explicit trigger phrases
- Document all capabilities
- Specify limitations
2. **Proper Tool Permissions**
- Use minimal necessary tools
- Document security implications
- Test with restricted tools
3. **Comprehensive Documentation**
- Provide usage examples
- Document common pitfalls
- Include troubleshooting guide
### Maintenance
- Keep version updated
- Test after tool updates
- Monitor user feedback
- Iterate on descriptions
## Performance Tips
- Scope skills to specific domains
- Avoid overlapping trigger phrases
- Keep descriptions under 1024 chars
- Test activation reliability
## Security Considerations
- Never include secrets in skill files
- Validate all inputs
- Use read-only tools when possible
- Document security requirements

View File

@@ -0,0 +1,70 @@
# Skill Usage Examples
This document provides practical examples of how to use this skill effectively.
## Basic Usage
### Example 1: Simple Activation
**User Request:**
```
[Describe trigger phrase here]
```
**Skill Response:**
1. Analyzes the request
2. Performs the required action
3. Returns results
### Example 2: Complex Workflow
**User Request:**
```
[Describe complex scenario]
```
**Workflow:**
1. Step 1: Initial analysis
2. Step 2: Data processing
3. Step 3: Result generation
4. Step 4: Validation
## Advanced Patterns
### Pattern 1: Chaining Operations
Combine this skill with other tools:
```
Step 1: Use this skill for [purpose]
Step 2: Chain with [other tool]
Step 3: Finalize with [action]
```
### Pattern 2: Error Handling
If issues occur:
- Check trigger phrase matches
- Verify context is available
- Review allowed-tools permissions
## Tips & Best Practices
- ✅ Be specific with trigger phrases
- ✅ Provide necessary context
- ✅ Check tool permissions match needs
- ❌ Avoid vague requests
- ❌ Don't mix unrelated tasks
## Common Issues
**Issue:** Skill doesn't activate
**Solution:** Use exact trigger phrases from description
**Issue:** Unexpected results
**Solution:** Check input format and context
## See Also
- Main SKILL.md for full documentation
- scripts/ for automation helpers
- assets/ for configuration examples

View File

@@ -0,0 +1,8 @@
# Scripts
Bundled resources for ai-experiment-logger skill
- [ ] analyze_experiments.py: Script to perform in-depth statistical analysis of logged experiments, generating reports on tool performance, prompt effectiveness, and other key metrics.
- [ ] export_to_db.py: Script to export experiment data to a database (e.g., PostgreSQL) for more robust storage and querying.
- [ ] import_from_csv.py: Script to import experiment data from a CSV file, allowing users to migrate existing data into the logger.
- [ ] validate_experiment.py: Script to validate experiment data before logging, ensuring data integrity and consistency.

View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Helper script template for skill automation
# Customize this for your skill's specific needs
set -e
function show_usage() {
echo "Usage: $0 [options]"
echo ""
echo "Options:"
echo " -h, --help Show this help message"
echo " -v, --verbose Enable verbose output"
echo ""
}
# Parse arguments
VERBOSE=false
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
show_usage
exit 0
;;
-v|--verbose)
VERBOSE=true
shift
;;
*)
echo "Unknown option: $1"
show_usage
exit 1
;;
esac
done
# Your skill logic here
if [ "$VERBOSE" = true ]; then
echo "Running skill automation..."
fi
echo "✅ Complete"

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Skill validation helper
# Validates skill activation and functionality
set -e
echo "🔍 Validating skill..."
# Check if SKILL.md exists
if [ ! -f "../SKILL.md" ]; then
echo "❌ Error: SKILL.md not found"
exit 1
fi
# Validate frontmatter
if ! grep -q "^---$" "../SKILL.md"; then
echo "❌ Error: No frontmatter found"
exit 1
fi
# Check required fields
if ! grep -q "^name:" "../SKILL.md"; then
echo "❌ Error: Missing 'name' field"
exit 1
fi
if ! grep -q "^description:" "../SKILL.md"; then
echo "❌ Error: Missing 'description' field"
exit 1
fi
echo "✅ Skill validation passed"