new-block
New Block Creation
Read docs/platform/block-sdk-guide.md first for the full guide.
Steps
- Provider config (if external service): create
_config.pywithProviderBuilder - Block file in
backend/blocks/(fromautogpt_platform/backend/):- Generate a UUID once with
uuid.uuid4(), then hard-code that string asid(IDs must be stable across imports) Input(BlockSchema)andOutput(BlockSchema)classesasync def runthatyields output fields
- Generate a UUID once with
- Files: use
store_media_file()with"for_block_output"for outputs - Test:
poetry run pytest 'backend/blocks/test/test_block.py::test_available_blocks[MyBlock]' -xvs - Format:
poetry run format
Rules
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