Agent skill
data-analysis-caching-for-performance
Sub-skill of data-analysis: Caching for Performance (+2).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/analysis/data-analysis/caching-for-performance
SKILL.md
Caching for Performance (+2)
Caching for Performance
import streamlit as st
from functools import lru_cache
@st.cache_data(ttl=3600) # Streamlit caching
def load_and_process_data():
return pl.read_parquet("data.parquet")
@lru_cache(maxsize=100) # General Python caching
def expensive_calculation(params_tuple):
return compute_metrics(params_tuple)
Consistent Styling
# Define color palette
COLORS = {
"primary": "#1f77b4",
"secondary": "#ff7f0e",
"success": "#2ca02c",
"danger": "#d62728",
"neutral": "#7f7f7f"
}
*See sub-skills for full details.*
## Error Handling for Data Loading
```python
def safe_load_data(path, fallback=None):
"""Load data with comprehensive error handling."""
try:
if path.endswith('.parquet'):
return pl.read_parquet(path)
elif path.endswith('.csv'):
return pl.read_csv(path)
else:
raise ValueError(f"Unsupported format: {path}")
*See sub-skills for full details.*
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?