From e10ddbbaa8033de84963ea2e7f9b00d883108644 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:21:26 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 15 +++++ README.md | 3 + commands/track-response-times.md | 41 +++++++++++++ plugin.lock.json | 61 +++++++++++++++++++ skills/response-time-tracker/SKILL.md | 52 ++++++++++++++++ skills/response-time-tracker/assets/README.md | 7 +++ .../references/README.md | 8 +++ .../response-time-tracker/scripts/README.md | 7 +++ 8 files changed, 194 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/track-response-times.md create mode 100644 plugin.lock.json create mode 100644 skills/response-time-tracker/SKILL.md create mode 100644 skills/response-time-tracker/assets/README.md create mode 100644 skills/response-time-tracker/references/README.md create mode 100644 skills/response-time-tracker/scripts/README.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..d70a8e5 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "response-time-tracker", + "description": "Track and optimize application response times", + "version": "1.0.0", + "author": { + "name": "Claude Code Plugins", + "email": "[email protected]" + }, + "skills": [ + "./skills" + ], + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..809fd01 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# response-time-tracker + +Track and optimize application response times diff --git a/commands/track-response-times.md b/commands/track-response-times.md new file mode 100644 index 0000000..fdb192f --- /dev/null +++ b/commands/track-response-times.md @@ -0,0 +1,41 @@ +--- +description: Track and optimize response times +--- + +# Response Time Tracker + +Implement comprehensive response time tracking and optimization. + +## Tracking Areas + +1. **API Endpoints**: HTTP request/response times +2. **Database Queries**: Query execution times +3. **External Services**: Third-party API latency +4. **Frontend Rendering**: Page load and render times +5. **Background Jobs**: Async task execution times + +## Metrics to Track + +- **P50, P95, P99 Percentiles**: Response time distribution +- **Average Response Time**: Mean latency +- **Max Response Time**: Worst-case scenarios +- **Time Series Data**: Response time trends + +## Process + +1. Identify all application endpoints and operations +2. Design response time instrumentation strategy +3. Implement timing middleware/decorators +4. Create monitoring dashboards +5. Define SLO thresholds +6. Generate optimization recommendations + +## Output + +Provide: +- Response time instrumentation code +- Monitoring configuration +- Dashboard setup (Prometheus, Grafana, etc.) +- SLO definitions with percentile targets +- Alert rules for degraded performance +- Optimization strategies for slow endpoints diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..ecc3462 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/response-time-tracker", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "7f742e4c38cb488378132610eabd6f60882333c7", + "treeHash": "b12f0ef445194b7a9ba39a09849ac81ce75bb8e42ea7d465ce9f90e66f9220fe", + "generatedAt": "2025-11-28T10:18:42.288060Z", + "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": "response-time-tracker", + "description": "Track and optimize application response times", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "f9255e48aa59988420a60739cb1492e175bd8eb6f80601a6a7606e07f8a102a9" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "958e70c143ceb0f0f93e1f645214cc24a7b6b1bf34746695e4c8f3fe0f500871" + }, + { + "path": "commands/track-response-times.md", + "sha256": "3d8e33684d445d88af6f9e939ae03a464f09c87031d3b618fc36fe8976536553" + }, + { + "path": "skills/response-time-tracker/SKILL.md", + "sha256": "e80327064658cad6673b63f9ce9f662fe8f618fc898f6817bf0a02f1a66e074a" + }, + { + "path": "skills/response-time-tracker/references/README.md", + "sha256": "66314a3bfff2aba1dd71d3922042cecb5873c321a4d546606315e6875d52689a" + }, + { + "path": "skills/response-time-tracker/scripts/README.md", + "sha256": "72641f0d581f5d0f3d2100a933365f3ca898b48f6400894307566919c32911a7" + }, + { + "path": "skills/response-time-tracker/assets/README.md", + "sha256": "e961d89e4aa79f0a7302dde9f60e14658b0f3f151a116c388b5749a178df3906" + } + ], + "dirSha256": "b12f0ef445194b7a9ba39a09849ac81ce75bb8e42ea7d465ce9f90e66f9220fe" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/response-time-tracker/SKILL.md b/skills/response-time-tracker/SKILL.md new file mode 100644 index 0000000..0a38747 --- /dev/null +++ b/skills/response-time-tracker/SKILL.md @@ -0,0 +1,52 @@ +--- +name: tracking-application-response-times +description: | + This skill enables Claude to track and optimize application response times. It uses the response-time-tracker plugin to monitor API endpoints, database queries, external service calls, frontend rendering, and background job execution. The plugin calculates P50, P95, and P99 percentiles, average and maximum response times. Use this skill when you need to identify performance bottlenecks, monitor SLOs, or receive alerts about performance degradation. Trigger this skill with phrases like "track response times", "optimize latency", or "monitor application performance". +allowed-tools: Read, Write, Edit, Grep, Glob, Bash +version: 1.0.0 +--- + +## Overview + +This skill empowers Claude to proactively monitor and improve application performance by tracking response times across various layers. It provides detailed metrics and insights to identify and resolve performance bottlenecks. + +## How It Works + +1. **Initiate Tracking**: The user requests response time tracking. +2. **Configure Monitoring**: The plugin automatically begins monitoring API endpoints, database queries, external service calls, frontend rendering, and background jobs. +3. **Report Metrics**: The plugin generates reports including P50, P95, P99 percentiles, average, and maximum response times. + +## When to Use This Skill + +This skill activates when you need to: +- Identify performance bottlenecks in your application. +- Monitor service level objectives (SLOs) related to response times. +- Receive alerts about performance degradation. + +## Examples + +### Example 1: Diagnosing Slow API Endpoint + +User request: "Track response times for the user authentication API endpoint." + +The skill will: +1. Activate the response-time-tracker plugin. +2. Monitor the specified API endpoint and report response time metrics, highlighting potential bottlenecks. + +### Example 2: Monitoring Database Query Performance + +User request: "Monitor database query performance for the product catalog." + +The skill will: +1. Activate the response-time-tracker plugin. +2. Track the execution time of database queries related to the product catalog and provide performance insights. + +## Best Practices + +- **Granularity**: Track response times at a granular level (e.g., individual API endpoints, specific database queries) for more precise insights. +- **Alerting**: Configure alerts for significant deviations from baseline performance to proactively address potential issues. +- **Contextualization**: Correlate response time data with other metrics (e.g., CPU usage, memory consumption) to identify root causes. + +## Integration + +This skill can be integrated with other monitoring and alerting tools to provide a comprehensive view of application performance. It can also be used in conjunction with optimization tools to automatically address identified bottlenecks. \ No newline at end of file diff --git a/skills/response-time-tracker/assets/README.md b/skills/response-time-tracker/assets/README.md new file mode 100644 index 0000000..d358c7c --- /dev/null +++ b/skills/response-time-tracker/assets/README.md @@ -0,0 +1,7 @@ +# Assets + +Bundled resources for response-time-tracker skill + +- [ ] dashboard_template.json: A template for creating a dashboard to visualize response time metrics. +- [ ] alert_template.json: A template for configuring alerts based on response time thresholds. +- [ ] example_report.md: An example report generated by the analyze_response_times.py script. diff --git a/skills/response-time-tracker/references/README.md b/skills/response-time-tracker/references/README.md new file mode 100644 index 0000000..6ab11ef --- /dev/null +++ b/skills/response-time-tracker/references/README.md @@ -0,0 +1,8 @@ +# References + +Bundled resources for response-time-tracker skill + +- [ ] api_endpoints.md: Documentation of the API endpoints being monitored. +- [ ] database_schema.md: Schema of the database tables used by the application. +- [ ] slo_definitions.md: Definitions of the Service Level Objectives (SLOs) for response times. +- [ ] optimization_techniques.md: A guide to common optimization techniques for improving response times. diff --git a/skills/response-time-tracker/scripts/README.md b/skills/response-time-tracker/scripts/README.md new file mode 100644 index 0000000..b0fa09d --- /dev/null +++ b/skills/response-time-tracker/scripts/README.md @@ -0,0 +1,7 @@ +# Scripts + +Bundled resources for response-time-tracker skill + +- [ ] analyze_response_times.py: Script to analyze collected response time data and generate reports. +- [ ] configure_alerts.py: Script to configure alerts based on response time thresholds. +- [ ] optimize_queries.py: Script to identify and suggest optimizations for slow database queries.