code-style

- Top-level only — no local/inner imports. Move all imports to the top of the file.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-style" with this command: npx skills add significant-gravitas/autogpt/significant-gravitas-autogpt-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 , isinstance for 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: ignore etc. 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/else chains 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?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

vercel-react-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

worktree-setup

No summary provided by upstream source.

Repository SourceNeeds Review
General

backend-check

No summary provided by upstream source.

Repository SourceNeeds Review
General

new-block

No summary provided by upstream source.

Repository SourceNeeds Review