|
1 | 1 | --- |
2 | 2 | title: 'Where Codebuff Shines' |
3 | 3 | section: 'tips' |
4 | | -tags: ['refactoring', 'patterns'] |
| 4 | +tags: ['refactoring', 'patterns', 'use cases', 'commands'] |
5 | 5 | order: 2 |
6 | 6 | --- |
7 | 7 |
|
@@ -54,3 +54,110 @@ Codebuff reads `knowledge.md` files to keep your context handy: |
54 | 54 | - Best practices for different parts of the codebase |
55 | 55 |
|
56 | 56 | Update them anytime; Codebuff loads them on start. |
| 57 | + |
| 58 | +# Example commands |
| 59 | + |
| 60 | +Here are some commands you can try beyond basic coding: |
| 61 | + |
| 62 | +## Code Review |
| 63 | + |
| 64 | +Ask for feedback: |
| 65 | + |
| 66 | +```bash |
| 67 | +# Review current changes |
| 68 | +codebuff "Please review my current changes" |
| 69 | + |
| 70 | +# Review branch |
| 71 | +codebuff "Review the differences between this branch and main" |
| 72 | + |
| 73 | +# Review specific files |
| 74 | +codebuff "Review the changes in src/components/auth/*" |
| 75 | +``` |
| 76 | + |
| 77 | +## Git Workflow Commands |
| 78 | + |
| 79 | +Git helpers: |
| 80 | + |
| 81 | +```bash |
| 82 | +# Create commit message |
| 83 | +codebuff "Generate a commit message for these changes" |
| 84 | + |
| 85 | +# Clean up commits |
| 86 | +codebuff "Help me squash the last 3 commits into one" |
| 87 | +``` |
| 88 | + |
| 89 | +## Codebase Questions |
| 90 | + |
| 91 | +Understand the repo: |
| 92 | + |
| 93 | +```bash |
| 94 | +# Architecture questions |
| 95 | +codebuff "Explain how our authentication system works" |
| 96 | + |
| 97 | +# Find examples |
| 98 | +codebuff "Show me examples of error handling in our codebase" |
| 99 | +``` |
| 100 | + |
| 101 | +## Script Generation |
| 102 | + |
| 103 | +Generate scripts: |
| 104 | + |
| 105 | +```bash |
| 106 | +# Data processing |
| 107 | +codebuff "Write a script to calculate our churn this month" |
| 108 | + |
| 109 | +# Build automation |
| 110 | +codebuff "Create a script to automate our release process" |
| 111 | +``` |
| 112 | + |
| 113 | +## Documentation Commands |
| 114 | + |
| 115 | +Generate docs: |
| 116 | + |
| 117 | +```bash |
| 118 | +# API docs |
| 119 | +codebuff "Document this new API endpoint" |
| 120 | + |
| 121 | +# Component docs |
| 122 | +codebuff "Add JSDoc comments to this React component" |
| 123 | + |
| 124 | +# README updates |
| 125 | +codebuff "Update the README with the new environment variables" |
| 126 | +``` |
| 127 | + |
| 128 | +## Configuration Commands |
| 129 | + |
| 130 | +Configuration help: |
| 131 | + |
| 132 | +```bash |
| 133 | +# Tool setup |
| 134 | +codebuff "Help me configure ESLint for this project" |
| 135 | + |
| 136 | +# Build config |
| 137 | +codebuff "Update webpack to handle .mdx files" |
| 138 | +``` |
| 139 | + |
| 140 | +## SQL Commands |
| 141 | + |
| 142 | +Database help: |
| 143 | + |
| 144 | +```bash |
| 145 | +# Query writing |
| 146 | +codebuff "Help me write a query to find users who haven't logged in for 30 days" |
| 147 | + |
| 148 | +# Query optimization |
| 149 | +codebuff "How can I make this query faster?" |
| 150 | + |
| 151 | +# Index suggestions |
| 152 | +codebuff "What indexes should I add for this query?" |
| 153 | + |
| 154 | +# Schema changes |
| 155 | +codebuff "Help me write a migration to add a status column" |
| 156 | +``` |
| 157 | + |
| 158 | +## Tips for Better Results |
| 159 | + |
| 160 | +1. Be specific about what files or components you're working with |
| 161 | +2. Provide context about what you're trying to achieve |
| 162 | +3. If the first attempt isn't quite right, clarify what you need |
| 163 | +4. Use knowledge.md files to teach Codebuff about project-specific patterns |
0 commit comments