acek-skills 1.0.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.
@@ -0,0 +1,245 @@
1
+ ---
2
+ name: sf-admin
3
+ description: >
4
+ Use this skill for ANY Salesforce administration task that does not involve custom code.
5
+ Triggers when the user asks about creating or modifying custom objects, custom fields, picklist
6
+ values, page layouts, record types, profiles, permission sets, roles, sharing rules, validation
7
+ rules, workflow rules, flows (Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow),
8
+ approval processes, reports, dashboards, email templates, app manager, or any declarative
9
+ Salesforce configuration. Also use when the user asks about org setup, security model, OWD
10
+ (Org-Wide Defaults), or data management tasks (import, export, data loader).
11
+ ---
12
+
13
+ # Salesforce Administrator Skill
14
+
15
+ ## Environment Context
16
+ - API Version: **61.0**
17
+ - Org Type: Enterprise (single org: sandbox + production)
18
+ - Tooling: **SF CLI** for metadata retrieval; most admin tasks done declaratively in Setup UI
19
+ - Any metadata changes intended for production must go through the DevOps deployment process
20
+
21
+ ---
22
+
23
+ ## Naming Conventions
24
+
25
+ | Artifact | Convention | Example |
26
+ |---|---|---|
27
+ | Custom Object | PascalCase, singular | `Project__c`, `WorkOrder__c` |
28
+ | Custom Field | PascalCase__c | `ProjectStatus__c`, `DueDate__c` |
29
+ | Custom Tab | Match object label | — |
30
+ | Permission Set | Descriptive, Title Case | `Project Manager Access` |
31
+ | Flow | Action + Object, Title Case | `Create Project Record`, `Update Opportunity Stage` |
32
+ | Validation Rule | OBJECT_DescriptionOfRule | `ACCOUNT_RequireIndustry` |
33
+ | Report/Dashboard | Descriptive, audience-first | `Sales Team — Pipeline by Stage Q3` |
34
+
35
+ ---
36
+
37
+ ## Custom Objects
38
+
39
+ ### Checklist when creating a Custom Object
40
+ - [ ] **Label**: singular (e.g. `Project`), plural auto-generated
41
+ - [ ] **API Name**: PascalCase + `__c` (e.g. `Project__c`)
42
+ - [ ] **Record Name field**: meaningful (not just "Project Name" — be specific)
43
+ - [ ] **Record Name type**: Text (most cases) or Auto Number if human-readable ID needed
44
+ - [ ] **Sharing model (OWD)**: decide upfront — Public Read/Write, Public Read Only, or Private
45
+ - [ ] **Allow Reports**: enable if business needs visibility
46
+ - [ ] **Allow Activities**: enable if users need Tasks/Events on this object
47
+ - [ ] **Track Field History**: enable for audit trail (select key fields)
48
+ - [ ] **Allow in Chatter**: based on collaboration needs
49
+ - [ ] Add to relevant **App** via App Manager after creation
50
+
51
+ ### Relationships
52
+ | Type | Use When |
53
+ |---|---|
54
+ | Master-Detail | Child cannot exist without parent; sharing & rollup summary needed |
55
+ | Lookup | Loose coupling; child can exist independently |
56
+ | Many-to-Many | Use Junction Object with two Master-Detail fields |
57
+ | Hierarchical | Self-referential (User only) |
58
+
59
+ ---
60
+
61
+ ## Custom Fields
62
+
63
+ ### Field Type Selection Guide
64
+ | Data | Recommended Type |
65
+ |---|---|
66
+ | Short text (<255 chars) | Text |
67
+ | Long text / notes | Long Text Area (set char limit intentionally) |
68
+ | Controlled list of values | Picklist |
69
+ | Currency amounts | Currency (respects org currency settings) |
70
+ | Calculated value | Formula |
71
+ | Running total from child | Roll-Up Summary (Master-Detail only) |
72
+ | True/False | Checkbox |
73
+ | Date only | Date |
74
+ | Date + Time | Date/Time |
75
+ | External system ID | Text, mark as External ID + Unique |
76
+ | Reference to another record | Lookup or Master-Detail |
77
+
78
+ ### Field Creation Checklist
79
+ - [ ] API Name: PascalCase__c — **no spaces, no special characters**
80
+ - [ ] Help Text: always fill — explain purpose and expected format
81
+ - [ ] Field-Level Security (FLS): set explicitly per profile/permission set after creation
82
+ - [ ] Add to **Page Layout** after creation
83
+ - [ ] Add to relevant **List View** if needed
84
+ - [ ] Consider **Required** at field level vs. at Validation Rule level (VR gives better error messages)
85
+
86
+ ---
87
+
88
+ ## Security Model
89
+
90
+ ### Layers (top to bottom)
91
+ 1. **OWD** — baseline access for all users (most restrictive)
92
+ 2. **Role Hierarchy** — opens access up the hierarchy
93
+ 3. **Sharing Rules** — criteria-based or ownership-based exceptions to OWD
94
+ 4. **Manual Sharing** — record-by-record sharing
95
+ 5. **Profiles** — object/field/tab access + app access (legacy, prefer Permission Sets)
96
+ 6. **Permission Sets** — additive permissions on top of Profile
97
+ 7. **Permission Set Groups** — bundle multiple Permission Sets
98
+
99
+ ### Best Practice
100
+ - Keep Profiles minimal (baseline access only)
101
+ - Use **Permission Sets** for feature/role-based access
102
+ - Group Permission Sets into **Permission Set Groups** for easy assignment
103
+ - Never grant "Modify All" or "View All" without documented business justification
104
+
105
+ ### Permission Set Creation Checklist
106
+ - [ ] Name: descriptive, audience-clear (`Project Manager Access`)
107
+ - [ ] Object permissions: only what role needs (CRUD individually)
108
+ - [ ] FLS: explicitly set for each relevant field
109
+ - [ ] Assigned Apps: if needed
110
+ - [ ] System Permissions: minimal — document any elevated permissions
111
+
112
+ ---
113
+
114
+ ## Flows
115
+
116
+ ### Flow Type Selection
117
+ | Scenario | Flow Type |
118
+ |---|---|
119
+ | User-facing guided process | Screen Flow |
120
+ | Trigger on record create/update/delete | Record-Triggered Flow |
121
+ | Run on a schedule | Schedule-Triggered Flow |
122
+ | Called from another flow or Apex | Autolaunched Flow (No Trigger) |
123
+ | Triggered by platform event | Platform Event-Triggered Flow |
124
+
125
+ ### Flow Best Practices
126
+ - **Bulkification**: avoid SOQL/DML elements inside loops — use Collection variables + Loop
127
+ - **Error handling**: add Fault paths on every DML element; log or notify on failure
128
+ - **Governor limits**: one Flow can do max 150 DML + 100 SOQL per transaction
129
+ - Label all elements clearly — what it does, not just the element type
130
+ - Use **Constants** for hardcoded values (labels, thresholds) — never hardcode in element properties
131
+ - **Test before activating**: use Flow's built-in debug tool + write test coverage if invoked from Apex
132
+
133
+ ### Record-Triggered Flow — Run Order Awareness
134
+ - Fast Field Updates run before triggers
135
+ - Actions and Related Records run after triggers (same transaction)
136
+ - Async paths run in new transaction — cannot roll back
137
+
138
+ ---
139
+
140
+ ## Validation Rules
141
+
142
+ ### Pattern
143
+ ```
144
+ /* Rule Name: OBJECT_DescriptionOfRule */
145
+ /* Error Message: user-friendly, actionable */
146
+
147
+ /* Example: Require Close Date in future for new Opportunities */
148
+ AND(
149
+ ISNEW(),
150
+ CloseDate <= TODAY()
151
+ )
152
+ /* Error: "Close Date must be in the future for new opportunities." */
153
+ /* Error Location: CloseDate field */
154
+ ```
155
+
156
+ - Always set **Error Location** to the specific field (not top of page) when possible
157
+ - Error message: tell user **what to do**, not just what went wrong
158
+ - Test with both positive (should save) and negative (should be blocked) scenarios
159
+
160
+ ---
161
+
162
+ ## Reports & Dashboards
163
+
164
+ ### Report Types to Know
165
+ | Type | Use |
166
+ |---|---|
167
+ | Tabular | Simple lists, exports |
168
+ | Summary | Grouped data with subtotals |
169
+ | Matrix | Cross-tabulation (rows + columns grouping) |
170
+ | Joined | Multiple report blocks in one |
171
+
172
+ ### Dashboard Checklist
173
+ - [ ] Meaningful title that says what decision it helps make
174
+ - [ ] Running User set appropriately (dynamic dashboards for self-service)
175
+ - [ ] Refresh schedule configured
176
+ - [ ] Filters exposed for end-user flexibility
177
+ - [ ] Each component has a clear label — no "Count of Records" without context
178
+
179
+ ---
180
+
181
+ ## Data Management
182
+
183
+ ### Import Options
184
+ | Tool | Best For |
185
+ |---|---|
186
+ | Data Import Wizard | Standard objects, <50K records, no relationships |
187
+ | Data Loader | Any object, large volumes, automation, relationships |
188
+ | `sf data import tree` | Dev/test JSON datasets |
189
+
190
+ ### SOQL via CLI (for admin queries)
191
+ ```bash
192
+ # Query via SF CLI
193
+ sf data query --query "SELECT Id, Name, CreatedDate FROM Account LIMIT 10" --target-org <alias>
194
+
195
+ # Export to CSV
196
+ sf data export bulk --query "SELECT Id, Name FROM Contact" --output-file contacts.csv --target-org <alias>
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Metadata Retrieval for Admin Artifacts
202
+
203
+ When an admin config needs to be deployed (e.g. to production via DevOps), retrieve it first:
204
+
205
+ ```bash
206
+ # Retrieve specific metadata
207
+ sf project retrieve start \
208
+ --metadata CustomObject:Project__c \
209
+ --metadata CustomField:Project__c.ProjectStatus__c \
210
+ --target-org <sandbox-alias>
211
+
212
+ # Then hand off to DevOps skill for deployment
213
+ ```
214
+
215
+ ### Common Metadata Type Names
216
+ | Artifact | Metadata Type |
217
+ |---|---|
218
+ | Custom Object | `CustomObject` |
219
+ | Custom Field | `CustomField` |
220
+ | Permission Set | `PermissionSet` |
221
+ | Profile | `Profile` |
222
+ | Flow | `Flow` |
223
+ | Validation Rule | `ValidationRule` |
224
+ | Page Layout | `Layout` |
225
+ | Compact Layout | `CompactLayout` |
226
+ | Custom Tab | `CustomTab` |
227
+ | App | `CustomApplication` |
228
+
229
+ ---
230
+
231
+ ## Admin Task Quick Reference
232
+
233
+ ```bash
234
+ # List all orgs
235
+ sf org list
236
+
237
+ # Open Setup in sandbox
238
+ sf org open --target-org <sandbox-alias>
239
+
240
+ # Retrieve Flow metadata
241
+ sf project retrieve start --metadata Flow:Create_Project_Record --target-org <alias>
242
+
243
+ # Retrieve full object (all fields, layouts, etc.)
244
+ sf project retrieve start --metadata CustomObject:Project__c --target-org <alias>
245
+ ```
@@ -0,0 +1,297 @@
1
+ ---
2
+ name: sf-ba
3
+ description: >
4
+ Use this skill when creating Business Analysis documents for Salesforce projects: PRDs (Product
5
+ Requirements Documents), User Stories, Feature Specs, Functional Requirements, or any instruction
6
+ document intended to guide Salesforce admins or developers. Trigger when the user asks to
7
+ "write a PRD", "document requirements", "write user stories", "create a feature spec", "document
8
+ this feature", or "write instructions for the dev/admin team". Also use when the user describes
9
+ a business problem or process and wants it turned into structured documentation that others can
10
+ execute. Output is always Markdown.
11
+ ---
12
+
13
+ # Salesforce Business Analyst Skill
14
+
15
+ ## Core Principle
16
+ BA documents bridge the gap between business intent and technical execution. Every document must be:
17
+ - **Actionable** — admin/dev can start work immediately after reading
18
+ - **Unambiguous** — one possible interpretation only
19
+ - **Testable** — every requirement can be verified with a concrete pass/fail test
20
+ - **Scoped** — clearly states what is IN and OUT of scope
21
+
22
+ Output format: **Markdown** (`.md`), stored in `instructions/` directory of the project repo.
23
+
24
+ ---
25
+
26
+ ## Document Types
27
+
28
+ ### 1. PRD (Product Requirements Document)
29
+ Use for: new features, significant enhancements, cross-team work
30
+ File path: `instructions/prd/YYYYMMDD-<feature-slug>.md`
31
+
32
+ ### 2. User Stories
33
+ Use for: sprint-ready work items, Jira/GitHub issues
34
+ Can be standalone or embedded in PRD
35
+ File path: `instructions/stories/YYYYMMDD-<feature-slug>-stories.md`
36
+
37
+ ### 3. Admin Spec
38
+ Use for: declarative-only changes (objects, fields, flows, permissions)
39
+ File path: `instructions/admin/YYYYMMDD-<feature-slug>-admin-spec.md`
40
+
41
+ ### 4. Dev Spec
42
+ Use for: custom code requirements (Apex, LWC, integrations)
43
+ File path: `instructions/dev/YYYYMMDD-<feature-slug>-dev-spec.md`
44
+
45
+ ---
46
+
47
+ ## PRD Template
48
+
49
+ ```markdown
50
+ # PRD: [Feature Name]
51
+
52
+ **Date:** YYYY-MM-DD
53
+ **Author:** [Name / Role]
54
+ **Status:** Draft | Review | Approved
55
+ **Target Release:** [Salesforce Season + Year, e.g. Summer '26]
56
+
57
+ ---
58
+
59
+ ## 1. Background & Problem Statement
60
+ [1–3 sentences: what problem exists today, what pain it causes, and for whom.]
61
+
62
+ ## 2. Goals
63
+ - [Goal 1 — measurable outcome]
64
+ - [Goal 2]
65
+
66
+ ## 3. Non-Goals (Out of Scope)
67
+ - [Explicitly list what this feature does NOT cover]
68
+ - [This prevents scope creep]
69
+
70
+ ## 4. Users & Personas
71
+ | Persona | Role | Primary Need |
72
+ |---|---|---|
73
+ | [Name] | [Job title / profile] | [What they need from this feature] |
74
+
75
+ ## 5. Functional Requirements
76
+
77
+ ### 5.1 [Sub-feature or Process Name]
78
+ **As a** [persona], **I want to** [action], **so that** [benefit].
79
+
80
+ | # | Requirement | Priority | Implementor |
81
+ |---|---|---|---|
82
+ | FR-01 | [Specific, measurable requirement] | Must Have | Admin / Dev |
83
+ | FR-02 | ... | Should Have | Admin |
84
+
85
+ **Priority scale:** Must Have (launch blocker) / Should Have (important) / Nice to Have (if time allows)
86
+
87
+ ### 5.2 [Next sub-feature]
88
+ ...
89
+
90
+ ## 6. Non-Functional Requirements
91
+ - **Performance:** [e.g. Page must load within 2 seconds for up to 500 records]
92
+ - **Security:** [e.g. Only users with Project Manager Permission Set may edit]
93
+ - **Data integrity:** [e.g. Record cannot be deleted if child records exist]
94
+
95
+ ## 7. Data Model Changes
96
+ | Object | Field / Change | Type | Notes |
97
+ |---|---|---|---|
98
+ | `Project__c` | `ProjectStatus__c` | Picklist | Values: Draft, Active, Closed |
99
+
100
+ ## 8. UI/UX Notes
101
+ [Describe screen layouts, user flows, or link to wireframes/mockups if available.]
102
+
103
+ ## 9. Integration Points
104
+ [Any external systems, APIs, or Salesforce features (e.g. email, DocuSign) involved.]
105
+
106
+ ## 10. Acceptance Criteria
107
+ | # | Scenario | Given | When | Then |
108
+ |---|---|---|---|---|
109
+ | AC-01 | [Happy path] | [Starting state] | [User action] | [Expected result] |
110
+ | AC-02 | [Edge case] | ... | ... | ... |
111
+
112
+ ## 11. Open Questions
113
+ | # | Question | Owner | Due |
114
+ |---|---|---|---|
115
+ | Q-01 | [Unresolved decision] | [Name] | YYYY-MM-DD |
116
+
117
+ ## 12. Revision History
118
+ | Date | Author | Change |
119
+ |---|---|---|
120
+ | YYYY-MM-DD | [Name] | Initial draft |
121
+ ```
122
+
123
+ ---
124
+
125
+ ## User Story Template
126
+
127
+ ### Format (standard)
128
+ ```markdown
129
+ ## Story: [Short Title]
130
+
131
+ **Story ID:** US-[number]
132
+ **Epic:** [Epic name]
133
+ **Priority:** High / Medium / Low
134
+ **Estimate:** [Story points or t-shirt size]
135
+ **Assignee:** Admin / Dev
136
+
137
+ ---
138
+
139
+ **As a** [persona],
140
+ **I want to** [specific action or capability],
141
+ **So that** [business value or outcome].
142
+
143
+ ### Acceptance Criteria
144
+ - [ ] **Given** [initial context], **When** [user action], **Then** [expected result]
145
+ - [ ] **Given** ..., **When** ..., **Then** ...
146
+ - [ ] Error state: [what happens when X goes wrong]
147
+
148
+ ### Technical Notes
149
+ [Any constraints, API callout involved, metadata affected — for dev/admin reference]
150
+
151
+ ### Out of Scope
152
+ - [What this story does NOT cover]
153
+ ```
154
+
155
+ ### Story Writing Rules
156
+ - One user story = one deliverable unit of value
157
+ - Acceptance Criteria: **minimum 3** (happy path, edge case, error/permission case)
158
+ - Avoid technical jargon in the story itself — put it in Technical Notes
159
+ - Stories must be independently testable
160
+ - No story should take more than 3 days to implement — if it does, split it
161
+
162
+ ---
163
+
164
+ ## Admin Spec Template
165
+
166
+ ```markdown
167
+ # Admin Spec: [Feature Name]
168
+
169
+ **Date:** YYYY-MM-DD
170
+ **PRD Reference:** [link to PRD]
171
+ **Status:** Draft | Ready for Build | Done
172
+
173
+ ---
174
+
175
+ ## Objects to Create / Modify
176
+ ### New Object: `ObjectName__c`
177
+ - Label: [singular / plural]
178
+ - Sharing: [OWD setting]
179
+ - Features: [Activities / Reports / History Tracking / etc.]
180
+
181
+ ### Modified Object: `ExistingObject__c`
182
+ - [What changes and why]
183
+
184
+ ## Fields
185
+ | Object | Field API Name | Type | Values / Formula | Required | FLS |
186
+ |---|---|---|---|---|---|
187
+ | `Project__c` | `ProjectStatus__c` | Picklist | Draft; Active; Closed | Yes | Read: All, Edit: Manager |
188
+
189
+ ## Flows
190
+ | Flow Name | Type | Trigger | Purpose |
191
+ |---|---|---|---|
192
+ | `Create_Project_Record` | Screen Flow | User-initiated | Guide user through project creation |
193
+
194
+ ### Flow: [Flow Name] — Step-by-Step Logic
195
+ 1. [Step 1]
196
+ 2. [Step 2 — decision: if X then Y, else Z]
197
+ 3. [Step 3]
198
+
199
+ ## Permission Changes
200
+ | Permission Set | Object | CRUD | Fields |
201
+ |---|---|---|---|
202
+ | `Project Manager Access` | `Project__c` | CRUD | All fields: Read/Edit |
203
+
204
+ ## Validation Rules
205
+ | Object | Rule Name | Condition (plain English) | Error Message |
206
+ |---|---|---|---|
207
+ | `Project__c` | `PROJ_RequireOwner` | Owner is blank on save | "Please assign an owner before saving." |
208
+
209
+ ## Page Layouts
210
+ - Add `ProjectStatus__c` to `Project Layout` — Section: Details, Position: top right
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Dev Spec Template
216
+
217
+ ```markdown
218
+ # Dev Spec: [Feature Name]
219
+
220
+ **Date:** YYYY-MM-DD
221
+ **PRD Reference:** [link to PRD]
222
+ **Status:** Draft | Ready for Build | Done
223
+
224
+ ---
225
+
226
+ ## Overview
227
+ [1 paragraph: what needs to be built and why, from a technical angle]
228
+
229
+ ## Components to Build / Modify
230
+ | Component | Type | Action | Notes |
231
+ |---|---|---|---|
232
+ | `ProjectHelper` | Apex Class | Create | Business logic for project operations |
233
+ | `projectCard` | LWC | Create | Display project summary on record page |
234
+ | `ProjectTrigger` | Apex Trigger | Create | Entry point — delegates to handler |
235
+
236
+ ## Apex: [ClassName]
237
+ ### Purpose
238
+ [What this class does]
239
+
240
+ ### Methods
241
+ | Method | Visibility | Params | Returns | Description |
242
+ |---|---|---|---|---|
243
+ | `getProjects` | `@AuraEnabled public static` | `Id accountId` | `List<Project__c>` | Returns active projects for an account |
244
+
245
+ ### Key Logic
246
+ 1. [Step 1]
247
+ 2. [Step 2]
248
+ 3. [Error handling: ...]
249
+
250
+ ### SOQL Involved
251
+ ```apex
252
+ SELECT Id, Name, ProjectStatus__c, OwnerId
253
+ FROM Project__c
254
+ WHERE AccountId = :accountId AND ProjectStatus__c != 'Closed'
255
+ ```
256
+
257
+ ## LWC: [componentName]
258
+ ### Purpose
259
+ [What the component displays / does]
260
+
261
+ ### @api Properties
262
+ | Property | Type | Description |
263
+ |---|---|---|
264
+ | `recordId` | String | The parent Account ID |
265
+
266
+ ### Events Fired
267
+ | Event Name | When | Payload |
268
+ |---|---|---|
269
+ | `projectselected` | User clicks a project card | `{ detail: { projectId } }` |
270
+
271
+ ### Wire / Apex Calls
272
+ - `@wire(getProjects, { accountId: '$recordId' })` → renders project list
273
+
274
+ ## Integration / Callout (if applicable)
275
+ - Endpoint: `callout:Named_Credential/resource`
276
+ - Method: GET/POST
277
+ - Payload: [structure]
278
+ - Error handling: [how failures are surfaced]
279
+
280
+ ## Test Coverage Plan
281
+ | Test Class | Scenarios to Cover |
282
+ |---|---|
283
+ | `ProjectHelperTest` | Happy path, no records, insufficient permission |
284
+ ```
285
+
286
+ ---
287
+
288
+ ## BA Workflow
289
+
290
+ When asked to write BA documentation:
291
+
292
+ 1. **Clarify scope** — confirm what's in/out before writing
293
+ 2. **Choose document type** — PRD for new features, Story for sprint items, Spec for execution
294
+ 3. **Fill all sections** — never leave a section blank; write "N/A — [reason]" if not applicable
295
+ 4. **Acceptance Criteria first** — if you can't write AC, the requirement isn't clear enough yet
296
+ 5. **Flag open questions** — better to surface uncertainty than assume
297
+ 6. **Always specify the implementor** — Admin, Dev, or Both for each requirement