code-style
SKILL.md
Code Style
Imports
- Top-level only — no local/inner imports. Move all imports to the top of the file.
Typing
- No duck typing — avoid
hasattr,getattr,isinstancefor type dispatch. Use proper typed interfaces, unions, or protocols. - Pydantic models over dataclass, namedtuple, or raw dict for structured data.
- No linter suppressors — avoid
# type: ignore,# noqa,# pyright: ignoreetc. 99% of the time the right fix is fixing the type/code, not silencing the tool.
Code Structure
- List comprehensions over manual loop-and-append.
- Early return — guard clauses first, avoid deep nesting.
- Flatten inline — prefer short, concise expressions. Reduce
if/elsechains with direct returns or ternaries when readable. - Modular functions — break complex logic into small, focused functions rather than long blocks with nested conditionals.
Review Checklist
Before finishing, always ask:
- Can any function be split into smaller pieces?
- Is there unnecessary nesting that an early return would eliminate?
- Can any loop be a comprehension?
- Is there a simpler way to express this logic?
Weekly Installs
4
Repository
significant-gra…/autogptGitHub Stars
182.5K
First Seen
1 day ago
Security Audits
Installed on
amp4
cline4
opencode4
cursor4
kimi-cli4
codex4