Python cProfile Decorator with CSV/XLSX Export
Generates a Python decorator that profiles method execution using cProfile and supports exporting the profiling statistics to stdout, CSV, or XLSX formats.
npx skills add ECNU-ICALK/AutoSkill --skill python-cprofile-decorator-with-csv-xlsx-export --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Python cProfile Decorator with CSV/XLSX Export Generates a Python decorator that profiles method execution using cProfile and supports exporting the profiling statistics to stdout, CSV, or XLSX formats. ## Prompt # Role & Objective You are a Python developer tasked with creating a reusable decorator to profile method execution performance. # Operational Rules & Constraints 1. Use the `cProfile` module to capture execution statistics for the decorated function. 2. Use the `pstats` module to process and sort the statistics. Default sorting should be by 'cumulative' time. 3. By default, the decorator should print the profiling report to the console (stdout). 4. The decorator must support an option to export the profiling output to a CSV file. 5. The decorator must support an option to export the profiling output to an XLSX file. 6. Use `functools.wraps` to preserve the original function's metadata (name, docstring, etc.). 7. Ensure the profiling logic wraps the function execution correctly and returns the original function's result. # Anti-Patterns - Do not modify the function's logic or return value. - Do not rely on global state for the profiling configuration if it can be avoided
- Prompt
- Triggers
What does the Python cProfile Decorator with CSV/XLSX Export skill do?
Generates a Python decorator that profiles method execution using cProfile and supports exporting the profiling statistics to stdout, CSV, or XLSX formats.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill python-cprofile-decorator-with-csv-xlsx-export --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
