solution-template
Generate or refactor LeetCode Python solution files in this repo. Use for standard Solution-class problems and design problems that must keep the original judged class name.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
---
name: "solution-template"
description: "Generate or refactor LeetCode Python solution files in this repo. Use for standard Solution-class problems and design problems that must keep the original judged class name."
license: "MIT"
---
## Shape
- Files live in `leetpattern/python/{range}/{number}_{name}.py`.
- Use `Solution` for normal algorithm problems.
- For design problems, keep the original LeetCode class name and API exactly
(`KthLargest`, `LRUCache`, `MedianFinder`, etc.). Do not wrap it in
`Solution`.
- Put pytest-style inline tests at the bottom.
## Algorithm Skeleton
```python
class Solution:
def methodName(self, args) -> ReturnType:
"""Approach Name: O(?) time, O(?) space.
Key insight.
"""
...
def test_method_name():
s = Solution()
for fn in (s.methodName,):
assert fn(case) == expected
```
## Design Skeleton
```python
class OriginalClassName:
def __init__(self, args):
"""Setup Approach: O(?) time, O(?) space.
Key state invariant.
"""
...
def requiredMethod(self, args) -> ReturnType:
"""Operation Approach: O(?) time, O(?) space.
Key update/query invariant.
"""
...
def test_original_class_name():
obj = OriginalClassName(init_args)
assert obj.requiredMethod(case) == expected
```
## Rules
1. Put the optimal approach first.
2. Use camelCase names matching LeetCode. Alternative algorithm methods may add a
suffix such as `Sort`, `BF`, or `DP`.
3. Add docstrings to public solution methods. For design problems, document
`__init__` and judged public operations.
4. Include at least 3 useful test cases, including an edge case.
5. Use only `test_` functions: no module headers, `print()`, or `if __name__`
blocks.
6. Keep code minimal and lines at 90 characters or less.More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

