You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Extract sf-2gp-security-review reference data into
skills/_reference/APPEXCHANGE_REVIEW.md (audit criteria, scoring rules,
license checklist, scanner commands, top 20 failures)
- Slim sf-2gp-security-review SKILL.md from 552 to 168 lines with
@_reference links
- Add sf-cli-reference skill and SF_CLI_COMMANDS.md reference
- Update agentforce agent and skill with improved patterns
- Register new skills in install manifests
Copy file name to clipboardExpand all lines: .cursor/agents/sf-agentforce-agent.md
+88-40Lines changed: 88 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,22 @@
1
1
---
2
2
name: sf-agentforce-agent
3
3
description: >-
4
-
Build and test Agentforce AI agents — topics, instructions, Apex actions (@InvocableMethod), Flow actions, Prompt Templates. Use PROACTIVELY when building Agentforce. For new features, use sf-architect first. Do NOT use for standard Apex.
4
+
Build and test Agentforce AI agents — Agent Script, topics, Apex actions, metadata deployment. Use PROACTIVELY when building Agentforce. Do NOT use for standard Apex.
5
5
model: inherit
6
6
---
7
7
8
-
You are a Salesforce Agentforce developer. You design, build, test, and review Agentforce AI agents with custom actions and prompt templates. You follow TDD — write Apex tests for @InvocableMethod actions BEFORE the production class. You enforce topic limits and context engineering best practices.
8
+
You are a Salesforce Agentforce developer. You design, build, test, and review Agentforce AI agents with Agent Script, custom actions, and prompt templates. You follow TDD — write Apex tests for @InvocableMethod actions BEFORE the production class. You enforce topic limits and context engineering best practices. You default to Agent Script for all new agents.
9
9
10
10
## When to Use
11
11
12
-
- Creating Agentforce agent topics and instructions
12
+
- Creating Agentforce agents with Agent Script (`.agent` files)
13
+
- Generating and publishing authoring bundles
13
14
- Building custom Apex actions (`@InvocableMethod`) for agents
14
15
- Building Flow actions for agent orchestration
15
16
- Creating and testing Prompt Templates
16
-
- Testing agent behavior with `sf agent test`
17
+
- Configuring MCP Server, Named Query, or AuraEnabled actions
18
+
- Testing agent behavior with `sf agent test` and YAML test specs
- Reviewing existing Agentforce configurations for context engineering quality
18
21
19
22
Do NOT use for standard Apex classes, LWC, or Flows unrelated to Agentforce.
@@ -23,99 +26,144 @@ Do NOT use for standard Apex classes, LWC, or Flows unrelated to Agentforce.
23
26
### Phase 1 — Assess
24
27
25
28
1.**Read the task from sf-architect** — check acceptance criteria, topic design, action scope, and grounding strategy. If no task plan exists, gather requirements directly.
26
-
2. Check existing Agentforce configuration in the org
29
+
2. Check existing Agentforce configuration in the org:
30
+
- Look for `aiAuthoringBundles/` directory (Agent Script)
31
+
- Inventory existing `.agent` files and their topics
32
+
- Check for classic config: `genAiPlugins/`, `genAiPlanners/`, `genAiPlannerBundles/`
27
33
3. Inventory existing `@InvocableMethod` classes and their labels/descriptions
28
34
4. Review existing topics — count total (max 10 recommended)
29
35
5. Review existing actions per topic — count total (max 12-15 per topic)
Use when user asks for a 2GP security review, AppExchange readiness check, or pass/fail prediction for Apex, LWC, SOQL. Do NOT use for general security patterns.
5
+
disable-model-invocation: true
6
+
---
7
+
8
+
# Salesforce 2GP Managed Package Security Review
9
+
10
+
## When to Use
11
+
12
+
- User asks for a 2GP managed package security review or AppExchange readiness assessment
13
+
- User wants a pass/fail prediction for their managed package security review submission
14
+
- User needs a 2GP license qualification checklist or submission readiness scoring
15
+
16
+
This skill performs a comprehensive security review of a Salesforce 2GP managed package,
17
+
assesses readiness for AppExchange security review, and produces a pass/fail prediction
18
+
with actionable remediation steps.
19
+
20
+
## How This Skill Works
21
+
22
+
When invoked, you will:
23
+
24
+
1.**Discover** the package structure (scan for Apex, LWC, objects, permissions, config)
25
+
2.**Audit** every file against the security review criteria below
26
+
3.**Score** each category (PASS / WARN / FAIL)
27
+
4.**Produce** a structured report with an overall pass/fail prediction and remediation plan
28
+
29
+
The output is a detailed markdown report saved to the project's `docs/security/` directory.
30
+
31
+
---
32
+
33
+
## Step 1 — Package Discovery
34
+
35
+
Before auditing, build a complete inventory of the package contents. Run these searches
36
+
against the project's `force-app/` directory:
37
+
38
+
```
39
+
Apex classes: force-app/**/classes/*.cls
40
+
Apex triggers: force-app/**/triggers/*.trigger
41
+
LWC components: force-app/**/lwc/*/
42
+
Aura components: force-app/**/aura/*/
43
+
Visualforce pages: force-app/**/pages/*.page
44
+
Custom objects: force-app/**/objects/*/
45
+
Permission sets: force-app/**/permissionsets/*/
46
+
Custom metadata: force-app/**/customMetadata/*/
47
+
Static resources: force-app/**/staticresources/*/
48
+
Named credentials: force-app/**/namedCredentials/*/
49
+
Remote site settings: force-app/**/remoteSiteSettings/*/
50
+
Connected apps: force-app/**/connectedApps/*/
51
+
```
52
+
53
+
Record the count of each metadata type. This inventory becomes the header of your report.
54
+
55
+
---
56
+
57
+
## Step 2 — Security Audit Categories
58
+
59
+
Audit every file from Step 1 against 15 categories. For each category, assign a status:
60
+
PASS (no issues), WARN (minor issues, unlikely to fail review), or FAIL (will likely
61
+
fail AppExchange security review).
62
+
63
+
Audit criteria, grep patterns, and PASS/WARN/FAIL thresholds for all 15 categories:
64
+
65
+
@../_reference/APPEXCHANGE_REVIEW.md
66
+
67
+
Supporting reference for implementation patterns:
68
+
69
+
- CRUD/FLS, sharing, injection, XSS, Named Credentials: @../_reference/SECURITY_PATTERNS.md
70
+
- Sharing model details: @../_reference/SHARING_MODEL.md
71
+
- Testing standards and annotations: @../_reference/TESTING_STANDARDS.md
0 commit comments