code-style
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.
More from significant-gravitas/autogpt
pr-review
Review a PR for correctness, security, code quality, and testing issues. TRIGGER when user asks to review a PR, check PR quality, or give feedback on a PR.
42vercel-react-best-practices
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.
29worktree
Set up a new git worktree for parallel development. Creates the worktree, copies .env files, installs dependencies, and generates Prisma client. TRIGGER when user asks to set up a worktree, work on a branch in isolation, or needs a separate environment for a branch or PR.
20pr-address
Address PR review comments and loop until CI green and all comments resolved. TRIGGER when user asks to address comments, fix PR feedback, respond to reviewers, or babysit/monitor a PR.
20backend-check
Run the full backend formatting, linting, and test suite. Ensures code quality before commits and PRs. TRIGGER when backend Python code has been modified and needs validation.
17pr-test
E2E manual testing of PRs/branches using docker compose, agent-browser, and API calls. TRIGGER when user asks to manually test a PR, test a feature end-to-end, or run integration tests against a running system.
15