opencode-skills-collection 4.0.41 → 4.0.43
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.
- package/bundled-skills/.antigravity-install-manifest.json +5 -2
- package/bundled-skills/animejs-animation/SKILL.md +1 -1
- package/bundled-skills/anti-ui-slop/SKILL.md +51 -86
- package/bundled-skills/antigravity-design-expert/SKILL.md +1 -1
- package/bundled-skills/design-spells/SKILL.md +1 -1
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/famulor-skill/SKILL.md +132 -0
- package/bundled-skills/famulor-skill/references/assistant-design.md +137 -0
- package/bundled-skills/famulor-skill/references/toolsets/assistants.md +64 -0
- package/bundled-skills/famulor-skill/references/toolsets/automations.md +36 -0
- package/bundled-skills/famulor-skill/references/toolsets/billing.md +15 -0
- package/bundled-skills/famulor-skill/references/toolsets/calls.md +23 -0
- package/bundled-skills/famulor-skill/references/toolsets/campaigns.md +42 -0
- package/bundled-skills/famulor-skill/references/toolsets/dashboards.md +27 -0
- package/bundled-skills/famulor-skill/references/toolsets/knowledge.md +28 -0
- package/bundled-skills/famulor-skill/references/toolsets/messaging.md +52 -0
- package/bundled-skills/famulor-skill/references/toolsets/migration.md +10 -0
- package/bundled-skills/famulor-skill/references/toolsets/platform.md +14 -0
- package/bundled-skills/famulor-skill/references/toolsets/settings.md +28 -0
- package/bundled-skills/famulor-skill/references/toolsets/tasks.md +12 -0
- package/bundled-skills/famulor-skill/references/toolsets/telephony.md +35 -0
- package/bundled-skills/iconsax-library/SKILL.md +1 -1
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/lore/SKILL.md +104 -298
- package/bundled-skills/lore/references/audit-template.md +21 -4
- package/bundled-skills/lore/references/compatibility.md +51 -121
- package/bundled-skills/lore/references/config.md +22 -23
- package/bundled-skills/lore/references/entry-format.md +33 -3
- package/bundled-skills/lore/references/history-command.md +98 -2
- package/bundled-skills/lore/references/platform-mirrors.md +45 -16
- package/bundled-skills/lore/references/stale-new-markers.md +10 -8
- package/bundled-skills/lore/references/summary-template.md +8 -1
- package/bundled-skills/lore/references/workflows.md +192 -0
- package/bundled-skills/lore/scripts/README.md +14 -13
- package/bundled-skills/lore/scripts/README.zh-CN.md +14 -13
- package/bundled-skills/lore/scripts/find_duplicates.py +14 -4
- package/bundled-skills/lore/scripts/find_stale.py +68 -16
- package/bundled-skills/lore/scripts/history.py +235 -23
- package/bundled-skills/lore/scripts/id_hash.py +7 -4
- package/bundled-skills/lore/scripts/list_entries.py +82 -13
- package/bundled-skills/magic-animator/SKILL.md +1 -1
- package/bundled-skills/magic-ui-generator/SKILL.md +1 -1
- package/bundled-skills/poka-yoke/SKILL.md +172 -0
- package/bundled-skills/project-state-governor/SKILL.md +483 -0
- package/bundled-skills/project-state-governor/references/manifest-routing.md +47 -0
- package/bundled-skills/project-state-governor/references/persistence-lifecycle.md +93 -0
- package/bundled-skills/project-state-governor/references/project-state-schema.md +173 -0
- package/bundled-skills/project-state-governor/references/reconstruction-workflow.md +183 -0
- package/bundled-skills/salesforce-development/SKILL.md +107 -37
- package/bundled-skills/spec-driven-loop/SKILL.md +203 -0
- package/bundled-skills/spec-driven-loop/references/agent-and-judge-contracts.md +120 -0
- package/bundled-skills/spec-driven-loop/references/document-templates.md +184 -0
- package/bundled-skills/unsplash-integration/SKILL.md +1 -1
- package/bundled-skills/vizcom/SKILL.md +1 -1
- package/bundled-skills/x-twitter-scraper/SKILL.md +20 -7
- package/package.json +1 -1
- package/skills_index.json +136 -36
- package/bundled-skills/lore/README.md +0 -386
- package/bundled-skills/lore/README.zh-CN.md +0 -386
- package/bundled-skills/lore/WORKFLOWS.md +0 -216
- package/bundled-skills/lore/WORKFLOWS.zh-CN.md +0 -216
- package/bundled-skills/uizze-ui-research/SKILL.md +0 -128
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Canonical Project-State Schema
|
|
2
|
+
|
|
3
|
+
Use the smallest structure that remains easy to load and reason about.
|
|
4
|
+
|
|
5
|
+
## Compact mode: `PROJECT_STATE.md`
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Project State
|
|
9
|
+
|
|
10
|
+
## Mission
|
|
11
|
+
[Why the project exists. Long-lived.]
|
|
12
|
+
|
|
13
|
+
## Success Criteria
|
|
14
|
+
[Owner-defined durable criteria for meaningful project success.]
|
|
15
|
+
|
|
16
|
+
## Current Phase
|
|
17
|
+
[Current engineering/product/research phase.]
|
|
18
|
+
|
|
19
|
+
## Active Workstreams
|
|
20
|
+
### [Workstream ID or name]
|
|
21
|
+
- Status: PLANNED | ACTIVE | BLOCKED | PAUSED | COMPLETED | CANCELLED
|
|
22
|
+
- Goal: ...
|
|
23
|
+
- DoD / exit condition: ...
|
|
24
|
+
- Current state: ...
|
|
25
|
+
- Next: ...
|
|
26
|
+
|
|
27
|
+
Keep terminal workstream records long enough to preserve verified `COMPLETED`
|
|
28
|
+
or `CANCELLED` transitions. During consolidation, compress old terminal
|
|
29
|
+
workstreams into decision-relevant milestone or project history only when their
|
|
30
|
+
detailed record no longer affects future work.
|
|
31
|
+
|
|
32
|
+
## Milestones
|
|
33
|
+
### [Milestone ID or name]
|
|
34
|
+
- Status: PROPOSED | ACTIVE | BLOCKED | PAUSED | DONE | CANCELLED | DEFERRED
|
|
35
|
+
- Goal: ...
|
|
36
|
+
- DoD: ...
|
|
37
|
+
- Parent: ...
|
|
38
|
+
- Next: ...
|
|
39
|
+
|
|
40
|
+
## Current Tasks
|
|
41
|
+
### [Task ID or name]
|
|
42
|
+
- Status: PROPOSED | ACTIVE | BLOCKED | DEFERRED | DONE | CANCELLED
|
|
43
|
+
- Goal: ...
|
|
44
|
+
- Task DoD: ...
|
|
45
|
+
- Parent: ...
|
|
46
|
+
- Evidence: ... [only when useful]
|
|
47
|
+
- Confidence: CONFIRMED | INFERRED | UNKNOWN [only when useful]
|
|
48
|
+
|
|
49
|
+
Keep terminal task records long enough to preserve the verified lifecycle transition. During consolidation, compress old `DONE` or `CANCELLED` tasks into decision-relevant milestone history when their detailed record no longer affects future work.
|
|
50
|
+
|
|
51
|
+
## Active Research / Experiments
|
|
52
|
+
### [Hypothesis or candidate ID]
|
|
53
|
+
- Status: PROPOSED | ACTIVE | SUPPORTED | REJECTED | INCONCLUSIVE | INVALIDATED | FORWARD_ONLY
|
|
54
|
+
- Hypothesis: ...
|
|
55
|
+
- Protocol / stage: ...
|
|
56
|
+
- Current evidence: ...
|
|
57
|
+
- Provenance: ... [experiment/manifest ID when material]
|
|
58
|
+
- Next authorized step: ...
|
|
59
|
+
|
|
60
|
+
## Decisions
|
|
61
|
+
### [Decision ID or concise title]
|
|
62
|
+
- Decision: ...
|
|
63
|
+
- Rationale: ...
|
|
64
|
+
- Authority / provenance: ... [when material]
|
|
65
|
+
|
|
66
|
+
## Constraints / Invariants
|
|
67
|
+
- ...
|
|
68
|
+
|
|
69
|
+
## Known Issues / Blockers
|
|
70
|
+
- ...
|
|
71
|
+
|
|
72
|
+
## Deferred Work
|
|
73
|
+
- ...
|
|
74
|
+
|
|
75
|
+
## Negative Evidence / Rejected Directions
|
|
76
|
+
- [what] — [why] — [evidence] — [permanent or conditional]
|
|
77
|
+
|
|
78
|
+
## Lessons / Pitfalls
|
|
79
|
+
- [validated recurring mistake or owner correction worth preserving]
|
|
80
|
+
|
|
81
|
+
## Recent Milestones
|
|
82
|
+
- [date/commit only when useful] ...
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Scaled mode
|
|
86
|
+
|
|
87
|
+
Use only when compact mode causes context bloat or unrelated subsystem loading.
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
.project/
|
|
91
|
+
MANIFEST.md
|
|
92
|
+
STATE.md
|
|
93
|
+
DECISIONS.md
|
|
94
|
+
CONSTRAINTS.md
|
|
95
|
+
NEGATIVE_EVIDENCE.md
|
|
96
|
+
areas/
|
|
97
|
+
<subsystem>.md
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### `.project/MANIFEST.md`
|
|
101
|
+
Keep it short. It is the routing index, not a summary dump.
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
# Project Memory Manifest
|
|
105
|
+
|
|
106
|
+
## Read First
|
|
107
|
+
- STATE.md — mission, phase, current workstreams and tasks, recent terminal transitions, blockers, next actions
|
|
108
|
+
|
|
109
|
+
## Read When Relevant
|
|
110
|
+
- DECISIONS.md — durable owner/project decisions
|
|
111
|
+
- CONSTRAINTS.md — technical/business/research invariants
|
|
112
|
+
- NEGATIVE_EVIDENCE.md — costly rejected directions and important lessons
|
|
113
|
+
- areas/execution.md — execution subsystem state
|
|
114
|
+
- areas/research.md — research subsystem state
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### `.project/STATE.md`
|
|
118
|
+
Contain mission, success criteria, phase, current workstreams, milestones,
|
|
119
|
+
current tasks, recent terminal transitions, blockers, and next direction. Keep
|
|
120
|
+
it sufficient for a fast cold start.
|
|
121
|
+
|
|
122
|
+
Apply the compact-mode terminal retention rules in scaled mode too. Keep
|
|
123
|
+
verified `COMPLETED` or `CANCELLED` workstreams and `DONE` or `CANCELLED`
|
|
124
|
+
tasks until consolidation can compress them into decision-relevant milestone
|
|
125
|
+
or project history without losing information that still affects future work.
|
|
126
|
+
|
|
127
|
+
### `DECISIONS.md`
|
|
128
|
+
Store only durable decisions that materially constrain future work.
|
|
129
|
+
|
|
130
|
+
### `CONSTRAINTS.md`
|
|
131
|
+
Store only constraints/invariants future agents must respect.
|
|
132
|
+
|
|
133
|
+
### `NEGATIVE_EVIDENCE.md`
|
|
134
|
+
Store concise costly failures, rejected directions, and validated lessons likely to prevent repeated work.
|
|
135
|
+
|
|
136
|
+
### `areas/*.md`
|
|
137
|
+
Use only for large independent subsystems. Do not duplicate global mission or global decisions inside area files.
|
|
138
|
+
|
|
139
|
+
## Provenance rule
|
|
140
|
+
|
|
141
|
+
Add provenance only when it materially improves trust. Prefer concise references:
|
|
142
|
+
|
|
143
|
+
- owner decision / issue ID;
|
|
144
|
+
- commit SHA;
|
|
145
|
+
- test name/result;
|
|
146
|
+
- contract/schema path;
|
|
147
|
+
- experiment or manifest ID.
|
|
148
|
+
|
|
149
|
+
## Confidence rule
|
|
150
|
+
|
|
151
|
+
Use:
|
|
152
|
+
|
|
153
|
+
- `CONFIRMED` for directly supported authoritative facts;
|
|
154
|
+
- `INFERRED` for provisional interpretation;
|
|
155
|
+
- `UNKNOWN` when evidence is insufficient.
|
|
156
|
+
|
|
157
|
+
Do not represent `INFERRED` as settled truth.
|
|
158
|
+
|
|
159
|
+
## Completion hierarchy
|
|
160
|
+
|
|
161
|
+
Track completion at the correct level:
|
|
162
|
+
|
|
163
|
+
- Session DoD
|
|
164
|
+
- Task DoD
|
|
165
|
+
- Milestone DoD
|
|
166
|
+
- Workstream DoD
|
|
167
|
+
- Mission success criteria
|
|
168
|
+
|
|
169
|
+
A child completing does not automatically complete its parent.
|
|
170
|
+
|
|
171
|
+
## Compression rule
|
|
172
|
+
|
|
173
|
+
When state grows, remove or compress detail that is no longer decision-relevant. Git is the historical archive.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Repository State Reconstruction Workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow when a repository contains conflicting historical reviews, plans, TODOs, status notes, GPT summaries, branch-specific docs, or unclear progress.
|
|
4
|
+
|
|
5
|
+
## 1. Establish scope and authority
|
|
6
|
+
|
|
7
|
+
Identify:
|
|
8
|
+
|
|
9
|
+
- repository and target branch;
|
|
10
|
+
- owner-requested cleanup boundary;
|
|
11
|
+
- candidate paths and their complete instruction scope: include the candidate itself when it is an existing directory, otherwise stop at its parent; for recursive directory operations, discover every nested `AGENTS.md` in the affected subtree before inspecting or mutating it;
|
|
12
|
+
- compact vs scaled canonical-state mode;
|
|
13
|
+
- whether deletion is explicitly authorized or only recommendations are allowed.
|
|
14
|
+
|
|
15
|
+
Do not expand into unrelated feature work.
|
|
16
|
+
|
|
17
|
+
Before inspecting, writing, moving, or deleting a candidate path, resolve its full `AGENTS.md` chain. Apply deeper rules only to their governed subtree, and do not let a repository-level cleanup instruction override a more specific local constraint.
|
|
18
|
+
|
|
19
|
+
## 2. Inventory candidate state documents
|
|
20
|
+
|
|
21
|
+
Find files likely to contain project state:
|
|
22
|
+
|
|
23
|
+
- plans/TODOs;
|
|
24
|
+
- reviews/audits;
|
|
25
|
+
- implementation summaries;
|
|
26
|
+
- status/progress/handoff docs;
|
|
27
|
+
- research manifests and decision records;
|
|
28
|
+
- GPT-generated summaries;
|
|
29
|
+
- branch-specific notes.
|
|
30
|
+
|
|
31
|
+
Do not assume every Markdown file is status documentation.
|
|
32
|
+
|
|
33
|
+
Classify each file initially as:
|
|
34
|
+
|
|
35
|
+
- `AUTHORITATIVE`;
|
|
36
|
+
- `CURRENT_SUPPORTING`;
|
|
37
|
+
- `HISTORICAL`;
|
|
38
|
+
- `DUPLICATE`;
|
|
39
|
+
- `STALE`;
|
|
40
|
+
- `CONTRADICTORY`;
|
|
41
|
+
- `GENERATED_TEMPORARY`;
|
|
42
|
+
- `UNKNOWN`.
|
|
43
|
+
|
|
44
|
+
## 3. Extract claims, not prose
|
|
45
|
+
|
|
46
|
+
Extract only material claims affecting current state:
|
|
47
|
+
|
|
48
|
+
- mission/success criteria;
|
|
49
|
+
- completion claims and DoD;
|
|
50
|
+
- active tasks/workstreams;
|
|
51
|
+
- decisions/constraints;
|
|
52
|
+
- blockers;
|
|
53
|
+
- research state/results;
|
|
54
|
+
- rejected directions/lessons;
|
|
55
|
+
- branch assumptions.
|
|
56
|
+
|
|
57
|
+
Ignore rhetorical explanation and conversation chronology unless needed as provenance.
|
|
58
|
+
|
|
59
|
+
## 4. Verify each material claim
|
|
60
|
+
|
|
61
|
+
Inspect only the code, tests, contracts, commits, configuration, and history necessary to evaluate claims.
|
|
62
|
+
|
|
63
|
+
Classify claims:
|
|
64
|
+
|
|
65
|
+
- `CURRENT_CONFIRMED`: supported by authoritative evidence;
|
|
66
|
+
- `CURRENT_INFERRED`: plausible but not directly authoritative;
|
|
67
|
+
- `SUPERSEDED`: once true, now replaced;
|
|
68
|
+
- `FALSE`: contradicted by higher-authority evidence;
|
|
69
|
+
- `CONFLICTED`: multiple legitimate interpretations remain;
|
|
70
|
+
- `UNKNOWN`: insufficient evidence.
|
|
71
|
+
|
|
72
|
+
Never use current code as automatic proof of intended semantics.
|
|
73
|
+
Never promote `CURRENT_INFERRED` to settled truth without justification.
|
|
74
|
+
|
|
75
|
+
## 5. Verify completion at the correct level
|
|
76
|
+
|
|
77
|
+
For each completion claim, distinguish:
|
|
78
|
+
|
|
79
|
+
- session completion;
|
|
80
|
+
- task completion;
|
|
81
|
+
- milestone completion;
|
|
82
|
+
- workstream completion;
|
|
83
|
+
- mission success.
|
|
84
|
+
|
|
85
|
+
Reject parent-level completion claims supported only by child-level evidence.
|
|
86
|
+
|
|
87
|
+
## 6. Resolve conflict type
|
|
88
|
+
|
|
89
|
+
### OBSOLETE_HISTORY
|
|
90
|
+
Statement was once valid but superseded. Keep only current canonical state.
|
|
91
|
+
|
|
92
|
+
### IMPLEMENTATION_DRIFT
|
|
93
|
+
Code and intended requirement differ. Determine which violates higher authority.
|
|
94
|
+
|
|
95
|
+
### UNRESOLVED_BUSINESS_CONFLICT
|
|
96
|
+
Multiple legitimate outcomes remain. Escalate the smallest owner decision.
|
|
97
|
+
|
|
98
|
+
### FALSE_OR_UNSUPPORTED_HISTORY
|
|
99
|
+
Review/AI output was never established. Do not preserve as truth.
|
|
100
|
+
|
|
101
|
+
### BRANCH_DIVERGENCE
|
|
102
|
+
Branches reflect different states. Keep them distinct until merge/authority is resolved.
|
|
103
|
+
|
|
104
|
+
## 7. Rebuild canonical state
|
|
105
|
+
|
|
106
|
+
Use `project-state-schema.md`.
|
|
107
|
+
|
|
108
|
+
Rules:
|
|
109
|
+
|
|
110
|
+
- preserve current durable state only;
|
|
111
|
+
- preserve concise high-value negative evidence and lessons;
|
|
112
|
+
- represent unresolved ambiguity explicitly;
|
|
113
|
+
- attach provenance/confidence only where material;
|
|
114
|
+
- do not copy whole historical documents;
|
|
115
|
+
- do not create an append-only archive;
|
|
116
|
+
- choose compact mode unless scaled routing clearly improves retrieval.
|
|
117
|
+
|
|
118
|
+
## 8. Build a staged cleanup set
|
|
119
|
+
|
|
120
|
+
For each old document choose:
|
|
121
|
+
|
|
122
|
+
- `KEEP`: independent stable purpose remains;
|
|
123
|
+
- `MERGE_THEN_DELETE`: unique durable content must enter canonical state first;
|
|
124
|
+
- `DELETE`: redundant/stale/generated with no unique required content;
|
|
125
|
+
- `OWNER_DECISION`: significance or deletion authority is genuinely uncertain.
|
|
126
|
+
|
|
127
|
+
Never delete first and reconcile later.
|
|
128
|
+
|
|
129
|
+
If broad deletion was not explicitly authorized, present this cleanup set for owner review before applying destructive changes.
|
|
130
|
+
|
|
131
|
+
## 9. Apply authorized cleanup
|
|
132
|
+
|
|
133
|
+
When authorized:
|
|
134
|
+
|
|
135
|
+
- update canonical state;
|
|
136
|
+
- remove obsolete redundant status files;
|
|
137
|
+
- preserve legitimate technical/public docs;
|
|
138
|
+
- avoid unrelated code edits;
|
|
139
|
+
- keep branch-specific facts branch-specific;
|
|
140
|
+
- ensure secrets/sensitive data are not copied into canonical state.
|
|
141
|
+
|
|
142
|
+
## 10. Consolidate
|
|
143
|
+
|
|
144
|
+
After reconstruction:
|
|
145
|
+
|
|
146
|
+
- remove duplicate canonical facts;
|
|
147
|
+
- compress low-value completed history;
|
|
148
|
+
- retain important decisions, constraints, negative evidence, and lessons;
|
|
149
|
+
- update MANIFEST if scaled mode is used.
|
|
150
|
+
|
|
151
|
+
## 11. Verify
|
|
152
|
+
|
|
153
|
+
Before declaring reconstruction complete, verify:
|
|
154
|
+
|
|
155
|
+
- canonical state is internally consistent;
|
|
156
|
+
- active tasks are actually open;
|
|
157
|
+
- completion claims match the correct DoD level;
|
|
158
|
+
- key decisions/constraints are represented;
|
|
159
|
+
- meaningful negative evidence is preserved;
|
|
160
|
+
- stale status docs no longer compete as sources of truth;
|
|
161
|
+
- no unique required information was lost;
|
|
162
|
+
- branch scope is represented correctly;
|
|
163
|
+
- provenance/confidence caveats are accurate;
|
|
164
|
+
- canonical state contains no exposed secrets copied during cleanup.
|
|
165
|
+
|
|
166
|
+
## 12. Report
|
|
167
|
+
|
|
168
|
+
Return only:
|
|
169
|
+
|
|
170
|
+
### Project State Changes
|
|
171
|
+
What became canonical or changed status.
|
|
172
|
+
|
|
173
|
+
### Current Focus
|
|
174
|
+
Resulting active workstream/task/research direction.
|
|
175
|
+
|
|
176
|
+
### Remaining Blockers / Decisions
|
|
177
|
+
Only unresolved items requiring action.
|
|
178
|
+
|
|
179
|
+
### Documentation Actions
|
|
180
|
+
Files kept, staged, merged/deleted, or awaiting owner review.
|
|
181
|
+
|
|
182
|
+
### Evidence Notes
|
|
183
|
+
Only material provenance/confidence caveats.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: salesforce-development
|
|
3
3
|
description: Expert patterns for Salesforce platform development including
|
|
4
|
-
Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs,
|
|
5
|
-
Connected Apps, and Salesforce DX with scratch orgs and 2nd generation
|
|
4
|
+
Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, External Client Apps, and Salesforce DX with scratch orgs and 2nd generation
|
|
6
5
|
packages (2GP).
|
|
7
6
|
risk: safe
|
|
8
7
|
source: vibeship-spawner-skills (Apache 2.0)
|
|
@@ -12,8 +11,75 @@ date_added: 2026-02-27
|
|
|
12
11
|
# Salesforce Development
|
|
13
12
|
|
|
14
13
|
Expert patterns for Salesforce platform development including Lightning Web
|
|
15
|
-
Components (LWC), Apex triggers and classes, REST/Bulk APIs,
|
|
16
|
-
|
|
14
|
+
Components (LWC), Apex triggers and classes, REST/Bulk APIs, External Client Apps, and Salesforce DX with scratch orgs and 2nd generation packages (2GP).
|
|
15
|
+
|
|
16
|
+
## Modern Architecture Guidance
|
|
17
|
+
|
|
18
|
+
### Security and User Mode
|
|
19
|
+
|
|
20
|
+
For current Apex development, make the intended data-access mode explicit.
|
|
21
|
+
|
|
22
|
+
- Prefer `WITH USER_MODE` for SOQL/SOSL that should enforce the running user's object permissions, FLS, sharing, and other supported security controls.
|
|
23
|
+
- Use user-mode DML or `Database` methods when the operation should enforce user permissions.
|
|
24
|
+
- Use system mode only when elevated access is intentional and justified.
|
|
25
|
+
- `WITH SECURITY_ENFORCED` is legacy guidance and should not be used for new API 67.0+ code.
|
|
26
|
+
- API 67.0 changes the platform defaults for database operations and class sharing, so do not assume older API-version behavior applies to newer code.
|
|
27
|
+
|
|
28
|
+
### Integration Pattern Selection
|
|
29
|
+
|
|
30
|
+
Choose an integration pattern based on latency, volume, ownership, and reliability requirements:
|
|
31
|
+
|
|
32
|
+
| Requirement | Preferred pattern |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| Synchronous request/response | REST or Composite API |
|
|
35
|
+
| Large asynchronous data movement | Bulk API 2.0 |
|
|
36
|
+
| Publish business events | Platform Events |
|
|
37
|
+
| Detect Salesforce record changes | Change Data Capture |
|
|
38
|
+
| High-scale event consumption | Pub/Sub API |
|
|
39
|
+
| Salesforce outbound authentication | Named Credentials / External Credential |
|
|
40
|
+
| New OAuth client configuration | External Client App |
|
|
41
|
+
|
|
42
|
+
Do not select an API only because a record-count threshold is crossed. Evaluate data volume, latency, transaction boundaries, retry behavior, error handling, and monitoring.
|
|
43
|
+
|
|
44
|
+
### Event-Driven Integration
|
|
45
|
+
|
|
46
|
+
Prefer events over continuous polling when the platform and integration support it.
|
|
47
|
+
|
|
48
|
+
Bulk API 2.0 supports event-driven job status and result notifications through Pub/Sub API, including partial query results. Use polling only when event-driven processing is unavailable or unnecessary.
|
|
49
|
+
|
|
50
|
+
For asynchronous external calls, design for idempotency. A timeout does not prove that the remote operation failed; retrying a non-idempotent request can create duplicates.
|
|
51
|
+
|
|
52
|
+
Use a stable idempotency key when the receiving system supports it.
|
|
53
|
+
|
|
54
|
+
### Authentication
|
|
55
|
+
|
|
56
|
+
For new Salesforce API integrations, prefer External Client Apps. Existing Connected Apps can continue to operate, but new Connected App creation is restricted from Spring '26.
|
|
57
|
+
|
|
58
|
+
Prefer OAuth-based authentication over username/password SOAP `login()`. Salesforce has announced retirement of SOAP `login()` for API versions 31.0 through 64.0 in Summer '27.
|
|
59
|
+
|
|
60
|
+
Never place private keys, client secrets, passwords, or long-lived access tokens in source code.
|
|
61
|
+
|
|
62
|
+
### API Versioning
|
|
63
|
+
|
|
64
|
+
Do not copy a hard-coded API version from an old example into a new integration.
|
|
65
|
+
|
|
66
|
+
Use the API version appropriate for the target org and integration, and update it deliberately as platform versions change. Examples should use `{apiVersion}` when the exact version is not material.
|
|
67
|
+
|
|
68
|
+
### Production Deployment
|
|
69
|
+
|
|
70
|
+
For production metadata deployments, validate first:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
sf project deploy validate --target-org my-prod --source-dir force-app --test-level RunLocalTests
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If validation succeeds, use the returned job ID for:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
sf project deploy quick --target-org my-prod --job-id <validation-job-id>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Quick deploy reuses the successful validation and therefore skips rerunning Apex tests. Do not use `project deploy quick` for sandboxes; use `project deploy start` or a dry run as appropriate.
|
|
17
83
|
|
|
18
84
|
## Patterns
|
|
19
85
|
|
|
@@ -87,7 +153,7 @@ public with sharing class MyController {
|
|
|
87
153
|
SELECT Id, Name, Email, Phone
|
|
88
154
|
FROM Contact
|
|
89
155
|
WHERE AccountId = :accountId
|
|
90
|
-
WITH
|
|
156
|
+
WITH USER_MODE
|
|
91
157
|
LIMIT 100
|
|
92
158
|
];
|
|
93
159
|
}
|
|
@@ -247,7 +313,7 @@ public class IndustryChangeQueueable implements Queueable, Database.AllowsCallou
|
|
|
247
313
|
SELECT Id, Name, Industry, OwnerId
|
|
248
314
|
FROM Account
|
|
249
315
|
WHERE Id IN :accountIds
|
|
250
|
-
WITH
|
|
316
|
+
WITH USER_MODE
|
|
251
317
|
];
|
|
252
318
|
|
|
253
319
|
// Process and make callout
|
|
@@ -287,7 +353,7 @@ public class IndustryChangeQueueable implements Queueable, Database.AllowsCallou
|
|
|
287
353
|
SELECT Id, Industry__c, AccountId
|
|
288
354
|
FROM Opportunity
|
|
289
355
|
WHERE AccountId IN :accIds
|
|
290
|
-
WITH
|
|
356
|
+
WITH USER_MODE
|
|
291
357
|
];
|
|
292
358
|
|
|
293
359
|
Map<Id, Account> accountMap = new Map<Id, Account>([
|
|
@@ -307,7 +373,9 @@ public class IndustryChangeQueueable implements Queueable, Database.AllowsCallou
|
|
|
307
373
|
// Log error
|
|
308
374
|
System.debug(LoggingLevel.ERROR, 'Queueable failed: ' + e.getMessage());
|
|
309
375
|
|
|
310
|
-
// Retry
|
|
376
|
+
// Retry only when the operation is idempotent. This example does not implement
|
|
377
|
+
// delayed exponential backoff; production integrations should use a durable,
|
|
378
|
+
// observable retry mechanism.
|
|
311
379
|
if (retryCount < 3) {
|
|
312
380
|
// Chain new job for retry
|
|
313
381
|
System.enqueueJob(new IndustryChangeQueueable(accountIds, retryCount + 1));
|
|
@@ -329,25 +397,26 @@ public class IndustryChangeQueueable implements Queueable, Database.AllowsCallou
|
|
|
329
397
|
- long-running operations
|
|
330
398
|
- callouts from triggers
|
|
331
399
|
|
|
332
|
-
### REST API Integration with
|
|
400
|
+
### REST API Integration with External Client App
|
|
333
401
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
Named Credentials for
|
|
402
|
+
New integrations should use External Client Apps (ECA) with OAuth 2.0. Existing
|
|
403
|
+
Connected Apps continue to work, but creation of new Connected Apps is restricted
|
|
404
|
+
from Spring '26. Use Named Credentials for Salesforce outbound callouts.
|
|
337
405
|
|
|
338
406
|
// Node.js - JWT Bearer Flow (server-to-server)
|
|
339
407
|
import jwt from 'jsonwebtoken';
|
|
340
408
|
import fs from 'fs';
|
|
341
409
|
|
|
342
410
|
class SalesforceClient {
|
|
343
|
-
|
|
344
|
-
|
|
411
|
+
protected accessToken: string | null = null;
|
|
412
|
+
protected instanceUrl: string | null = null;
|
|
345
413
|
private tokenExpiry: number = 0;
|
|
346
414
|
|
|
347
415
|
constructor(
|
|
348
416
|
private clientId: string,
|
|
349
417
|
private username: string,
|
|
350
418
|
private privateKeyPath: string,
|
|
419
|
+
protected apiVersion: string,
|
|
351
420
|
private loginUrl: string = 'https://login.salesforce.com'
|
|
352
421
|
) {}
|
|
353
422
|
|
|
@@ -394,7 +463,7 @@ class SalesforceClient {
|
|
|
394
463
|
await this.authenticate();
|
|
395
464
|
|
|
396
465
|
const response = await fetch(
|
|
397
|
-
`${this.instanceUrl}/services/data
|
|
466
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/query?q=${encodeURIComponent(soql)}`,
|
|
398
467
|
{
|
|
399
468
|
headers: {
|
|
400
469
|
'Authorization': `Bearer ${this.accessToken}`,
|
|
@@ -414,7 +483,7 @@ class SalesforceClient {
|
|
|
414
483
|
await this.authenticate();
|
|
415
484
|
|
|
416
485
|
const response = await fetch(
|
|
417
|
-
`${this.instanceUrl}/services/data
|
|
486
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/sobjects/${sobject}`,
|
|
418
487
|
{
|
|
419
488
|
method: 'POST',
|
|
420
489
|
headers: {
|
|
@@ -449,7 +518,8 @@ class SalesforceClient {
|
|
|
449
518
|
const sf = new SalesforceClient(
|
|
450
519
|
process.env.SF_CLIENT_ID!,
|
|
451
520
|
process.env.SF_USERNAME!,
|
|
452
|
-
'./certificates/server.key'
|
|
521
|
+
'./certificates/server.key',
|
|
522
|
+
process.env.SF_API_VERSION!
|
|
453
523
|
);
|
|
454
524
|
|
|
455
525
|
const accounts = await sf.query(
|
|
@@ -460,7 +530,7 @@ const accounts = await sf.query(
|
|
|
460
530
|
|
|
461
531
|
- external integration
|
|
462
532
|
- REST API access
|
|
463
|
-
- connected apps
|
|
533
|
+
- external client apps and connected apps
|
|
464
534
|
|
|
465
535
|
### Bulk API 2.0 for Large Data Operations
|
|
466
536
|
|
|
@@ -496,7 +566,7 @@ class SalesforceBulkClient extends SalesforceClient {
|
|
|
496
566
|
|
|
497
567
|
private async createBulkJob(sobject: string, operation: string): Promise<any> {
|
|
498
568
|
const response = await fetch(
|
|
499
|
-
`${this.instanceUrl}/services/data
|
|
569
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/jobs/ingest`,
|
|
500
570
|
{
|
|
501
571
|
method: 'POST',
|
|
502
572
|
headers: {
|
|
@@ -520,7 +590,7 @@ class SalesforceBulkClient extends SalesforceClient {
|
|
|
520
590
|
const csv = this.recordsToCSV(records);
|
|
521
591
|
|
|
522
592
|
await fetch(
|
|
523
|
-
`${this.instanceUrl}/services/data
|
|
593
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/jobs/ingest/${jobId}/batches`,
|
|
524
594
|
{
|
|
525
595
|
method: 'PUT',
|
|
526
596
|
headers: {
|
|
@@ -534,7 +604,7 @@ class SalesforceBulkClient extends SalesforceClient {
|
|
|
534
604
|
|
|
535
605
|
private async closeJob(jobId: string): Promise<void> {
|
|
536
606
|
await fetch(
|
|
537
|
-
`${this.instanceUrl}/services/data
|
|
607
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/jobs/ingest/${jobId}`,
|
|
538
608
|
{
|
|
539
609
|
method: 'PATCH',
|
|
540
610
|
headers: {
|
|
@@ -548,12 +618,12 @@ class SalesforceBulkClient extends SalesforceClient {
|
|
|
548
618
|
|
|
549
619
|
private async waitForJobCompletion(jobId: string): Promise<any> {
|
|
550
620
|
const maxWaitTime = 10 * 60 * 1000; // 10 minutes
|
|
551
|
-
const pollInterval = 5000; //
|
|
621
|
+
const pollInterval = 5000; // fallback polling interval; prefer event-driven completion when available
|
|
552
622
|
const startTime = Date.now();
|
|
553
623
|
|
|
554
624
|
while (Date.now() - startTime < maxWaitTime) {
|
|
555
625
|
const response = await fetch(
|
|
556
|
-
`${this.instanceUrl}/services/data
|
|
626
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/jobs/ingest/${jobId}`,
|
|
557
627
|
{
|
|
558
628
|
headers: { 'Authorization': `Bearer ${this.accessToken}` }
|
|
559
629
|
}
|
|
@@ -584,7 +654,7 @@ class SalesforceBulkClient extends SalesforceClient {
|
|
|
584
654
|
|
|
585
655
|
private async getFailedResults(jobId: string): Promise<any[]> {
|
|
586
656
|
const response = await fetch(
|
|
587
|
-
`${this.instanceUrl}/services/data
|
|
657
|
+
`${this.instanceUrl}/services/data/${this.apiVersion}/jobs/ingest/${jobId}/failedResults`,
|
|
588
658
|
{
|
|
589
659
|
headers: { 'Authorization': `Bearer ${this.accessToken}` }
|
|
590
660
|
}
|
|
@@ -665,7 +735,7 @@ the day, unlike sandbox refresh limits.
|
|
|
665
735
|
],
|
|
666
736
|
"namespace": "myns",
|
|
667
737
|
"sfdcLoginUrl": "https://login.salesforce.com",
|
|
668
|
-
"sourceApiVersion": "
|
|
738
|
+
"sourceApiVersion": "67.0"
|
|
669
739
|
}
|
|
670
740
|
|
|
671
741
|
# Development workflow commands
|
|
@@ -872,13 +942,12 @@ Dynamic SOQL with string concatenation is vulnerable
|
|
|
872
942
|
|
|
873
943
|
Message: Dynamic SOQL with concatenation. Use bind variables or String.escapeSingleQuotes().
|
|
874
944
|
|
|
875
|
-
### Missing
|
|
945
|
+
### Missing Explicit Data Access Mode
|
|
876
946
|
|
|
877
947
|
Severity: WARNING
|
|
878
948
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
Message: SOQL without security enforcement. Add WITH SECURITY_ENFORCED.
|
|
949
|
+
Review Apex data access to ensure the intended user/system security model is explicit.
|
|
950
|
+
Prefer `WITH USER_MODE` for user-context SOQL/SOSL and user-mode DML where appropriate.
|
|
882
951
|
|
|
883
952
|
### Hardcoded Salesforce ID
|
|
884
953
|
|
|
@@ -896,21 +965,21 @@ Credentials must use Named Credentials or Custom Metadata
|
|
|
896
965
|
|
|
897
966
|
Message: Hardcoded credentials. Use Named Credentials or Custom Metadata.
|
|
898
967
|
|
|
899
|
-
###
|
|
968
|
+
### Unnecessary DOM Manipulation in LWC
|
|
900
969
|
|
|
901
970
|
Severity: WARNING
|
|
902
971
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
972
|
+
Prefer declarative template rendering and component state. When DOM access is
|
|
973
|
+
actually required, scope it to elements owned by the component; prefer `lwc:ref`
|
|
974
|
+
and `this.refs` where appropriate.
|
|
906
975
|
|
|
907
|
-
###
|
|
976
|
+
### Unnecessary @track Usage
|
|
908
977
|
|
|
909
978
|
Severity: INFO
|
|
910
979
|
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
980
|
+
LWC fields are reactive by default. Use `@track` only when you need deep
|
|
981
|
+
tracking of mutations to properties of plain objects or elements of arrays.
|
|
982
|
+
Prefer assigning a new object or array instead of mutating state in place.
|
|
914
983
|
|
|
915
984
|
### Wire Without Refresh After DML
|
|
916
985
|
|
|
@@ -945,6 +1014,7 @@ Message: DML after @wire without refreshApex. Data may be stale.
|
|
|
945
1014
|
- User mentions or implies: connected app
|
|
946
1015
|
|
|
947
1016
|
## Limitations
|
|
1017
|
+
- Salesforce platform behavior and API versions change frequently; verify current official documentation before implementing version-sensitive features.
|
|
948
1018
|
- Use this skill only when the task clearly matches the scope described above.
|
|
949
1019
|
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
|
|
950
1020
|
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
|