performance-optimization
Enterprise performance optimization skill that identifies bottlenecks, analyzes caching strategies, performs load testing, and provides actionable optimization recommendations with detailed profiling metrics
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- performance-optimization
- tags
- [ "performance", "profiling", "optimization", "bottleneck-detection", "caching", "load-testing", "enterprise", "python", "monitoring", "scalability" ]
- author
- Sambit Sargam
- scripts
- { "enabled": true, "definitions": [ { "file": "profiler.py", "name": "profiler", "type": "python", "timeout": 60, "confidence": "92%", "description": "Profile function execution time, memory, and CPU usage", "requires_auth": false }, { "file": "bottleneck_detector.py", "name": "bottleneck_detector", "type": "python", "timeout": 45, "confidence": "90%", "description": "Detect performance bottlenecks and anti-patterns", "requires_auth": false }, { "file": "cache_advisor.py", "name": "cache_advisor", "type": "python", "timeout": 30, "confidence": "91%", "description": "Analyze caching opportunities and recommend strategies", "requires_auth": false }, { "file": "load_tester.py", "name": "load_tester", "type": "python", "timeout": 120, "confidence": "89%", "description": "Simulate load patterns and stress test endpoints", "requires_auth": false } ], "working_directory": "./scripts" }
- version
- 1.0.0
- triggers
- [ { "type": "keyword", "keywords": [ "performance", "optimization", "bottleneck", "profiling", "caching", "load test", "throughput", "latency", "scalability", "slow" ], "priority": 95 }, { "type": "pattern", "patterns": [ "(?i)(optimize|improve) .*performance", "(?i)(find|detect) .*bottleneck", "(?i)(profile|benchmark) .*code", "(?i)(load test|stress test)", "(?i)(cache|caching) .*strategy" ], "priority": 90 }, { "type": "intent", "priority": 98, "intent_category": "performance_optimization" } ]
- composable
- true
- parameters
- [ { "name": "code_input", "type": "string", "required": true, "description": "Python code or endpoint URL to analyze" }, { "name": "analysis_type", "type": "string", "default": "comprehensive", "required": false, "description": "Type of analysis (profiling, bottleneck, caching, load_test)" }, { "name": "workload_pattern", "type": "string", "default": "constant", "required": false, "description": "Load pattern (constant, ramp-up, spike, wave)" }, { "name": "concurrent_users", "type": "integer", "default": 100, "required": false, "description": "Number of concurrent users for load testing" }, { "name": "duration_seconds", "type": "integer", "default": 60, "required": false, "description": "Duration of load test in seconds" }, { "name": "cache_strategies", "type": "array", "required": false, "description": "Cache strategies to evaluate (LRU, LFU, TTL, FIFO, ARC)" } ]
- description
- Enterprise performance optimization skill that identifies bottlenecks, analyzes caching strategies, performs load testing, and provides actionable optimization recommendations with detailed profiling metrics
- cache_enabled
- true
- persist_state
- false
- prerequisites
- { "skills": [], "env_vars": [] }
02 资源文件 8
- 参考文档README.md11.9 KB
- 参考文档requirements.txt63 B
- 脚本scripts/bottleneck_detector.py10.8 KB
- 脚本scripts/cache_advisor.py14.8 KB
- 脚本scripts/load_tester.py13.1 KB
- 脚本scripts/profiler.py8.9 KB
- 参考文档SOURCE.md378 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
outputs:
- type: metrics format: json description: Performance metrics including timing, memory, CPU
- type: bottleneck_report format: json description: Detected bottlenecks with severity and recommendations
- type: cache_analysis format: json description: Cache strategy rankings and hit rate estimations
- type: load_test_report format: json description: Load test results with latency percentiles and error rates
- type: recommendations format: markdown description: Actionable optimization recommendations
examples:
- input: "Function profiling for data processing" output: "Time: 145ms, CPU: 32.5%, Memory: 12.4MB"
- input: "Detect bottlenecks in database queries" output: "N+1 query pattern found, missing index on user_id"
- input: "Analyze caching for user session data" output: "LRU cache recommended, 85% hit rate expected"
- input: "Load test with 100 concurrent users" output: "Throughput: 425 req/s, P99 latency: 892ms"
success_criteria:
- Identified performance bottlenecks with 90%+ accuracy
- Profiling overhead < 5% of execution time
- Cache strategy recommendations improve hit rate by 20%+
- Load test simulation realistic within 15% variance
integration_points:
- Code Refactoring Advisor (code quality metrics)
- Database Operations Manager (query optimization)
- Security Vulnerability Scanner (performance security)
- API Integration Helper (endpoint monitoring)
notes: | Performance Optimization provides enterprise-grade performance analysis and optimization capabilities:
- Profile Python functions at microsecond precision
- Detect 10+ performance anti-patterns
- Evaluate 5 major caching strategies
- Simulate realistic load patterns
- Generate actionable optimization recommendations
All 4 modules are production-ready with 90%+ confidence and integrate seamlessly with other enterprise skills.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.