Özel modlar
Belirli görevlere veya iş akışlarına göre Bob'un davranışını uyarlamak için özel modlar oluşturabilirsin. Bob Shell'deki özel modlar Bob IDE modlarına benzer şekilde çalışır.
Bob Shell'de özel modlar neden kullanılır
- Shell için optimize edilmiş iş akışları: Terminal tabanlı geliştirme görevleri için özel olarak tasarlanmış modlar oluştur
- Komut satırı güvenliği: Üretim ortamlarında çalışırken güvenli işlemlerle sınırlandırılmış modlar oluştur
- Ortama özgü davranış: Farklı shell ortamlarına uyum sağlayan modlar yapılandır
- Otomasyon dostu: Hem interaktif hem de interaktif olmayan oturumlarda sorunsuz çalışan modlar tasarla
- Ekip standardizasyonu: Tutarlı iş akışları için shell'e özgü modları ekibinde paylaş
Özel moda dahil olanlar
Bob Shell'deki özel modlar, Bob IDE modlarıyla aynı temel yapıyı kullanır:
| Özellik | Açıklama | Shell'e Özgü Dikkat Noktaları |
|---|---|---|
slug | Benzersiz iç tanımlayıcı | Komut satırı argümanlarında kullanılır:bob --chat-mode=my-mode |
name | UI'da görünen ad | İnteraktif modun mod seçicisinde gösterilir |
description | Mod seçicisinde gösterilen kısa açıklama | Modun amacını kısaca açıkla |
roleDefinition | Temel kimlik ve uzmanlık | Shell bağlamını ve komut satırı iş akışlarını dikkate almalı |
groups | İzin verilen araç setleri ve dosya erişimi | Shell ortamlarında komut çalıştırma izinleri kritik öneme sahiptir |
whenToUse | Mod seçim kılavuzu | Bob Shell'in görevler için uygun modları seçmesine yardımcı olur |
customInstructions | Moda özgü davranış yönergeleri veya kurallar | Bob Shell geliştirme desenlerine referans verebilir |
Mevcut araçlar
Mevcut araç grupları
read: Dosya ve dizinleri okuedit: Dosyaları değiştir (fileRegexile kısıtlanabilir)browser: Tarayıcı otomasyonu kullancommand: Terminal komutlarını çalıştırmcp: MCP sunucularına eriş
Özel modlar oluşturma
Yapılandırma dosyaları
Bob Shell, Bob IDE ile aynı yapılandırma biçimini kullanır; hem YAML (tercih edilen) hem de JSON biçimlerini destekler.
Global modlar
Tüm projelerde kullanılabilir modlar için ~/.bob/custom_modes.yaml dosyasını oluştur veya düzenle:
customModes:
- slug: shell-debug
name: 🐛 Shell Debugger
roleDefinition: >-
You are a debugging specialist focused on command-line troubleshooting.
You excel at analyzing shell output, environment variables, and system logs.
whenToUse: Use for debugging shell scripts, command failures, and environment issues.
customInstructions: |-
When debugging:
- Always check environment variables first
- Examine command exit codes
- Review relevant log files
- Test commands in isolation before suggesting fixes
groups:
- read
- command
- browserProjeye özgü modlar
Proje kökünde .bob/custom_modes.yaml dosyasını oluştur veya düzenle:
customModes:
- slug: deploy-helper
name: 🚀 Deployment Assistant
roleDefinition: You are a deployment specialist for this project's infrastructure.
whenToUse: Use for deployment tasks, infrastructure changes, and release management.
customInstructions: |-
Deployment guidelines:
- Always verify the target environment before running commands
- Check for running processes that might be affected
- Validate configuration files before applying changes
- Create backups before destructive operations
groups:
- read
- - edit
- fileRegex: \.(yaml|yml|sh|env)$
description: Configuration and script files only
- commandKomut satırından mod seçimi
Bob Shell başlatırken bir mod belirt:
# Bob Shell'i belirli bir modda başlat
bob --chat-mode=shell-debug
# Diğer seçeneklerle birlikte kullan
bob --chat-mode=deploy-helper --sandboxİnteraktif mod geçişi
İnteraktif modda slash command'ları kullanarak mod değiştir:
# Özel bir moda geç
/mode shell-debug
# Veya modun slug'ını doğrudan kullan
/shell-debugShell'e özgü yapılandırmalar
Üretim güvenliği modu
Üretim ortamları için güvenlik odaklı bir mod oluştur:
customModes:
- slug: prod-ops
name: 🔒 Production Operations
roleDefinition: >-
You are a production operations specialist with a strong focus on safety.
You never run destructive commands without explicit confirmation.
whenToUse: Use when working with production systems or sensitive environments.
customInstructions: |-
Production safety rules:
- NEVER run destructive commands without explicit user confirmation
- Always verify the target environment before any operation
- Suggest dry-run options when available
- Check for active connections or processes before changes
- Recommend backup procedures before modifications
groups:
- read
- browser
# Note: No edit or command groups for maximum safetyScript geliştirme modu
Shell script geliştirme için bir mod oluştur:
customModes:
- slug: script-dev
name: 📜 Script Developer
roleDefinition: >-
You are a shell scripting expert specializing in bash, zsh, and POSIX-compliant scripts.
whenToUse: Use for creating, debugging, or improving shell scripts.
customInstructions: |-
Shell scripting best practices:
- Use shellcheck-compliant syntax
- Include proper error handling with set -e and set -u
- Add usage documentation at the top of scripts
- Quote variables to prevent word splitting
- Provide exit codes for different error conditions
groups:
- read
- - edit
- fileRegex: \.(sh|bash|zsh)$
description: Shell script files only
- commandKomut çalıştırma izinleri
Komut erişimini kısıtlama
command grubunu dışarıda bırakarak bir modun çalıştırabileceği komutları kontrol et:
customModes:
- slug: safe-reviewer
name: 👀 Safe Code Reviewer
roleDefinition: You are a code reviewer focused on analysis, not modification.
whenToUse: Use for code reviews and analysis without making changes.
groups:
- read
- browser
# No command or edit groups - read-only modeBelirli komutlara izin verme
Ayar dosyandaki Bob Shell allowed araçları yapılandırmasını özel modlarla birlikte kullan:
{
"tools": {
"allowed": [
"run_shell_command(git status)",
"run_shell_command(git log)",
"run_shell_command(git diff)"
]
}
}İnteraktif ve interaktif olmayan davranış
Her iki mod için tasarım
Hem interaktif hem de interaktif olmayan oturumlarda iyi çalışan modlar oluştur:
customModes:
- slug: test-runner
name: 🧪 Test Runner
roleDefinition: >-
You are a testing specialist who runs and analyzes test suites.
You adapt your output based on the running context.
whenToUse: Use for running tests, analyzing test results, and debugging test failures.
customInstructions: |-
Testing guidelines:
- In interactive mode: Provide detailed explanations and suggestions
- In non-interactive mode: Focus on concise, actionable output
- Always report test results clearly
- Suggest fixes for failing tests
groups:
- read
- commandİnteraktif olmayan kullanım
Modları interaktif olmayan modda kullan:
# Otomasyon için tasarlanmış bir mod kullan
bob --chat-mode=test-runner -p "Run the test suite and report failures"
# Çıktı işlemeyle birleştir
bob --chat-mode=test-runner -p "Run tests" --hide-intermediary-output > results.txtDosyalar aracılığıyla moda özgü talimatlar
Dizin tabanlı talimatlar
.bob/rules-{mode-slug}/ içinde moda özgü talimat dosyaları oluştur:
Örnek talimat dosyası (.bob/rules-shell-debug/01-environment-checks.md):
# Environment Debugging Checklist
When debugging shell issues, always check:
1. **Environment Variables**: PATH, SHELL, TERM, and application-specific variables
2. **Shell Configuration**: .bashrc, .zshrc, .profile files
3. **System State**: Current working directory, file permissions, disk space
4. **Command Availability**: Use `command -v <cmd>` to verify commands existTek dosya talimatları (yedek)
Alternatif olarak, çalışma alanı kökünde tek bir .bobrules-{mode-slug} dosyası kullan.
Yapılandırma önceliği
Mod yapılandırmaları şu sırayla uygulanır:
- Komut satırı argümanları (
--chat-mode=mode-slug) - Proje düzeyinde modlar (
.bob/custom_modes.yaml - Kullanıcı düzeyinde modlar (
~/.bob/custom_modes.yaml) - Sistem düzeyinde modlar (platforma özgü konumlar)
- Varsayılan modlar
Özel modlarla sandbox kullanımı
Güvenli deneme için özel modları Bob Shell'in sandbox özelliğiyle birleştir:
# Sandbox'ta özel mod başlat
bob --chat-mode=script-dev --sandbox
# Docker sandbox ile kullan
bob --chat-mode=deploy-helper --sandboxModları Bob IDE'den taşıma
Temel farklılıklar
Bob IDE'den Bob Shell'e özel modları taşırken:
| Konu | Bob IDE | Bob Shell |
|---|---|---|
| UI etkileşimi | Panelli görsel arayüz | Terminal tabanlı arayüz |
| Dosya düzenleme | Editörde diff'ler ve önizlemeler | CLI diff görünümü veya harici editör |
| Komut çalıştırma | Entegre terminal | Doğrudan shell çalıştırma |
| Mod geçişi | UI dropdown veya slash command'ları | Slash command'ları veya CLI argümanları |
| Yapılandırma | Ayarlar UI'ı + dosyalar | Yalnızca yapılandırma dosyaları |
Uyarlama kontrol listesi
Bob IDE modlarını Bob Shell için uyarlarken:
- Shell'e özgü bağlam için
roleDefinition'ı incele - Komut satırı iş akışlarına referans vermek için
customInstructions'ı güncelle groupsyapılandırmasında komut çalıştırma güvenliğini göz önünde bulundur- Modu hem interaktif hem de interaktif olmayan oturumlarda test et
- Dosya yolu işlemenin shell bağlamında çalıştığını doğrula
- Uygulanabilirse sandbox modunu test et
Örnek taşıma
Orijinal Bob IDE modu:
customModes:
- slug: code-reviewer
name: 👀 Code Reviewer
roleDefinition: You are a code reviewer who provides detailed feedback.
groups:
- read
- browserBob Shell için uyarlanmış:
customModes:
- slug: code-reviewer
name: 👀 Code Reviewer
roleDefinition: >-
You are a code reviewer who provides detailed feedback.
You work efficiently in terminal environments and provide clear, actionable suggestions.
whenToUse: Use for code reviews, pull request analysis, and code quality checks.
customInstructions: |-
Code review guidelines:
- Provide feedback in a structured format suitable for terminal output
- Reference specific line numbers and file paths
- Suggest concrete improvements with examples
- Format output for easy parsing if used in non-interactive mode
groups:
- read
- command # Added for git operations
- browserÖzel kurallar
Özel kurallar, Bob Shell'in terminal ortamındaki isteklerine nasıl yanıt verdiğini etkiler; çıktıyı spesifik tercihlerinle ve proje gereksinimlerinle hizalar. Kodlama stilini, dokümantasyon yaklaşımını ve karar alma süreçlerini kontrol edebilirsin.
Agent personaları
Bir subagentin rolünü, odağını ve tool erişimini şekillendiren yeniden kullanılabilir persona dosyaları oluştur. Bir subagentin neyi arayacağını, çıktısını nasıl biçimlendireceğini ve ne yapmasına izin verilmediğini tanımla.