> Current SF CLI releases support this combined pattern correctly, including runs where the manifest deploys one set of components while a destructive changes file deletes different components in the same operation.
---
## Example 8: Multi-Environment Deployment
### User Request:
```
"Deploy to dev, then staging, then production after each passes validation"
```
### Skill Execution:
1.**Deploy to Dev**
```bash
sf project deploy start --target-org dev --test-level NoTestRun --wait 10
```
2.**Deploy to Staging**
```bash
sf project deploy start --target-org staging --test-level RunLocalTests --wait 20
```
3.**Validate Production**
```bash
sf project deploy start --target-org production --dry-run --test-level RunLocalTests --wait 30
```
4.**Deploy to Production** (after manual approval)
```bash
sf project deploy quick --job-id <validation-job-id> --target-org production
```
---
## Example 9: Code Coverage Analysis
### User Request:
```
"Check my code coverage and identify classes that need more tests"
```
### Skill Execution:
1.**Run all tests**
```bash
sf apex run test \
--test-level RunLocalTests \
--target-org dev \
--code-coverage \
--result-format human \
--wait 15
```
2.**Analyze coverage report**
```
Overall Code Coverage: 87%
Classes with <75%coverage:
- LeadProcessor: 62%
- OpportunityHelper: 71%
- AccountBatchProcessor: 45%
Recommendations:
1. Add test methods for LeadProcessor.processLeads()
2. Test error handling in OpportunityHelper
3. Create comprehensive tests for AccountBatchProcessor
```
---
## Example 10: Deployment Error Recovery
### User Request:
```
"Deployment failed with 'INVALID_CROSS_REFERENCE_KEY' error"
```
### Skill Execution:
1.**Analyze error**
```
Error: INVALID_CROSS_REFERENCE_KEY
Component: CustomObject__c.SomeLookupField__c
Message: Field references non-existent object
```
2.**Identify dependency**
```bash
grep -r "ReferencedObject__c" force-app/
```
3.**Solution provided**
```
The error indicates that SomeLookupField__c references an object
that doesn't exist in the target org.
Solutions:
1. Deploy the referenced object first
2. Include both objects in the same deployment
3. Update the field to reference a different object
4. Check if the referenced object exists: sf org list metadata --metadata-type CustomObject