@salesforce/afv-skills 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 (47) hide show
  1. package/LICENSE.txt +330 -0
  2. package/README.md +466 -0
  3. package/package.json +23 -0
  4. package/skills/apex-class/SKILL.md +253 -0
  5. package/skills/apex-class/examples/AccountDeduplicationBatch.cls +148 -0
  6. package/skills/apex-class/examples/AccountSelector.cls +193 -0
  7. package/skills/apex-class/examples/AccountService.cls +201 -0
  8. package/skills/apex-class/templates/abstract.cls +128 -0
  9. package/skills/apex-class/templates/batch.cls +125 -0
  10. package/skills/apex-class/templates/domain.cls +102 -0
  11. package/skills/apex-class/templates/dto.cls +108 -0
  12. package/skills/apex-class/templates/exception.cls +51 -0
  13. package/skills/apex-class/templates/interface.cls +25 -0
  14. package/skills/apex-class/templates/queueable.cls +92 -0
  15. package/skills/apex-class/templates/schedulable.cls +75 -0
  16. package/skills/apex-class/templates/selector.cls +92 -0
  17. package/skills/apex-class/templates/service.cls +69 -0
  18. package/skills/apex-class/templates/utility.cls +97 -0
  19. package/skills/apex-test-class/SKILL.md +101 -0
  20. package/skills/apex-test-class/references/assertion-patterns.md +209 -0
  21. package/skills/apex-test-class/references/async-testing.md +276 -0
  22. package/skills/apex-test-class/references/mocking-patterns.md +219 -0
  23. package/skills/apex-test-class/references/test-data-factory.md +176 -0
  24. package/skills/deployment-readiness-check/SKILL.md +257 -0
  25. package/skills/deployment-readiness-check/assets/deployment_checklist.md +286 -0
  26. package/skills/deployment-readiness-check/references/rollback_procedures.md +308 -0
  27. package/skills/deployment-readiness-check/scripts/check_metadata.sh +207 -0
  28. package/skills/salesforce-custom-application/SKILL.md +211 -0
  29. package/skills/salesforce-custom-field/SKILL.md +505 -0
  30. package/skills/salesforce-custom-lightning-type/SKILL.md +157 -0
  31. package/skills/salesforce-custom-object/SKILL.md +238 -0
  32. package/skills/salesforce-custom-tab/SKILL.md +78 -0
  33. package/skills/salesforce-experience-site/SKILL.md +178 -0
  34. package/skills/salesforce-flexipage/SKILL.md +445 -0
  35. package/skills/salesforce-flow/SKILL.md +368 -0
  36. package/skills/salesforce-fragment/SKILL.md +42 -0
  37. package/skills/salesforce-lightning-app-build/SKILL.md +254 -0
  38. package/skills/salesforce-list-view/SKILL.md +216 -0
  39. package/skills/salesforce-validation-rule/SKILL.md +72 -0
  40. package/skills/salesforce-web-app-creating-records/SKILL.md +84 -0
  41. package/skills/salesforce-web-app-feature/SKILL.md +70 -0
  42. package/skills/salesforce-web-app-list-and-create-records/SKILL.md +36 -0
  43. package/skills/salesforce-web-application/SKILL.md +34 -0
  44. package/skills/trigger-refactor-pipeline/SKILL.md +191 -0
  45. package/skills/trigger-refactor-pipeline/assets/test_template.apex +321 -0
  46. package/skills/trigger-refactor-pipeline/references/handler_patterns.md +442 -0
  47. package/skills/trigger-refactor-pipeline/scripts/analyze_trigger.py +258 -0
package/README.md ADDED
@@ -0,0 +1,466 @@
1
+ # Agentforce Vibes Library
2
+
3
+ AI prompts and rules library for Agentforce Vibes development, content creation, and workflow automation.
4
+
5
+ ## πŸ“š About
6
+
7
+ This repository curates Salesforce-focused prompts, system rules, and executable skills from the wider developer community to accelerate Agentforce Vibes agentic workflows. Collections are organized by development disciplineβ€”Apex, LWC, flows, deployments, testing, investigation, spec-driven delivery, and moreβ€”so contributors can share reusable prompts, scaffolds, guardrails, and workflows that other teams can adapt and extend.
8
+
9
+ ## πŸ—‚οΈ Structure
10
+
11
+ ```
12
+ afv-library/
13
+ β”œβ”€β”€ prompts/ # Single-file instructions for straightforward tasks
14
+ β”‚ β”œβ”€β”€ apex-development/
15
+ β”‚ β”œβ”€β”€ lwc-development/
16
+ β”‚ β”œβ”€β”€ flow-development/
17
+ β”‚ β”œβ”€β”€ getting-started/
18
+ β”‚ └── ...
19
+ β”œβ”€β”€ rules/ # Single-file guardrails and standards
20
+ β”‚ β”œβ”€β”€ apex-development/
21
+ β”‚ β”œβ”€β”€ lwc-development/
22
+ β”‚ β”œβ”€β”€ spec-driven-dev/
23
+ β”‚ └── ...
24
+ β”œβ”€β”€ skills/ # Directory-based executable workflows
25
+ β”‚ β”œβ”€β”€ apex-development/
26
+ β”‚ β”‚ └── trigger-refactor-pipeline/
27
+ β”‚ β”‚ β”œβ”€β”€ SKILL.md
28
+ β”‚ β”‚ β”œβ”€β”€ scripts/
29
+ β”‚ β”‚ β”œβ”€β”€ references/
30
+ β”‚ β”‚ └── assets/
31
+ β”‚ β”œβ”€β”€ metadata-deployments/
32
+ β”‚ β”œβ”€β”€ testing-automation/
33
+ β”‚ └── ...
34
+ β”œβ”€β”€ samples/ # Synced sample apps (e.g. from npm)
35
+ β”‚ └── webapp-template-app-react-sample-b2e-experimental/
36
+ └── README.md
37
+ ```
38
+
39
+ ## πŸš€ Quick Start
40
+
41
+ ### Manual Usage
42
+
43
+ Browse the repository and copy/paste any prompt, rule, or skill directly into Agentforce Vibes or your preferred AI tool.
44
+
45
+ ### Samples
46
+
47
+ The `samples/` folder contains synced sample apps. For example, `samples/webapp-template-app-react-sample-b2e-experimental/` is kept in sync with the npm package `@salesforce/webapp-template-app-react-sample-b2e-experimental` (nightly and on manual trigger via GitHub Actions). To run the same sync locally from the repo root:
48
+
49
+ ```bash
50
+ npm install
51
+ npm run sync-react-b2e-sample
52
+ ```
53
+
54
+ The GitHub Action runs these same commands and opens a PR only when the npm package version has changed. See [samples/README.md](samples/README.md) for details.
55
+
56
+ ### Connecting Team or Personal Libraries
57
+
58
+ You can register additional repos with the extension as long as they mirror this structure:
59
+
60
+ - Root folders named `prompts/`, `rules/`, and `skills/`, each containing category subfolders (e.g., `prompts/apex-development/`).
61
+ - Each prompt or rule stored in its own Markdown file with YAML frontmatter (`name`, `description`, `tags`, optional setup metadata).
62
+ - Each skill stored in its own directory containing a `SKILL.md` file with required frontmatter, plus optional `scripts/`, `references/`, and `assets/` subdirectories.
63
+ - Category folders may include a `README.md` describing their focus; empty folders are allowed for future content.
64
+
65
+ When you add a new library:
66
+
67
+ 1. **Structure your repository** with the same folder layout shown in `## πŸ—‚οΈ Structure`:
68
+ - `prompts/` folder with category subfolders containing `.md` files
69
+ - `rules/` folder with category subfolders containing `.md` files
70
+ - `skills/` folder with category subfolders, each containing skill directories with `SKILL.md`
71
+ 2. **Follow format requirements**:
72
+ - Prompts and rules: YAML frontmatter (`name`, `description`, `tags`) + markdown body
73
+ - Skills: Directory with `SKILL.md` + optional `scripts/`, `references/`, `assets/` subdirectories
74
+ 3. **Ensure script executability** for skills: Mark Python/Bash scripts as executable (`chmod +x`)
75
+ 4. **Register the repository** with `Agentforce Vibes: Add Library` in VS Code
76
+ 5. **Refresh the extension** to index and display the new content
77
+
78
+ ## πŸ“ Prompt Format
79
+
80
+ Every prompt begins with YAML frontmatter that surfaces key metadata to contributors and tooling:
81
+
82
+ ```markdown
83
+ ---
84
+ name: Concise Prompt Title
85
+ description: One-sentence summary of the outcome you want
86
+ tags: category, use-case, tooling
87
+ requires_deploy: true # optional – include when pre-work is required
88
+ setup_summary: Deploy baseline trigger before refactor # optional helper text
89
+ ---
90
+ ```
91
+
92
+ - `name`, `description`, and `tags` are required.
93
+ - Use lowercase, comma-separated tags drawn from the category and focus area (e.g., `apex, refactor, testing`).
94
+ - Add `requires_deploy` (and an optional `setup_summary`) when the prompt depends on seed metadata or data.
95
+
96
+ After the frontmatter, organize the body with clear sections. A common pattern is:
97
+
98
+ 1. `## Setup` – only when pre-work, sample metadata, or environment configuration is needed.
99
+ 2. `## Context` – summarize the scenario, constraints, personas, or assets involved.
100
+ 3. `## Instructions` – detail the tasks in numbered steps, calling out decision points or checkpoints.
101
+ 4. `## Testing & Reporting` – define verification steps, coverage expectations, or deliverables.
102
+ 5. `## Follow-ups` – optional space for stretch goals, review questions, or iteration loops.
103
+
104
+ ### Example Prompt
105
+
106
+ **File:** `prompts/apex-development/trigger-refactoring.md`
107
+
108
+ ```markdown
109
+ ---
110
+ name: Trigger Refactor Helper
111
+ description: Refactor the Opportunity trigger into a handler pattern with tests
112
+ tags: apex, refactor, testing
113
+ requires_deploy: true
114
+ setup_summary: Deploy baseline trigger to target org before running instructions
115
+ ---
116
+
117
+ ## Setup
118
+ 1. Deploy the baseline trigger shown below to your default or scratch org.
119
+ 2. Confirm the trigger compiles successfully before continuing.
120
+
121
+ ```apex
122
+ // ... baseline trigger omitted for brevity ...
123
+ ```
124
+
125
+ ## Instructions
126
+ Refactor `OpportunityTrigger` into a handler class (or classes) that handles the same behavior using bulk-safe patterns. Ensure the trigger itself delegates and remains behaviorally identical.
127
+
128
+ ## Testing & Reporting
129
+ - Create unit tests covering positive and negative paths for each handler method.
130
+ - Include a bulk test that updates 50 `Opportunity` records where only half qualify for the `after update` logic.
131
+ - Deploy the refactored code and run the tests, then report coverage and key observations.
132
+ ```
133
+
134
+ ## πŸ› οΈ Agent Skills Format
135
+
136
+ Agent Skills extend prompts and rules by bundling executable workflows, scripts, and reference materials into self-contained directories. Skills follow the open [Agent Skills specification](https://agentskills.io/) and are portable across many agent tools (Cursor, Claude Code, VS Code extensions, etc.).
137
+
138
+ ### Directory Structure
139
+
140
+ Each skill is a folder containing:
141
+ - `SKILL.md` (required) - instructions + YAML frontmatter
142
+ - `scripts/` (optional) - executable Python/Bash/JS
143
+ - `references/` (optional) - additional documentation
144
+ - `assets/` (optional) - templates, schemas, lookup data
145
+
146
+ ### Required Frontmatter
147
+
148
+ ```yaml
149
+ ---
150
+ name: skill-name-here # lowercase, hyphens, matches folder name
151
+ description: What this skill does and when to use it (1-1024 chars)
152
+ license: Apache-2.0 # optional
153
+ compatibility: Requires... # optional
154
+ metadata: # optional
155
+ author: your-org
156
+ version: "1.0"
157
+ allowed-tools: Bash Read Write # optional, space-delimited
158
+ ---
159
+ ```
160
+
161
+ The `name` must:
162
+ - Be 1-64 characters
163
+ - Use only lowercase letters, numbers, and hyphens
164
+ - Match the parent directory name
165
+ - Not start or end with hyphens
166
+
167
+ The `description` should explain both what the skill does and when to use it, including keywords that help agents identify relevant tasks.
168
+
169
+ ### Progressive Disclosure
170
+
171
+ Skills are designed for efficient context use:
172
+
173
+ 1. **Discovery** - agents load only name + description at startup
174
+ 2. **Activation** - full SKILL.md loaded when needed
175
+ 3. **Execution** - scripts/references loaded on-demand
176
+
177
+ Keep your main `SKILL.md` under 500 lines and move detailed reference material to separate files.
178
+
179
+ ### Example Skill Structure
180
+
181
+ **File:** `skills/apex-development/trigger-refactor-pipeline/SKILL.md`
182
+
183
+ ```markdown
184
+ ---
185
+ name: trigger-refactor-pipeline
186
+ description: Refactor Salesforce triggers into handler patterns with automated test generation and deployment. Use when modernizing legacy triggers with DML/SOQL in loops.
187
+ license: Apache-2.0
188
+ compatibility: Requires Salesforce CLI, Python 3.9+, jq
189
+ metadata:
190
+ author: afv-library
191
+ version: "1.0"
192
+ ---
193
+
194
+ ## When to Use This Skill
195
+
196
+ Use when you need to modernize legacy triggers with DML/SOQL in loops or inconsistent patterns.
197
+
198
+ ## Step 1: Analyze Trigger
199
+
200
+ Run `scripts/analyze_trigger.py <TriggerName>` to identify anti-patterns:
201
+ - DML operations inside loops
202
+ - SOQL queries inside loops
203
+ - Missing bulkification
204
+
205
+ The script outputs a report showing:
206
+ - Line numbers with issues
207
+ - Recommended refactoring approach
208
+ - Complexity score
209
+
210
+ ## Step 2: Generate Handler
211
+
212
+ See [handler patterns reference](references/handler_patterns.md) for templates that match your trigger context:
213
+ - Before insert/update patterns
214
+ - After insert/update/delete patterns
215
+ - Bulk collection strategies
216
+
217
+ Copy the appropriate template from `assets/` and customize.
218
+
219
+ ## Step 3: Create Tests
220
+
221
+ Use `assets/test_template.apex` as a scaffold. Ensure coverage includes:
222
+ - Single record operations
223
+ - Bulk operations (200+ records)
224
+ - Mixed scenarios
225
+ - Negative cases
226
+
227
+ ## Step 4: Deploy and Validate
228
+
229
+ Deploy using Salesforce CLI and run all tests. Verify:
230
+ - All tests pass with 100% coverage
231
+ - No new governor limit issues
232
+ - Behavior matches original trigger
233
+ ```
234
+
235
+ ### Validation
236
+
237
+ Skills can be validated using the [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) tool:
238
+
239
+ ```bash
240
+ skills-ref validate ./skills/apex-development/trigger-refactor-pipeline
241
+ ```
242
+
243
+ This checks that your `SKILL.md` frontmatter is valid and follows all naming conventions.
244
+
245
+ ## πŸ“‚ Categories Guide
246
+
247
+ These starter categories reflect the current repository layout. Contributors are welcome to propose new ones or reorganize as long as the structure stays consistent for the VS Code extension.
248
+
249
+ ### When to Use Each Format
250
+
251
+ | Format | Use When | Example |
252
+ |--------|----------|---------|
253
+ | **Prompt** | Single-shot instruction for a straightforward task | "Create a validation rule on Account that prevents blank NumberOfEmployees" |
254
+ | **Rule** | Ongoing guardrail or standard to enforce | "Apex triggers must delegate to handler classes with bulk-safe patterns" |
255
+ | **Skill** | Multi-step workflow requiring scripts, templates, or reference docs | "Refactor trigger β†’ analyze anti-patterns β†’ generate handler β†’ create tests β†’ deploy" |
256
+
257
+ ### Prompts
258
+
259
+ | Category | Purpose | Example Topics |
260
+ |----------|---------|----------------|
261
+ | **apex-development** | Build and optimize Apex codebases | Trigger frameworks, async patterns, governor limit tuning |
262
+ | **lwc-development** | Craft Lightning Web Components | Component architecture, reactive data, UI patterns |
263
+ | **metadata-deployments** | Plan and execute releases | Packaging, Git branching, rollback prep |
264
+ | **vibe-coding** | Agentforce Vibes coding workflows | Apex/LWC scaffolds, prompt-to-code translation |
265
+ | **testing-automation** | Validate platform behavior | Apex tests, Flow scenarios, regression suites |
266
+ | **investigation-triage** | Diagnose and resolve issues | Incident response, log analysis, performance forensics |
267
+ | **data-operations** | Manage data pipelines | ETL prompts, bulk operations, platform events |
268
+ | **spec-driven-dev** | Generate and refine specification-first workflows | Requirement capture, traceability matrices, auto-generated tasks |
269
+ | **security-compliance** | Enforce standards and controls | Permission audits, secure coding, compliance narratives |
270
+ | **integration-fabric** | Coordinate external services | API design, middleware coordination, error recovery |
271
+ | **enablement-docs** | Share knowledge and runbooks | Onboarding guides, release notes, changelog automation |
272
+
273
+ ### Skills
274
+
275
+ Skills mirror the same category structure as prompts and rules. Each skill is a directory containing executable workflows.
276
+
277
+ | Category | Purpose | Example Skills |
278
+ |----------|---------|----------------|
279
+ | **apex-development** | Automated Apex refactoring and analysis | Trigger refactor pipeline, bulk operation optimizer |
280
+ | **lwc-development** | Lightning Web Component workflows | Component generator, accessibility audit |
281
+ | **flow-development** | Flow automation and optimization | Flow analyzer, subflow extractor |
282
+ | **metadata-deployments** | Release management automation | Deployment readiness check, rollback automation |
283
+ | **testing-automation** | Test generation and execution | Test data factory, coverage analyzer |
284
+ | **investigation-triage** | Debugging and diagnostics | Log parser, governor limit analyzer |
285
+ | **data-operations** | Data pipeline automation | ETL validator, data quality checker |
286
+ | **spec-driven-dev** | Specification-to-code workflows | Requirements parser, test case generator |
287
+
288
+ ### Rules
289
+
290
+ | Category | Focus | Example Assets |
291
+ |----------|-------|----------------|
292
+ | **apex-development** | Standards for Apex architecture and quality | Trigger guardrails, async execution policies |
293
+ | **lwc-development** | Front-end guardrails for Lightning Web Components | Accessibility checklists, component review templates |
294
+ | **metadata-deployments** | Release management discipline | Branching policies, deployment readiness reviews |
295
+ | **vibe-coding** | Coding quality for Agentforce Vibes assets | Code review criteria, secure pattern guides |
296
+ | **testing-automation** | Verification and validation expectations | Test coverage thresholds, regression playbooks |
297
+ | **investigation-triage** | Incident and root-cause response | Escalation runbooks, logging requirements |
298
+ | **data-operations** | Data stewardship and job governance | Data quality SLAs, bulk job safeguards |
299
+ | **spec-driven-dev** | Specification-first delivery standards | Definition-of-done templates, traceability requirements |
300
+ | **security-compliance** | Platform security and regulatory posture | Access reviews, compliance attestation steps |
301
+ | **integration-fabric** | External connection reliability | Retry policies, credential rotation standards |
302
+ | **enablement-docs** | Knowledge management and enablement | Release note templates, onboarding workflows |
303
+ | **org-governance** | Enterprise policy alignment | Org strategy playbooks, architecture review guidelines |
304
+ | **support-operations** | Production support excellence | Incident response SLAs, shift handover procedures |
305
+ | **ai-safety** | Responsible agent behavior | Ethical guidelines, bias detection checklists |
306
+
307
+ ## ✨ Creating New Prompts & Rules
308
+
309
+ 1. **Choose the right category** based on use case (if nothing fits, propose a new category)
310
+ 2. **Create a descriptive filename** (use kebab-case: `my-prompt.md`)
311
+ 3. **Add frontmatter** with name, description, and tags
312
+ 4. **Write clear instructions** with placeholders for user input
313
+ 5. **Test** before committing
314
+ 6. **Commit with message**: `Add [name] for [use case]`
315
+
316
+ ### Naming Conventions
317
+
318
+ - Use lowercase with hyphens: `code-review-helper.md`
319
+ - Be descriptive: `salesforce-apex-debug.md` not `debug.md`
320
+ - Include context: `blog-post-outline.md` not `outline.md`
321
+
322
+ ## πŸ”§ Best Practices
323
+
324
+ ### Writing Effective Prompts
325
+
326
+ - βœ… **Be specific** - Clear instructions yield better results
327
+ - βœ… **Use structure** - Numbered lists and sections help
328
+ - βœ… **Add context** - Explain what you want and why
329
+ - βœ… **Include examples** - Show expected output format
330
+ - βœ… **Test thoroughly** - Verify prompts work as intended
331
+
332
+ ### Prompt Engineering
333
+
334
+ - βœ… **Clarify the objective** – Capture the outcome, stakeholders, and success metrics directly in the frontmatter
335
+ - βœ… **Share context** – Provide links, metadata, or sample records so the agent can ground its reasoning
336
+ - βœ… **Set guardrails** – Define tone, compliance boundaries, what to avoid, and when to ask for confirmation
337
+ - βœ… **Guide the workflow** – Break the request into staged checkpoints (ideate β†’ propose β†’ confirm β†’ deliver)
338
+ - βœ… **Capture feedback loops** – Invite the agent to flag assumptions, pose questions, and suggest validation steps
339
+ - βœ… **Encourage adaptability** – Note how the prompt or rule can flex across org types, industries, and data volumes
340
+
341
+ #### Structuring Prompts
342
+
343
+ - **Prime with examples**: Include concise samples that illustrate the desired format or code pattern
344
+ - **Model the format**: Provide headings and numbered steps so the agent mirrors the final artifact
345
+ - **Address ambiguity**: Explicitly call out unknowns and ask the agent to gather missing inputs
346
+ - **Control verbosity**: Specify length limits, number of alternatives, or time horizons
347
+ - **Request diagnostics**: Ask the agent to share reasoning, risks, and verification plans when appropriate
348
+
349
+ #### Template: Multi-Step Prompt
350
+
351
+ ```markdown
352
+ ---
353
+ name: Apex Service Hardening Plan
354
+ description: Audit and fortify an Apex service to stay within governor limits while preserving behavior
355
+ tags: apex-development, optimization, audit
356
+ requires_deploy: false
357
+ ---
358
+
359
+ ## Context
360
+ - Usage profile: [Invocation volume, entry points, data scale]
361
+ - Known issues: [Timeouts, limit exceptions, performance complaints]
362
+ - Stakeholders: [Product owners, support teams, compliance partners]
363
+
364
+ ## Instructions
365
+ 1. Summarize existing architecture, dependencies, and limit usage; list assumptions needing confirmation.
366
+ 2. Propose at least two optimization strategies, including refactor scope, data implications, and rollback considerations.
367
+ 3. Recommend a preferred strategy once assumptions are resolved, detailing implementation phases and change management steps.
368
+
369
+ ## Testing & Reporting
370
+ - Define unit, integration, and bulk test coverage with pass criteria.
371
+ - Specify telemetry/observability updates (logging, metrics, alerts) to validate success.
372
+ - Produce an execution checklist with owners, timelines, and escalation contacts.
373
+ ```
374
+
375
+ ### Organizing Rules
376
+
377
+ - βœ… **One rule per file** - Keep rules focused and modular
378
+ - βœ… **Use clear names** - Describe what the rule enforces
379
+ - βœ… **Document purpose** - Explain why the rule exists
380
+ - βœ… **Keep updated** - Review and refine regularly
381
+ - βœ… **Version control** - Track changes over time
382
+
383
+ ## 🀝 Contributing
384
+
385
+ ### How to Contribute
386
+
387
+ See [Contributing](./CONTRIBUTING.md) for complete details.
388
+
389
+ **Contribution checklist**
390
+ - Confirm the file lives in the correct category folder
391
+ - Complete the YAML frontmatter (`name`, `description`, `tags`)
392
+ - Include clear instructions and placeholders for user-specific details
393
+ - Add a short note on how others can adapt the prompt, especially for varying Salesforce environments
394
+ - Verify the content respects licensing and attribution requirements
395
+ - Provide any supporting references or context in the pull request description
396
+
397
+ ### Creating New Skills
398
+
399
+ Skills are more complex than prompts and require additional setup:
400
+
401
+ 1. **Create a folder** under the appropriate `skills/<category>/` directory using lowercase + hyphens (e.g., `trigger-refactor-pipeline`).
402
+ 2. **Add a `SKILL.md` file** with required frontmatter:
403
+ - `name` - must match the folder name (lowercase, hyphens only)
404
+ - `description` - explain what the skill does and when to use it (1-1024 characters)
405
+ - Optional: `license`, `compatibility`, `metadata`, `allowed-tools`
406
+ 3. **Optionally add subdirectories**:
407
+ - `scripts/` - executable Python, Bash, or JavaScript files
408
+ - `references/` - additional documentation files
409
+ - `assets/` - templates, schemas, or lookup data
410
+ 4. **Validate your skill** using the [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) tool:
411
+ ```bash
412
+ skills-ref validate ./skills/<category>/<skill-name>
413
+ ```
414
+ 5. **Test the skill end-to-end** before submitting. Ensure:
415
+ - The skill activates correctly when the description keywords match
416
+ - All scripts execute without errors
417
+ - Reference files are accessible and well-organized
418
+ - The workflow produces the expected outcomes
419
+ 6. **Document dependencies** clearly in the `compatibility` field if your skill requires specific tools or system packages.
420
+
421
+ ### Feedback
422
+
423
+ Found an issue or have a suggestion?
424
+ - Open an issue in GitHub
425
+ - Suggest improvements via pull request
426
+ - Start a discussion in GitHub Discussions or the pull request thread
427
+
428
+ ## πŸ”„ Maintenance
429
+
430
+ ### Updating Prompts
431
+
432
+ To update an existing prompt:
433
+ 1. Edit the `.md` file
434
+ 2. Update the description if behavior changed
435
+ 3. Test the updated prompt
436
+ 4. Commit with clear message: `Update [prompt]: [what changed]`
437
+
438
+ ### Adding New Categories
439
+
440
+ To add a new category:
441
+ 1. Create new folders in `prompts/`, `rules/`, and `skills/` with matching names
442
+ 2. Add a `README.md` in each folder explaining the category's purpose
443
+ 3. Add initial prompts, rules, or skills following the format guidelines
444
+ 4. Update the main README with the new category in the appropriate tables
445
+ 5. Submit a pull request with the rationale for the new category
446
+
447
+ ### Updating Skills
448
+
449
+ To update an existing skill:
450
+ 1. Modify the `SKILL.md` or supporting files (`scripts/`, `references/`, `assets/`)
451
+ 2. Update the `metadata.version` field in the frontmatter
452
+ 3. Test all scripts and workflows end-to-end
453
+ 4. Validate using `skills-ref validate ./skills/<category>/<skill-name>`
454
+ 5. Commit with clear message: `Update [skill-name]: [what changed]`
455
+
456
+
457
+ # Experimental
458
+
459
+ ### Using with supporting AFV Library VS Code Extension
460
+
461
+ 1. Install the Agentforce Vibes VS Code extension (preview or later).
462
+ 2. Install the experiemnt [AFV library VSCode extension](https://github.com/forcedotcom/afv-library-extension).
463
+ 2. Open the command palette and run `Agentforce Vibes: Add Library`.
464
+ 3. Provide the Git URL (or local path) to this repository; the extension indexes every folder and `.md` file under `prompts/`, `rules/`, and `skills/`.
465
+ 4. The extension displays prompts, rules, and skills organized by category. Select any item to preview the metadata and copy instructions into the editor.
466
+ 5. Use the refresh command whenever new prompts, rules, or skills are added.
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@salesforce/afv-skills",
3
+ "version": "1.1.0",
4
+ "description": "Salesforce skills for Agentforce Vibes",
5
+ "license": "CC-BY-NC-4.0",
6
+ "files": [
7
+ "skills/"
8
+ ],
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "registry": "https://registry.npmjs.org"
12
+ },
13
+ "devDependencies": {
14
+ "tsx": "^4.21.0",
15
+ "@salesforce/webapp-template-app-react-sample-b2e-experimental": "*",
16
+ "@salesforce/webapp-template-app-react-sample-b2x-experimental": "*"
17
+ },
18
+ "scripts": {
19
+ "validate:skills": "tsx scripts/validate-skills.ts",
20
+ "sync-react-b2e-sample": "node scripts/sync-react-b2e-sample.js",
21
+ "sync-react-b2x-sample": "node scripts/sync-react-b2x-sample.js"
22
+ }
23
+ }