Scans Salesforce metadata after Apex code changes to update README project structure tables, setup instructions, available commands, and API docs for @RestResource/@AuraEnabled/@InvocableMethod.
npx claudepluginhub jiten-singh-shahi/salesforce-claude-code --plugin salesforce-claude-codeThis skill uses the workspace's default tool permissions.
Synchronize documentation with the current state of the Salesforce codebase. Scans metadata, extracts project structure, and updates documentation files.
Analyzes codebase structure and updates README.md and docs/ directories to reflect current code state, including changes since last doc update. Triggers on 'update docs' or staleness checks.
Generates docs from code, detects drift between docs and implementation, validates quality, and applies templates for READMEs, APIs, components, models, and guides.
Share bugs, ideas, or general feedback.
Synchronize documentation with the current state of the Salesforce codebase. Scans metadata, extracts project structure, and updates documentation files.
@RestResource, @AuraEnabled, or @InvocableMethod classesRead project configuration to understand the tech stack:
# Core project config
cat sfdx-project.json
# Package dependencies
cat sfdx-project.json | grep -A5 "packageDirectories"
# Node.js tooling
cat package.json 2>/dev/null | grep -A10 '"scripts"'
Count and categorize all Salesforce metadata:
# Apex classes
find force-app -name "*.cls" -not -name "*Test.cls" | wc -l
# Apex test classes
find force-app -name "*Test.cls" | wc -l
# Apex triggers
find force-app -name "*.trigger" | wc -l
# LWC components
find force-app -path "*/lwc/*/*.js" | wc -l
# Custom objects
find force-app -name "*.object-meta.xml" | wc -l
# Flows
find force-app -name "*.flow-meta.xml" | wc -l
# Permission sets
find force-app -name "*.permissionset-meta.xml" | wc -l
Update these sections with <!-- AUTO-GENERATED-START --> / <!-- AUTO-GENERATED-END --> markers:
Project Structure:
## Project Structure
| Component | Count | Location |
|-----------|-------|----------|
| Apex Classes | 45 | `force-app/main/default/classes/` |
| Apex Triggers | 8 | `force-app/main/default/triggers/` |
| Test Classes | 32 | `force-app/main/default/classes/*Test.cls` |
| LWC Components | 12 | `force-app/main/default/lwc/` |
| Custom Objects | 15 | `force-app/main/default/objects/` |
| Flows | 6 | `force-app/main/default/flows/` |
Setup Instructions:
config/project-scratch-def.jsonAvailable Commands:
package.json scriptsFor classes with @RestResource, @AuraEnabled, or @InvocableMethod:
## API Endpoints
### AccountController (@RestResource)
- `GET /services/apexrest/accounts` — List accounts
- `POST /services/apexrest/accounts` — Create account
### AccountService (@AuraEnabled methods)
- `getAccountDetails(Id accountId)` — Returns account with contacts
- `updateAccountStatus(Id accountId, String status)` — Updates status
Create or update deployment documentation:
## Deployment Guide
### Prerequisites
- SF CLI v2.x installed
- Target org authenticated: `sf org login web --alias <alias>`
### Deploy Steps
1. Validate: `sf project deploy validate --target-org <alias> --test-level RunLocalTests`
2. Deploy: `sf project deploy start --target-org <alias> --test-level RunLocalTests`
### Metadata Dependencies
`sf project deploy start` handles dependency resolution automatically — no manual ordering is needed. If a deployment fails due to a missing dependency, verify that all referenced metadata is included in the source being deployed.
Flag documentation files not updated in 90+ days:
find . -name "README.md" -o -name "CONTRIBUTING.md" -o -name "*.md" -path "*/docs/*" | while read f; do
last_modified=$(git log -1 --format=%ai -- "$f" 2>/dev/null)
if [ -n "$last_modified" ]; then
last_epoch=$(date -d "$last_modified" +%s 2>/dev/null || date -j -f "%Y-%m-%d %H:%M:%S %z" "$last_modified" +%s 2>/dev/null)
days=$(( ($(date +%s) - $last_epoch) / 86400 ))
if [ "$days" -gt 90 ]; then echo "STALE ($days days): $f"; fi
fi
done
Ensure all auto-generated sections have proper markers so future updates don't clobber manual content. Only modify content between <!-- AUTO-GENERATED-START --> and <!-- AUTO-GENERATED-END --> markers.
/update-docs
/update-docs Sync the README with the new Agentforce integration feature
/update-docs Regenerate API documentation for all @RestResource classes
/update-docs Check for stale documentation and suggest updates