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.
scripts/generators/remote_site_xml.py
View on GitHub"""Generate Remote Site Settings XML for HTTP callout targets."""
from __future__ import annotations
import re
def safe_domain_name(domain: str) -> str:
"""Sanitize a domain for use as a Remote Site Setting name.
Replaces dots and hyphens with underscores.
e.g. 'api.github.com' -> 'api_github_com'
"""
return re.sub(r"[.\-]", "_", domain)
def generate_remote_site_xml(domain: str, description: str = "") -> str:
"""Generate a .remoteSite-meta.xml file for a Remote Site Setting.
Args:
domain: The domain to allow (e.g. 'api.github.com').
description: Human-readable description.
Returns:
Remote Site Setting XML string.
"""
url = f"https://{domain}"
if not description:
description = f"Remote site for {domain}"
return (
'<?xml version="1.0" encoding="UTF-8"?>\n'
'<RemotesiteSetting xmlns="http://soap.sforce.com/2006/04/metadata">\n'
f' <disableProtocolSecurity>false</disableProtocolSecurity>\n'
f' <description>{_escape_xml(description)}</description>\n'
f' <isActive>true</isActive>\n'
f' <url>{url}</url>\n'
'</RemotesiteSetting>\n'
)
def _escape_xml(text: str) -> str:
"""Escape special characters for XML content."""
return (text
.replace("&", "&")
.replace("<", "<")
.replace(">", ">")
.replace('"', """)
.replace("'", "'"))
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: 471k | 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: 471k | 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: 471k | 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 |