Documentation Index
Fetch the complete documentation index at: https://mintlify.com/antinomyhq/forge/llms.txt
Use this file to discover all available pages before exploring further.
Best Practices
This guide covers best practices for working effectively with Forge to maximize productivity and code quality.Communication Best Practices
Be Specific and Clear
The more specific your requests, the better Forge can assist: Good:Provide Context
Share relevant information about what you’re trying to accomplish:Iterate and Refine
Don’t hesitate to ask follow-up questions:Development Workflow Best Practices
Start with Understanding
Before making changes, understand the codebase:Plan Before Implementing
For complex features, get a plan first:Test as You Go
Don’t wait until the end to test:- Write unit tests
- Suggest test cases
- Help identify edge cases
- Review the implementation for potential issues
Commit Frequently
Make small, focused commits with clear messages:- Review changed files
- Generate an appropriate commit message
- Follow your repository’s commit message style
- Create the commit
Code Quality Best Practices
Follow Project Conventions
Configure Forge to follow your team’s standards:Request Code Reviews
Use Forge for pre-commit reviews:Write Self-Documenting Code
Ask Forge to help improve code clarity:- Add descriptive variable names
- Break complex logic into smaller functions
- Add explanatory comments where needed
- Simplify control flow
Handle Errors Properly
Always include comprehensive error handling:- All error cases are handled
- Users see helpful error messages
- Errors are logged appropriately
- The application fails gracefully
Security Best Practices
Never Commit Secrets
Forge will warn you about committing sensitive files:.env or credentials.json, it will warn you before committing.
Review Security Implications
Ask Forge to review security aspects:- Input validation issues
- SQL injection vulnerabilities
- XSS vulnerabilities
- Authentication/authorization flaws
- Insecure cryptographic practices
Use Restricted Mode for Sensitive Work
When working with sensitive codebases:Performance Best Practices
Request Performance Reviews
- Algorithm complexity
- Memory usage patterns
- Database query efficiency
- Unnecessary operations
- Caching opportunities
Optimize Thoughtfully
Don’t optimize prematurely:- Identify actual bottlenecks
- Measure performance impact
- Suggest targeted optimizations
- Avoid premature optimization
Configuration Best Practices
Customize for Your Workflow
Take advantage offorge.yaml configuration:
Use Custom Commands
Create shortcuts for repetitive tasks:/refactor in Forge sessions.
Learning and Exploration Best Practices
Learn New Technologies
Use Forge as a learning tool:Understand Before Copying
When Forge suggests code:Explore Multiple Approaches
Collaboration Best Practices
Document Decisions
When working on team projects:Create Clear Pull Requests
When ready to merge:- Analyze all changes in your branch
- Generate a comprehensive PR description
- Highlight key changes
- Push to remote and create the PR
Review Others’ Code
Use Forge to understand code from teammates:Git Workflow Best Practices
Understanding Git State
Forge helps manage git operations:- Uncommitted changes
- Current branch
- Relationship to remote
- Recent commits
Resolving Conflicts
When merge conflicts occur:- Explains the conflicting changes
- Suggests resolution strategies
- Helps implement the resolution
- Verifies the result works
Branch Management
Troubleshooting Best Practices
Provide Error Details
When debugging, share complete information:- Complete error message
- File path and line number
- What you were doing when it occurred
- Any relevant context
Systematic Debugging
Let Forge guide systematic investigation:MCP Integration Best Practices
Model Context Protocol (MCP) extends Forge’s capabilities:Configure MCP Servers
Use Case Examples
- Web browser automation for testing
- External API integrations
- Custom tool connections
- Database management tools
Common Pitfalls to Avoid
Don’t: Accept Without Understanding
Always understand what changes are being made and why.Don’t: Skip Testing
Test changes before committing, even if Forge wrote them.Don’t: Ignore Warnings
If Forge warns about security issues or potential problems, investigate.Don’t: Over-Rely on AI
Use Forge as a powerful assistant, but maintain your critical thinking and code review skills.Quick Reference: Command Patterns
| Goal | Example Prompt |
|---|---|
| Understand code | Explain how the authentication system works |
| Implement feature | Add dark mode toggle to the application |
| Debug issue | Fix this TypeError in Dashboard.tsx:45 |
| Review code | Review my uncommitted changes |
| Write tests | Write tests for the UserService |
| Refactor | Refactor this function for better readability |
| Learn | Explain the benefits of using GraphQL vs REST |
| Git operations | Create a PR for my feature branch |
| Optimize | Find performance bottlenecks in this module |
Continuous Improvement
Learn from Interactions
Pay attention to patterns in Forge’s suggestions:- Common mistakes in your code
- Better patterns to use
- Security considerations
- Performance optimizations
Customize Over Time
Update yourforge.yaml as you discover preferences:
- Add custom rules
- Create command shortcuts
- Adjust model temperature
- Configure file depth limits
Share Knowledge
When Forge helps you solve a problem:- Document the solution for teammates
- Add patterns to team guidelines
- Update project documentation
Next Steps
- Review specific workflow guides:
- Explore advanced configuration options
- Join the Discord community