.cursor/skills/search-first/SKILL.md
Use when researching existing Salesforce tools, Apex libraries, or metadata patterns before writing custom code. Search-first workflow with agent. Do NOT use for implementing code — only for discovery and evaluation.
npx skillsauth add jiten-singh-shahi/salesforce-claude-code search-firstInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematizes the "search for existing solutions before implementing" workflow.
+---------------------------------------------+
| 1. NEED ANALYSIS |
| Define what functionality is needed |
| Identify language/framework constraints |
+---------------------------------------------+
| 2. PARALLEL SEARCH (general-purpose agent) |
| +----------+ +----------+ +----------+ |
| | npm / | | MCP / | | GitHub / | |
| | AppExch | | Skills | | Web | |
| +----------+ +----------+ +----------+ |
+---------------------------------------------+
| 3. EVALUATE |
| Score candidates (functionality, maint, |
| community, docs, license, deps) |
+---------------------------------------------+
| 4. DECIDE |
| +---------+ +----------+ +---------+ |
| | Adopt | | Extend | | Build | |
| | as-is | | /Wrap | | Custom | |
| +---------+ +----------+ +---------+ |
+---------------------------------------------+
| 5. IMPLEMENT |
| Install package / Configure MCP / |
| Write minimal custom code |
+---------------------------------------------+
| Signal | Action | |--------|--------| | Exact match, well-maintained, MIT/Apache | Adopt — install and use directly | | Partial match, good foundation | Extend — install + write thin wrapper | | Multiple weak matches | Compose — combine 2-3 small packages | | Nothing suitable found | Build — write custom, but informed by research |
Before writing a utility or adding functionality, mentally run through:
rg through relevant modules/tests first~/.claude/settings.json and search~/.claude/skills/For non-trivial functionality, launch a general-purpose agent:
Task(subagent_type="general-purpose", prompt="
Research existing tools for: [DESCRIPTION]
Language/framework: [LANG]
Constraints: [ANY]
Search: npm/AppExchange, MCP servers, Claude Code skills, GitHub
Return: Structured comparison with recommendation
")
| Category | Tools to Check | Notes | |----------|---------------|-------| | Testing | ApexMocks, FFLib, at4dx, Apex Replay Debugger | FFLib is the industry standard | | CI/CD | CumulusCI, sfdx-git-delta, sf scanner, GitHub Actions | sfdx-git-delta for delta deployments | | Data | SFDX Data Loader, DLRS (Declarative Lookup Rollup Summary), DataWeave | DLRS replaces rollup trigger code | | Security | Shield Platform Encryption, Event Monitoring, SF Code Analyzer | Scanner catches PMD violations | | Documentation | ApexDox, SfApexDoc | Auto-generate Apex docs | | MCP | @salesforce/mcp (official), community MCP servers | Check official first | | Package Mgmt | CumulusCI, SFDX Package commands | For managed/unlocked packages |
Before building custom tooling, check if an MCP server handles it:
mcp + your domainScenario 1: "We need rollup summary fields on lookup relationships"
Search: AppExchange "rollup summary lookup"
Found: DLRS (Declarative Lookup Rollup Summaries) — 4.8★, 5000+ installs
Decision: ADOPT — install DLRS, configure declaratively
Result: Zero custom Apex code for rollup calculations
Scenario 2: "We need delta deployments in CI"
Search: npm "salesforce delta deployment"
Found: sfdx-git-delta — actively maintained, 1000+ stars
Decision: ADOPT — add as sf plugin, configure in GitHub Actions
Result: Deploy only changed metadata, 10x faster CI
Scenario 3: "We need custom approval routing based on territory"
Search: AppExchange "dynamic approval routing territory"
Found: Several packages but none match exact business rules
Decision: BUILD — custom Apex approval process with territory-based routing
Result: Custom code, but informed by research (knew no package fit)
development
Update Salesforce platform reference docs with latest release features and deprecation announcements. Use when SessionStart hook warns docs are outdated or a new Salesforce release has shipped. Do NOT use for Apex or LWC development.
development
Use when syncing documentation after Salesforce Apex code changes. Update README, API docs, and deploy metadata references to match the current org codebase.
development
Use when managing context during long Salesforce Apex development sessions. Suggests manual compaction at logical intervals to preserve deploy and org context across phases.
tools
Visualforce development — pages, controllers, extensions, ViewState, JS Remoting, LWC migration. Use when maintaining VF pages, building PDFs, or planning VF-to-LWC migration. Do NOT use for LWC, Aura, or Flow.