scc-universal 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/.claude-plugin/plugin.json +44 -0
  2. package/.cursor/agents/deep-researcher.md +142 -0
  3. package/.cursor/agents/doc-updater.md +219 -0
  4. package/.cursor/agents/eval-runner.md +335 -0
  5. package/.cursor/agents/learning-engine.md +210 -0
  6. package/.cursor/agents/loop-operator.md +245 -0
  7. package/.cursor/agents/refactor-cleaner.md +119 -0
  8. package/.cursor/agents/sf-admin-agent.md +127 -0
  9. package/.cursor/agents/sf-agentforce-agent.md +126 -0
  10. package/.cursor/agents/sf-apex-agent.md +117 -0
  11. package/.cursor/agents/sf-architect.md +426 -0
  12. package/.cursor/agents/sf-aura-reviewer.md +369 -0
  13. package/.cursor/agents/sf-bugfix-agent.md +101 -0
  14. package/.cursor/agents/sf-flow-agent.md +155 -0
  15. package/.cursor/agents/sf-integration-agent.md +141 -0
  16. package/.cursor/agents/sf-lwc-agent.md +123 -0
  17. package/.cursor/agents/sf-review-agent.md +357 -0
  18. package/.cursor/agents/sf-visualforce-reviewer.md +465 -0
  19. package/.cursor/hooks/adapter.js +81 -0
  20. package/.cursor/hooks/after-file-edit.js +26 -0
  21. package/.cursor/hooks/after-mcp-execution.js +12 -0
  22. package/.cursor/hooks/after-shell-execution.js +30 -0
  23. package/.cursor/hooks/after-tab-file-edit.js +12 -0
  24. package/.cursor/hooks/before-mcp-execution.js +11 -0
  25. package/.cursor/hooks/before-read-file.js +13 -0
  26. package/.cursor/hooks/before-shell-execution.js +29 -0
  27. package/.cursor/hooks/before-submit-prompt.js +23 -0
  28. package/.cursor/hooks/pre-compact.js +7 -0
  29. package/.cursor/hooks/session-end.js +10 -0
  30. package/.cursor/hooks/session-start.js +10 -0
  31. package/.cursor/hooks/stop.js +18 -0
  32. package/.cursor/hooks/subagent-start.js +10 -0
  33. package/.cursor/hooks/subagent-stop.js +10 -0
  34. package/.cursor/hooks.json +107 -0
  35. package/.cursor/skills/aside/SKILL.md +115 -0
  36. package/.cursor/skills/checkpoint/SKILL.md +50 -0
  37. package/.cursor/skills/configure-scc/SKILL.md +160 -0
  38. package/.cursor/skills/continuous-agent-loop/SKILL.md +260 -0
  39. package/.cursor/skills/mcp-server-patterns/SKILL.md +142 -0
  40. package/.cursor/skills/model-route/SKILL.md +81 -0
  41. package/.cursor/skills/prompt-optimizer/SKILL.md +366 -0
  42. package/.cursor/skills/refactor-clean/SKILL.md +133 -0
  43. package/.cursor/skills/resume-session/SKILL.md +111 -0
  44. package/.cursor/skills/save-session/SKILL.md +183 -0
  45. package/.cursor/skills/search-first/SKILL.md +140 -0
  46. package/.cursor/skills/security-scan/SKILL.md +142 -0
  47. package/.cursor/skills/sessions/SKILL.md +124 -0
  48. package/.cursor/skills/sf-agentforce-development/SKILL.md +449 -0
  49. package/.cursor/skills/sf-apex-async-patterns/SKILL.md +324 -0
  50. package/.cursor/skills/sf-apex-best-practices/SKILL.md +421 -0
  51. package/.cursor/skills/sf-apex-constraints/SKILL.md +79 -0
  52. package/.cursor/skills/sf-apex-cursor/SKILL.md +336 -0
  53. package/.cursor/skills/sf-apex-enterprise-patterns/SKILL.md +344 -0
  54. package/.cursor/skills/sf-apex-testing/SKILL.md +407 -0
  55. package/.cursor/skills/sf-api-design/SKILL.md +237 -0
  56. package/.cursor/skills/sf-approval-processes/SKILL.md +312 -0
  57. package/.cursor/skills/sf-aura-development/SKILL.md +260 -0
  58. package/.cursor/skills/sf-build-fix/SKILL.md +120 -0
  59. package/.cursor/skills/sf-data-modeling/SKILL.md +274 -0
  60. package/.cursor/skills/sf-debugging/SKILL.md +362 -0
  61. package/.cursor/skills/sf-deployment/SKILL.md +291 -0
  62. package/.cursor/skills/sf-deployment-constraints/SKILL.md +153 -0
  63. package/.cursor/skills/sf-devops-ci-cd/SKILL.md +322 -0
  64. package/.cursor/skills/sf-docs-lookup/SKILL.md +100 -0
  65. package/.cursor/skills/sf-e2e-testing/SKILL.md +321 -0
  66. package/.cursor/skills/sf-experience-cloud/SKILL.md +248 -0
  67. package/.cursor/skills/sf-flow-development/SKILL.md +376 -0
  68. package/.cursor/skills/sf-governor-limits/SKILL.md +319 -0
  69. package/.cursor/skills/sf-harness-audit/SKILL.md +139 -0
  70. package/.cursor/skills/sf-help/SKILL.md +156 -0
  71. package/.cursor/skills/sf-integration/SKILL.md +479 -0
  72. package/.cursor/skills/sf-lwc-constraints/SKILL.md +128 -0
  73. package/.cursor/skills/sf-lwc-development/SKILL.md +302 -0
  74. package/.cursor/skills/sf-lwc-testing/SKILL.md +387 -0
  75. package/.cursor/skills/sf-metadata-management/SKILL.md +285 -0
  76. package/.cursor/skills/sf-platform-events-cdc/SKILL.md +372 -0
  77. package/.cursor/skills/sf-quickstart/SKILL.md +170 -0
  78. package/.cursor/skills/sf-security/SKILL.md +330 -0
  79. package/.cursor/skills/sf-security-constraints/SKILL.md +125 -0
  80. package/.cursor/skills/sf-soql-constraints/SKILL.md +129 -0
  81. package/.cursor/skills/sf-soql-optimization/SKILL.md +353 -0
  82. package/.cursor/skills/sf-tdd-workflow/SKILL.md +332 -0
  83. package/.cursor/skills/sf-testing-constraints/SKILL.md +198 -0
  84. package/.cursor/skills/sf-trigger-constraints/SKILL.md +88 -0
  85. package/.cursor/skills/sf-trigger-frameworks/SKILL.md +343 -0
  86. package/.cursor/skills/sf-visualforce-development/SKILL.md +259 -0
  87. package/.cursor/skills/strategic-compact/SKILL.md +205 -0
  88. package/.cursor/skills/update-docs/SKILL.md +162 -0
  89. package/.cursor/skills/update-platform-docs/SKILL.md +86 -0
  90. package/.cursor-plugin/plugin.json +26 -0
  91. package/LICENSE +21 -0
  92. package/README.md +522 -0
  93. package/agents/deep-researcher.md +145 -0
  94. package/agents/doc-updater.md +222 -0
  95. package/agents/eval-runner.md +340 -0
  96. package/agents/learning-engine.md +211 -0
  97. package/agents/loop-operator.md +247 -0
  98. package/agents/refactor-cleaner.md +122 -0
  99. package/agents/sf-admin-agent.md +131 -0
  100. package/agents/sf-agentforce-agent.md +132 -0
  101. package/agents/sf-apex-agent.md +124 -0
  102. package/agents/sf-architect.md +435 -0
  103. package/agents/sf-aura-reviewer.md +372 -0
  104. package/agents/sf-bugfix-agent.md +105 -0
  105. package/agents/sf-flow-agent.md +159 -0
  106. package/agents/sf-integration-agent.md +146 -0
  107. package/agents/sf-lwc-agent.md +127 -0
  108. package/agents/sf-review-agent.md +366 -0
  109. package/agents/sf-visualforce-reviewer.md +468 -0
  110. package/assets/logo.svg +18 -0
  111. package/docs/ARCHITECTURE.md +133 -0
  112. package/docs/authoring-guide.md +373 -0
  113. package/docs/hook-development.md +578 -0
  114. package/docs/token-optimization.md +139 -0
  115. package/docs/workflow-examples.md +645 -0
  116. package/examples/agentforce-action/README.md +227 -0
  117. package/examples/apex-trigger-handler/README.md +114 -0
  118. package/examples/devops-pipeline/README.md +325 -0
  119. package/examples/flow-automation/README.md +188 -0
  120. package/examples/integration-pattern/README.md +416 -0
  121. package/examples/lwc-component/README.md +180 -0
  122. package/examples/platform-events/README.md +492 -0
  123. package/examples/scratch-org-setup/README.md +138 -0
  124. package/examples/security-audit/README.md +244 -0
  125. package/examples/visualforce-migration/README.md +314 -0
  126. package/hooks/hooks.json +338 -0
  127. package/hooks/memory-persistence/README.md +73 -0
  128. package/manifests/install-modules.json +217 -0
  129. package/manifests/install-profiles.json +17 -0
  130. package/mcp-configs/mcp-servers.json +19 -0
  131. package/package.json +89 -0
  132. package/schemas/hooks.schema.json +123 -0
  133. package/schemas/install-modules.schema.json +76 -0
  134. package/schemas/install-profiles.schema.json +28 -0
  135. package/schemas/install-state.schema.json +73 -0
  136. package/schemas/package-manager.schema.json +18 -0
  137. package/schemas/plugin.schema.json +112 -0
  138. package/schemas/scc-install-config.schema.json +29 -0
  139. package/schemas/state-store.schema.json +111 -0
  140. package/scripts/cli/install-apply.js +170 -0
  141. package/scripts/cli/uninstall.js +193 -0
  142. package/scripts/hooks/check-console-log.js +101 -0
  143. package/scripts/hooks/check-hook-enabled.js +17 -0
  144. package/scripts/hooks/check-platform-docs-age.js +48 -0
  145. package/scripts/hooks/cost-tracker.js +78 -0
  146. package/scripts/hooks/doc-file-warning.js +63 -0
  147. package/scripts/hooks/evaluate-session.js +98 -0
  148. package/scripts/hooks/governor-check.js +220 -0
  149. package/scripts/hooks/learning-observe.sh +206 -0
  150. package/scripts/hooks/mcp-health-check.js +588 -0
  151. package/scripts/hooks/post-bash-build-complete.js +34 -0
  152. package/scripts/hooks/post-bash-pr-created.js +43 -0
  153. package/scripts/hooks/post-edit-console-warn.js +61 -0
  154. package/scripts/hooks/post-edit-format.js +79 -0
  155. package/scripts/hooks/post-edit-typecheck.js +98 -0
  156. package/scripts/hooks/post-write.js +168 -0
  157. package/scripts/hooks/pre-bash-git-push-reminder.js +35 -0
  158. package/scripts/hooks/pre-bash-tmux-reminder.js +47 -0
  159. package/scripts/hooks/pre-compact.js +51 -0
  160. package/scripts/hooks/pre-tool-use.js +163 -0
  161. package/scripts/hooks/pre-write-doc-warn.js +9 -0
  162. package/scripts/hooks/quality-gate.js +251 -0
  163. package/scripts/hooks/run-with-flags-shell.sh +32 -0
  164. package/scripts/hooks/run-with-flags.js +135 -0
  165. package/scripts/hooks/session-end-marker.js +29 -0
  166. package/scripts/hooks/session-end.js +311 -0
  167. package/scripts/hooks/session-start.js +202 -0
  168. package/scripts/hooks/sfdx-scanner-check.js +142 -0
  169. package/scripts/hooks/sfdx-validate.js +119 -0
  170. package/scripts/hooks/stop-hook.js +170 -0
  171. package/scripts/hooks/suggest-compact.js +67 -0
  172. package/scripts/lib/agent-adapter.js +82 -0
  173. package/scripts/lib/apex-analysis.js +194 -0
  174. package/scripts/lib/hook-flags.js +74 -0
  175. package/scripts/lib/install-config.js +73 -0
  176. package/scripts/lib/install-executor.js +363 -0
  177. package/scripts/lib/install-state.js +121 -0
  178. package/scripts/lib/orchestration-session.js +299 -0
  179. package/scripts/lib/package-manager.js +124 -0
  180. package/scripts/lib/project-detect.js +228 -0
  181. package/scripts/lib/schema-validator.js +190 -0
  182. package/scripts/lib/skill-adapter.js +100 -0
  183. package/scripts/lib/state-store.js +376 -0
  184. package/scripts/lib/tmux-worktree-orchestrator.js +598 -0
  185. package/scripts/lib/utils.js +313 -0
  186. package/scripts/scc.js +164 -0
  187. package/skills/_reference/AGENTFORCE_PATTERNS.md +112 -0
  188. package/skills/_reference/APEX_CURSOR.md +159 -0
  189. package/skills/_reference/API_VERSIONS.md +78 -0
  190. package/skills/_reference/APPROVAL_PROCESSES.md +105 -0
  191. package/skills/_reference/ASYNC_PATTERNS.md +163 -0
  192. package/skills/_reference/AURA_COMPONENTS.md +146 -0
  193. package/skills/_reference/DATA_MIGRATION_PATTERNS.md +151 -0
  194. package/skills/_reference/DATA_MODELING.md +124 -0
  195. package/skills/_reference/DEBUGGING_TOOLS.md +140 -0
  196. package/skills/_reference/DEPLOYMENT_CHECKLIST.md +87 -0
  197. package/skills/_reference/DEPRECATIONS.md +79 -0
  198. package/skills/_reference/DOCKER_CI_PATTERNS.md +138 -0
  199. package/skills/_reference/ENTERPRISE_PATTERNS.md +122 -0
  200. package/skills/_reference/EXPERIENCE_CLOUD.md +143 -0
  201. package/skills/_reference/FLOW_PATTERNS.md +113 -0
  202. package/skills/_reference/GOVERNOR_LIMITS.md +77 -0
  203. package/skills/_reference/INTEGRATION_PATTERNS.md +105 -0
  204. package/skills/_reference/LWC_PATTERNS.md +79 -0
  205. package/skills/_reference/METADATA_TYPES.md +115 -0
  206. package/skills/_reference/NAMING_CONVENTIONS.md +84 -0
  207. package/skills/_reference/PACKAGE_DEVELOPMENT.md +150 -0
  208. package/skills/_reference/PLATFORM_EVENTS.md +121 -0
  209. package/skills/_reference/REPORTING_API.md +143 -0
  210. package/skills/_reference/SCRATCH_ORG_PATTERNS.md +126 -0
  211. package/skills/_reference/SECURITY_PATTERNS.md +127 -0
  212. package/skills/_reference/SHARING_MODEL.md +120 -0
  213. package/skills/_reference/SOQL_PATTERNS.md +119 -0
  214. package/skills/_reference/TESTING_STANDARDS.md +96 -0
  215. package/skills/_reference/TRIGGER_PATTERNS.md +114 -0
  216. package/skills/_reference/VISUALFORCE_PATTERNS.md +121 -0
  217. package/skills/aside/SKILL.md +118 -0
  218. package/skills/checkpoint/SKILL.md +53 -0
  219. package/skills/configure-scc/SKILL.md +163 -0
  220. package/skills/continuous-agent-loop/SKILL.md +264 -0
  221. package/skills/mcp-server-patterns/SKILL.md +146 -0
  222. package/skills/model-route/SKILL.md +84 -0
  223. package/skills/prompt-optimizer/SKILL.md +369 -0
  224. package/skills/refactor-clean/SKILL.md +136 -0
  225. package/skills/resume-session/SKILL.md +114 -0
  226. package/skills/save-session/SKILL.md +186 -0
  227. package/skills/search-first/SKILL.md +144 -0
  228. package/skills/security-scan/SKILL.md +146 -0
  229. package/skills/sessions/SKILL.md +127 -0
  230. package/skills/sf-agentforce-development/SKILL.md +450 -0
  231. package/skills/sf-apex-async-patterns/SKILL.md +326 -0
  232. package/skills/sf-apex-best-practices/SKILL.md +425 -0
  233. package/skills/sf-apex-constraints/SKILL.md +81 -0
  234. package/skills/sf-apex-cursor/SKILL.md +338 -0
  235. package/skills/sf-apex-enterprise-patterns/SKILL.md +348 -0
  236. package/skills/sf-apex-testing/SKILL.md +409 -0
  237. package/skills/sf-api-design/SKILL.md +238 -0
  238. package/skills/sf-approval-processes/SKILL.md +315 -0
  239. package/skills/sf-aura-development/SKILL.md +263 -0
  240. package/skills/sf-build-fix/SKILL.md +121 -0
  241. package/skills/sf-data-modeling/SKILL.md +278 -0
  242. package/skills/sf-debugging/SKILL.md +363 -0
  243. package/skills/sf-deployment/SKILL.md +295 -0
  244. package/skills/sf-deployment-constraints/SKILL.md +155 -0
  245. package/skills/sf-devops-ci-cd/SKILL.md +325 -0
  246. package/skills/sf-docs-lookup/SKILL.md +103 -0
  247. package/skills/sf-e2e-testing/SKILL.md +324 -0
  248. package/skills/sf-experience-cloud/SKILL.md +249 -0
  249. package/skills/sf-flow-development/SKILL.md +377 -0
  250. package/skills/sf-governor-limits/SKILL.md +323 -0
  251. package/skills/sf-harness-audit/SKILL.md +142 -0
  252. package/skills/sf-help/SKILL.md +159 -0
  253. package/skills/sf-integration/SKILL.md +483 -0
  254. package/skills/sf-lwc-constraints/SKILL.md +130 -0
  255. package/skills/sf-lwc-development/SKILL.md +303 -0
  256. package/skills/sf-lwc-testing/SKILL.md +388 -0
  257. package/skills/sf-metadata-management/SKILL.md +288 -0
  258. package/skills/sf-platform-events-cdc/SKILL.md +375 -0
  259. package/skills/sf-quickstart/SKILL.md +173 -0
  260. package/skills/sf-security/SKILL.md +334 -0
  261. package/skills/sf-security-constraints/SKILL.md +127 -0
  262. package/skills/sf-soql-constraints/SKILL.md +131 -0
  263. package/skills/sf-soql-optimization/SKILL.md +354 -0
  264. package/skills/sf-tdd-workflow/SKILL.md +336 -0
  265. package/skills/sf-testing-constraints/SKILL.md +200 -0
  266. package/skills/sf-trigger-constraints/SKILL.md +90 -0
  267. package/skills/sf-trigger-frameworks/SKILL.md +347 -0
  268. package/skills/sf-visualforce-development/SKILL.md +260 -0
  269. package/skills/strategic-compact/SKILL.md +208 -0
  270. package/skills/update-docs/SKILL.md +165 -0
  271. package/skills/update-platform-docs/SKILL.md +90 -0
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: strategic-compact
3
+ description: >-
4
+ Use when managing context during long Salesforce Apex development sessions. Suggests manual compaction at logical intervals to preserve deploy and org context across phases.
5
+ ---
6
+
7
+ # Strategic Compact Skill
8
+
9
+ Suggests manual `/compact` at strategic points in your workflow rather than relying on arbitrary auto-compaction.
10
+
11
+ ## When to Use
12
+
13
+ - When running long Salesforce development sessions that approach context limits (200K+ tokens)
14
+ - When transitioning between distinct development phases (org exploration -> planning -> implementation)
15
+ - When switching between unrelated Salesforce domains (Apex -> LWC -> Flow configuration)
16
+ - After completing a major milestone (feature shipped, deployment succeeded) before starting new work
17
+ - When responses slow down or become less coherent due to context pressure
18
+
19
+ ## Why Strategic Compaction?
20
+
21
+ Auto-compaction triggers at arbitrary points:
22
+
23
+ - Often mid-task, losing important context about org structure or governor limits
24
+ - No awareness of logical task boundaries
25
+ - Can interrupt complex multi-step Salesforce operations (deploy pipeline, test runs)
26
+
27
+ Strategic compaction at logical boundaries:
28
+
29
+ - **After org exploration, before implementation** — Compact metadata/schema context, keep implementation plan
30
+ - **After completing a feature** — Fresh start for next feature
31
+ - **Before switching domains** — Clear Apex context before LWC work
32
+
33
+ ## How It Works
34
+
35
+ The `suggest-compact.js` script runs on PreToolUse (Edit/Write) and:
36
+
37
+ 1. **Tracks tool calls** — Counts tool invocations in session
38
+ 2. **Threshold detection** — Suggests at configurable threshold (default: 50 calls)
39
+ 3. **Periodic reminders** — Reminds every 25 calls after threshold
40
+
41
+ ## Compaction Decision Guide
42
+
43
+ | Phase Transition | Compact? | Why |
44
+ |-----------------|----------|-----|
45
+ | Org exploration -> Planning | Yes | Org metadata is bulky; plan is the distilled output |
46
+ | Planning -> Apex implementation | Yes | Plan is saved to a file; free up context for code |
47
+ | Apex implementation -> LWC work | Yes | Clear Apex context for unrelated frontend work |
48
+ | Apex implementation -> Apex testing | Maybe | Keep if tests reference recent code; compact if switching focus |
49
+ | Debugging -> Next feature | Yes | Debug traces pollute context for unrelated work |
50
+ | Mid-implementation | No | Losing class names, field APIs, and partial state is costly |
51
+ | After a failed deployment | Yes | Clear the dead-end reasoning before trying a new approach |
52
+ | Trigger work -> Flow work | Yes | Different domains with different context needs |
53
+
54
+ ## What Survives Compaction
55
+
56
+ Understanding what persists helps you compact with confidence:
57
+
58
+ | Persists | Lost |
59
+ |----------|------|
60
+ | CLAUDE.md instructions | Intermediate reasoning and analysis |
61
+ | Task list (if saved to a file) | File contents you previously read |
62
+ | Project-level settings and rules | Multi-step conversation context |
63
+ | Git state (commits, branches) | Tool call history and counts |
64
+ | Files on disk | Nuanced user preferences stated verbally |
65
+ | Org metadata on disk | SOQL query results from exploration |
66
+
67
+ ## Best Practices
68
+
69
+ 1. **Compact after planning** — Once plan is finalized and saved to a file, compact to start fresh
70
+ 2. **Compact after debugging** — Clear error-resolution context before continuing
71
+ 3. **Don't compact mid-implementation** — Preserve context for related Apex/LWC changes
72
+ 4. **Read the suggestion** — The hook tells you *when*, you decide *if*
73
+ 5. **Write before compacting** — Save important context (org structure, field APIs) to files or memory before compacting
74
+ 6. **Use `/compact` with a summary** — Add a custom message: `/compact Focus on implementing trigger handler next`
75
+
76
+ ## Salesforce-Specific Tips
77
+
78
+ - **Save org metadata before compacting** — Object/field lists, record type IDs, profile names
79
+ - **Save governor limit findings** — If you discovered limit issues, document them first
80
+ - **Save deployment results** — Deployment errors/warnings should be saved before compacting
81
+ - **Keep test results accessible** — Write failing test details to a file before compacting
82
+
83
+ ## Token Optimization Patterns
84
+
85
+ ### Trigger-Table Lazy Loading
86
+
87
+ > **Note:** This is an aspirational optimization pattern -- SCC currently loads skills based on frontmatter triggers, not a runtime lazy-loading table.
88
+
89
+ Instead of loading full skill content at session start, use a trigger table that maps keywords to skill paths. Skills load only when triggered, reducing baseline context by 50%+:
90
+
91
+ | Trigger Keywords | Skill | Load When |
92
+ |---------|-------|-----------|
93
+ | "test", "tdd", "coverage" | sf-apex-testing | User mentions testing |
94
+ | "security", "sharing", "crud" | sf-security | Security-related work |
95
+ | "deploy", "scratch org", "ci" | sf-deployment | Deployment context |
96
+ | "soql", "query", "selectivity" | sf-soql-optimization | Query optimization |
97
+ | "trigger", "handler", "fflib" | sf-trigger-frameworks | Trigger development |
98
+
99
+ ### Context Composition Awareness
100
+
101
+ Monitor what consumes your context window:
102
+
103
+ - **CLAUDE.md files** — Always loaded, keep lean
104
+ - **Loaded skills** — Each skill adds 1-5K tokens; SCC has 58 skills
105
+ - **Conversation history** — Grows with each exchange
106
+ - **Tool results** — File reads, SOQL results, test output add bulk
107
+ - **Rules** — Always-on guidelines consume baseline context
108
+
109
+ ### Duplicate Instruction Detection
110
+
111
+ Common sources of duplicate context in SCC projects:
112
+
113
+ - Skills that repeat CLAUDE.md instructions
114
+ - Multiple skills covering overlapping domains (e.g., security guidance in both `sf-security` and `sf-governor-limits` skills)
115
+ - Agent descriptions that duplicate skill content
116
+
117
+ ## Save-Before-Compact Examples
118
+
119
+ Before compacting, write critical context to files so it survives:
120
+
121
+ ### Save Org Metadata
122
+
123
+ ```bash
124
+ # Save field list for target object
125
+ sf sobject describe --sobject Account --json > .claude/org-context/account-fields.json
126
+
127
+ # Save record type IDs
128
+ sf data query --query "SELECT Id, Name, DeveloperName FROM RecordType WHERE SobjectType = 'Account'" --json > .claude/org-context/record-types.json
129
+ ```
130
+
131
+ ### Save Investigation Findings
132
+
133
+ ```markdown
134
+ <!-- .claude/session-notes.md — write before compacting -->
135
+ ## Governor Limit Findings (2026-03-24)
136
+ - AccountTriggerHandler.cls line 45: SOQL in loop (CRITICAL)
137
+ - OrderService.cls: 3 DML statements could be combined (MEDIUM)
138
+ - Coverage: AccountService 82%, OrderService 61% (needs work)
139
+
140
+ ## Deployment Blockers
141
+ - Missing field: Account.Risk_Category__c not in target org
142
+ - Flow "Auto Case Assignment" references deleted queue
143
+ ```
144
+
145
+ ### Save Test Results
146
+
147
+ ```markdown
148
+ <!-- .claude/test-results.md -->
149
+ ## Last Test Run
150
+ - 142/145 passing
151
+ - Failed: OrderServiceTest.shouldHandleBulkUpdate (NPE at line 89)
152
+ - Failed: CaseTriggerTest.shouldEscalateHighPriority (assertion at line 34)
153
+ - Failed: IntegrationTest.shouldCallExternalAPI (callout not mocked)
154
+ - Coverage: 78% org-wide
155
+ ```
156
+
157
+ ## Multi-Session Continuity
158
+
159
+ For work spanning multiple sessions, use compact + session commands:
160
+
161
+ ```
162
+ Session 1: Plan feature
163
+ +-- /save-session -> saves plan, org context, findings
164
+ +-- /compact -> clean slate
165
+
166
+ Session 2: Implement Apex
167
+ +-- /resume-session -> restores plan context
168
+ +-- [implement Apex classes]
169
+ +-- /save-session -> saves implementation state
170
+ +-- /compact
171
+
172
+ Session 3: Implement LWC + Deploy
173
+ +-- /resume-session -> restores implementation context
174
+ +-- [build LWC, deploy, verify]
175
+ ```
176
+
177
+ ## Large Project Handling
178
+
179
+ For projects with 100K+ lines of code:
180
+
181
+ - **Don't read entire codebase** — Use Grep/Glob to find specific files
182
+ - **Use codemaps** — `deep-researcher` agent creates navigable index without loading full files
183
+ - **Compact aggressively between features** — Each feature is a fresh context
184
+ - **Save architecture notes to files** — Don't rely on conversation memory for class relationships
185
+ - **Use agents for parallel investigation** — Subagents have their own context windows
186
+
187
+ ## Approximate Token Costs (as of the current API version per @../_reference/API_VERSIONS.md — may vary with model and encoding)
188
+
189
+ | Content Type | Approximate Tokens | Notes |
190
+ |-------------|-------------------|-------|
191
+ | CLAUDE.md | 2-5K | Always loaded |
192
+ | Each rule file | 500-2K | All active rules loaded |
193
+ | Each loaded skill | 1-5K | Loaded on demand |
194
+ | Apex class (500 lines) | 3-5K | When Read tool is used |
195
+ | LWC component (3 files) | 2-4K | HTML + JS + CSS |
196
+ | SOQL query result (100 rows) | 2-8K | Depends on field count |
197
+ | Test output (full suite) | 5-15K | Use `--result-format human` to reduce |
198
+ | Debug log (1000 lines) | 8-15K | Filter with `--log-level WARN` |
199
+
200
+ ## Related
201
+
202
+ - `suggest-compact.js` hook — Automatic compaction suggestions
203
+ - `/save-session` and `/resume-session` — State that survives compaction
204
+ - `sf-debugging` skill — Debug context preservation
205
+ - `learning-engine` agent — Extracts patterns before session ends
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: update-docs
3
+ description: >-
4
+ Use when syncing documentation after Salesforce Apex code changes. Update README, API docs, and deploy metadata references to match the current org codebase.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Update Docs — Synchronize Documentation with Codebase
9
+
10
+ Synchronize documentation with the current state of the Salesforce codebase. Scans metadata, extracts project structure, and updates documentation files.
11
+
12
+ ## When to Use
13
+
14
+ - After making code changes that affect the project structure or API surface
15
+ - When new Apex classes, triggers, LWC components, or flows have been added or removed
16
+ - When deployment steps or prerequisites have changed
17
+ - To check for stale documentation that hasn't been updated in 90+ days
18
+ - When regenerating API documentation for `@RestResource`, `@AuraEnabled`, or `@InvocableMethod` classes
19
+
20
+ ## Workflow
21
+
22
+ ### Step 1 — Scan Project Metadata
23
+
24
+ Read project configuration to understand the tech stack:
25
+
26
+ ```bash
27
+ # Core project config
28
+ cat sfdx-project.json
29
+
30
+ # Package dependencies
31
+ cat sfdx-project.json | grep -A5 "packageDirectories"
32
+
33
+ # Node.js tooling
34
+ cat package.json 2>/dev/null | grep -A10 '"scripts"'
35
+ ```
36
+
37
+ ### Step 2 — Inventory Source Components
38
+
39
+ Count and categorize all Salesforce metadata:
40
+
41
+ ```bash
42
+ # Apex classes
43
+ find force-app -name "*.cls" -not -name "*Test.cls" | wc -l
44
+
45
+ # Apex test classes
46
+ find force-app -name "*Test.cls" | wc -l
47
+
48
+ # Apex triggers
49
+ find force-app -name "*.trigger" | wc -l
50
+
51
+ # LWC components
52
+ find force-app -path "*/lwc/*/*.js" | wc -l
53
+
54
+ # Custom objects
55
+ find force-app -name "*.object-meta.xml" | wc -l
56
+
57
+ # Flows
58
+ find force-app -name "*.flow-meta.xml" | wc -l
59
+
60
+ # Permission sets
61
+ find force-app -name "*.permissionset-meta.xml" | wc -l
62
+ ```
63
+
64
+ ### Step 3 — Update README Sections
65
+
66
+ Update these sections with `<!-- AUTO-GENERATED-START -->` / `<!-- AUTO-GENERATED-END -->` markers:
67
+
68
+ **Project Structure:**
69
+
70
+ ```markdown
71
+ ## Project Structure
72
+
73
+ | Component | Count | Location |
74
+ |-----------|-------|----------|
75
+ | Apex Classes | 45 | `force-app/main/default/classes/` |
76
+ | Apex Triggers | 8 | `force-app/main/default/triggers/` |
77
+ | Test Classes | 32 | `force-app/main/default/classes/*Test.cls` |
78
+ | LWC Components | 12 | `force-app/main/default/lwc/` |
79
+ | Custom Objects | 15 | `force-app/main/default/objects/` |
80
+ | Flows | 6 | `force-app/main/default/flows/` |
81
+ ```
82
+
83
+ **Setup Instructions:**
84
+
85
+ - Scratch org creation command from `config/project-scratch-def.json`
86
+ - Data seeding scripts if present
87
+ - Permission set assignments
88
+
89
+ **Available Commands:**
90
+
91
+ - List custom SF CLI commands from `package.json` scripts
92
+ - Document any custom sfdx plugins
93
+
94
+ ### Step 4 — Generate API Documentation
95
+
96
+ For classes with `@RestResource`, `@AuraEnabled`, or `@InvocableMethod`:
97
+
98
+ ```markdown
99
+ ## API Endpoints
100
+
101
+ ### AccountController (@RestResource)
102
+ - `GET /services/apexrest/accounts` — List accounts
103
+ - `POST /services/apexrest/accounts` — Create account
104
+
105
+ ### AccountService (@AuraEnabled methods)
106
+ - `getAccountDetails(Id accountId)` — Returns account with contacts
107
+ - `updateAccountStatus(Id accountId, String status)` — Updates status
108
+ ```
109
+
110
+ ### Step 5 — Generate Deployment Guide
111
+
112
+ Create or update deployment documentation:
113
+
114
+ ```markdown
115
+ ## Deployment Guide
116
+
117
+ ### Prerequisites
118
+ - SF CLI v2.x installed
119
+ - Target org authenticated: `sf org login web --alias <alias>`
120
+
121
+ ### Deploy Steps
122
+ 1. Validate: `sf project deploy validate --target-org <alias> --test-level RunLocalTests`
123
+ 2. Deploy: `sf project deploy start --target-org <alias> --test-level RunLocalTests`
124
+
125
+ ### Metadata Dependencies
126
+ `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.
127
+ ```
128
+
129
+ ### Step 6 — Check Staleness
130
+
131
+ Flag documentation files not updated in 90+ days:
132
+
133
+ ```bash
134
+ find . -name "README.md" -o -name "CONTRIBUTING.md" -o -name "*.md" -path "*/docs/*" | while read f; do
135
+ last_modified=$(git log -1 --format=%ai -- "$f" 2>/dev/null)
136
+ if [ -n "$last_modified" ]; then
137
+ 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)
138
+ days=$(( ($(date +%s) - $last_epoch) / 86400 ))
139
+ if [ "$days" -gt 90 ]; then echo "STALE ($days days): $f"; fi
140
+ fi
141
+ done
142
+ ```
143
+
144
+ ### Step 7 — Verify Auto-Generated Markers
145
+
146
+ 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.
147
+
148
+ ## Rules
149
+
150
+ - Only update sections between auto-generated markers
151
+ - Never overwrite manually-written content
152
+ - Always show a diff before writing changes
153
+ - Preserve existing formatting and style of the document
154
+
155
+ ## Examples
156
+
157
+ ```
158
+ /update-docs
159
+ /update-docs Sync the README with the new Agentforce integration feature
160
+ /update-docs Regenerate API documentation for all @RestResource classes
161
+ /update-docs Check for stale documentation and suggest updates
162
+ ```
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: update-platform-docs
3
+ description: >-
4
+ 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.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Update Platform Reference Docs
9
+
10
+ ## When to Use
11
+
12
+ - When the SessionStart hook warns that platform docs are outdated (>4 months since last verified)
13
+ - When a new Salesforce release has shipped (Spring, Summer, or Winter)
14
+ - When you hear about new Salesforce feature deprecations or retirements
15
+
16
+ ## Files to Update
17
+
18
+ Two reference files in `skills/_reference/`:
19
+
20
+ 1. **API_VERSIONS.md** — Release feature tracker (24-month rolling window)
21
+ 2. **DEPRECATIONS.md** — Retired features, upcoming retirements, naming changes (cumulative)
22
+
23
+ ## Update Procedure
24
+
25
+ ### Step 1 — Research current release
26
+
27
+ WebSearch for the latest Salesforce release information:
28
+
29
+ ```
30
+ Search: "Salesforce [Season] '[Year] release notes new features developer site:developer.salesforce.com"
31
+ Search: "Salesforce [Season] '[Year] release highlights"
32
+ ```
33
+
34
+ ### Step 2 — Research deprecations
35
+
36
+ WebSearch for deprecation and retirement announcements:
37
+
38
+ ```
39
+ Search: "Salesforce feature retirements [current year] site:help.salesforce.com"
40
+ Search: "Salesforce deprecated features [current year]"
41
+ ```
42
+
43
+ ### Step 3 — Update API_VERSIONS.md
44
+
45
+ 1. Read current `skills/_reference/API_VERSIONS.md`
46
+ 2. Add new release section at TOP with `Added: YYYY-MM` tag
47
+ 3. Include all new GA features, Beta features (marked clearly), and breaking changes
48
+ 4. Remove any sections where `Added:` date is older than 24 months
49
+ 5. Update the "Last verified" date
50
+ 6. Update "Current" label to point to the new release
51
+
52
+ ### Step 4 — Update DEPRECATIONS.md
53
+
54
+ 1. Read current `skills/_reference/DEPRECATIONS.md`
55
+ 2. Append any NEW deprecation entries with `Added: YYYY-MM` tag
56
+ 3. Move "Retiring Soon" entries to "Already Retired" if retirement date has passed
57
+ 4. Remove entries where `Added:` date is older than 24 months (exception: keep "Retiring Soon" entries until retirement date + 24 months)
58
+ 5. Check for new product renames and add them
59
+ 6. Update Beta feature status (promote to GA if applicable, remove if GA'd >24 months ago)
60
+ 7. Update the "Last verified" date
61
+
62
+ ### Step 5 — Verify
63
+
64
+ After updating, confirm changes:
65
+
66
+ ```bash
67
+ # Check no v62.0 or other old version references leaked back
68
+ grep -r "old_version" skills/_reference/API_VERSIONS.md skills/_reference/DEPRECATIONS.md
69
+
70
+ # Run CI validation
71
+ node scripts/ci/validate-skills.js
72
+ ```
73
+
74
+ ## Important Rules
75
+
76
+ - Releases and deprecations are INDEPENDENT — a new release does NOT deprecate the previous one
77
+ - Every entry gets an `Added: YYYY-MM` tag for 24-month retention tracking
78
+ - Beta features must be clearly marked as "Beta" or "Pilot" with "do NOT use in production"
79
+ - Use current product names (see Product Renames table in DEPRECATIONS.md)
80
+ - Only add information verified from official Salesforce sources (developer.salesforce.com, help.salesforce.com)
81
+
82
+ ## Related
83
+
84
+ - **Hook**: `check-platform-docs-age.js` — SessionStart hook that triggers this skill's warning
85
+ - **Reference**: `@../_reference/API_VERSIONS.md` — Feature tracker
86
+ - **Reference**: `@../_reference/DEPRECATIONS.md` — Deprecation guard
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "salesforce-claude-code",
3
+ "version": "1.1.0",
4
+ "description": "Production-ready AI agents, skills, and hooks for Salesforce development",
5
+ "author": {
6
+ "name": "Jiten Singh",
7
+ "email": "jitencseng@gmail.com"
8
+ },
9
+ "homepage": "https://github.com/jiten-singh-shahi/salesforce-claude-code",
10
+ "repository": "https://github.com/jiten-singh-shahi/salesforce-claude-code",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "salesforce",
14
+ "apex",
15
+ "lwc",
16
+ "soql",
17
+ "agentforce",
18
+ "sf-cli",
19
+ "devops"
20
+ ],
21
+ "logo": "assets/logo.svg",
22
+ "skills": ".cursor/skills/",
23
+ "agents": ".cursor/agents/",
24
+ "hooks": ".cursor/hooks.json",
25
+ "mcpServers": "./mcp-configs/mcp-servers.json"
26
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jitendra Singh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.