forcedotcom/sf-skills / plugins/builder/agentforce-adlc/skills/agentforce-generate
agentforce-generate
FlaggedBuild, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, reviews, or changes .agent files or aiAuthoringBundle metadata; asks to fix AgentScript, audit an existing agent, run an AgentScript health check, common-pitfall review, or baseline-versus-candidate repair loop; changes a response, action, subagent, route, state flow, or Agent Spec; migrates or upgrades a legacy GenAiPlannerBundle Agentforce agent (NOT an Einstein Bot) to an aiAuthoringBundle (Agent Script) agent; previews, debugs, deploys, publishes, or tests agents; uses sf agent generate/preview/publish/test; or manages Agentforce MCP servers, tools, assets, or authentication. DO NOT TRIGGER when: Apex, Flow, Prompt Template, Experience Cloud, or general Salesforce CLI work is unrelated to Agent Script; the source is an Einstein Bot (BotDefinition/BotVersion) — use agentforce-bot-upgrade; or the primary input is a production session or trace ID rather than an agent artifact.
references/scoring-rubric.md
View on GitHub# 100-Point Scoring Rubric
> Extracted from SKILL.md Section 6. This file is loaded on demand when the scoring rubric is needed.
Score every generated agent against this rubric before presenting to the user.
| Category | Points | Key Criteria |
|----------|--------|--------------|
| Structure & Syntax | 15 | Required blocks are present. Block order, nesting, indentation, field names, references, and string forms pass parser, linter, compiler, and emitted-artifact checks. |
| Safety & Responsible AI | 15 | Evaluated via safety review (7 categories): AI disclosure present, no impersonation/deception/manipulation, responsible data handling, no harmful content (including euphemisms), no discrimination (direct or proxy), clear scope boundaries, escalation paths for sensitive topics. Deduct 15 for any BLOCK finding, 5 per WARN finding. |
| Conversation & Instruction Quality | 20 | Each reachable branch has one compatible next outcome. Resolved global and local instructions are concrete and self-contained. Natural follow-up, correction, intent change, cancellation, and empty/failure paths work without stale authored state overriding the latest turn. |
| State & Deterministic Controls | 15 | The chosen posture balances predictable behavior against conversational flexibility. Mutable variables have a writer, consumer, and lifecycle proportionate to how long they live. Deterministic controls protect requirements whose failure cost warrants rigidity; prompt-led decisions preserve useful interpretation and recovery. Penalize duplicate, dead, contradictory, or unjustified state—not staged state merely for being staged. |
| Subagent Boundaries & Routing | 15 | Every subagent is reachable and changes objective, instructions, actions, authority, or escalation behavior. Transitions have one intended outcome and preserve fresh-intent routing. No orphan subagents, dialogue-stage subagents, generic focus locks, or accidental non-returning delegation. |
| Action Configuration & Evidence | 10 | Level 1 definitions and Level 2 invocations have exact I/O bindings and valid types. Use slot filling (`...`) for conversational inputs. Persist only outputs needed by a named later deterministic consumer. Consequential actions have machine-checkable authorization/confirmation, and responses claim external results only after successful action output. |
| Deployment Readiness | 10 | Valid `default_agent_user`. `developer_name` matches folder. `bundle-meta.xml` present with `<bundleType>AGENT</bundleType>`. Linked variables for service agents (`EndUserId`, `RoutableId`, `ContactId`). |
Do not award points merely for adding variables, branches, transitions, or
subagents. Complexity must have a named requirement or reproduced failure and
must improve the behavioral evaluations.
## Score Interpretation
| Score | Meaning | Action |
|-------|---------|--------|
| 90-100 | Eligible for release review | Run behavioral evaluations and obtain explicit release approval |
| 75-89 | Good with minor issues | Fix noted items, then re-score and re-evaluate |
| 60-74 | Needs work | Address structural and behavioral issues |
| Below 60 | BLOCK | Major rework required |
A score never authorizes deployment or publication. Parser/lint success,
behavioral evidence, and the user's explicit release approval remain separate
hard gates.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |