| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Claude Code skill that optimizes Python code generation by selecting the most efficient data structures and number handling strategies based on real-world performance and memory characteristics.
This skill teaches Claude Code to write more efficient Python code by understanding:
This skill implements best practices from the article "Python Numbers Every Programmer Should Know" by Michael Kennedy.
To use this skill with Claude Code:
Copy python-number-optimization.skill to your Claude Code skills directory:
Or reference it in your project-specific .claude/skills/ directory
Once installed, Claude Code will automatically apply these optimizations when:
You can also explicitly invoke it:
Use the python-optimization skill to write a function that checks if user IDs are valid
See examples/ directory for before/after code samples demonstrating:
| Operation | Best Container | Complexity |
|---|---|---|
| Membership test (x in y) | Set/Dict | O(1) |
| Ordered iteration | List | O(n) |
| Key-value lookup | Dict | O(1) |
| Memory-efficient storage | List | 36KB/1000 ints |
| Unique values | Set | O(n) dedup |
To improve this skill:
MIT
| Back | FazBrowse Home | New Git URL |