Composer
A multi-file AI agent that plans, creates, and edits files across your entire project.
What's possible
- Build entire features across multiple files
- Refactor code that spans models, routes, tests, and configs
- Create new files (components, tests, migrations) from a description
- Agent mode reads your codebase, runs terminal commands, and iterates
- Fix a bug by describing the symptoms \u2014 Agent finds and patches the cause
- Apply a change pattern across many files at once
Getting started
- 1
Open Composer
Press
Cmd+Ito open Composer. It opens as a panel where you describe the change you want across your project. - 2
Describe the change
Explain what you want to build, fix, or refactor. Be specific about the scope — which features, files, or behaviors to change.
- 3
Choose Normal or Agent mode
Normal mode makes edits based on your prompt. Agent mode plans the work, reads relevant files, runs commands, and iterates autonomously.
- 4
Review the plan and diffs
Composer shows which files it will create or modify, with diffs for each. Review each change before accepting.
- 5
Accept or iterate
Accept all changes, reject specific files, or add follow-up instructions to refine the result.
Example prompts
New feature
“Add a user settings page with form fields for name, email, and notification preferences. Create the route, component, and API endpoint.”
Refactoring
“Migrate all API routes from the pages/ directory to the app/ directory. Update imports and middleware.”
Bug fix (Agent)
“The checkout flow fails when the cart has more than 10 items. Find the bug and fix it. Run the tests to confirm.”
Batch changes
“Add loading and error states to all data-fetching components that are currently missing them.”
Tips
- Use @-mentions to point Composer at specific files or folders for better context.
- Start with Normal mode for straightforward edits. Switch to Agent mode when the task requires exploration or running commands.
- Review each file's diff individually. Accept the good parts and provide follow-up instructions for the rest.
- For very large changes, break the work into smaller Composer sessions. One feature at a time gives better results.