Frictionless Salesforce Agent Skill for Codex, Claude Code, and GitHub Copilot.
Project description
Salesforce Agent Optimizer
English | Italiano | Espanol | Simplified Chinese
Salesforce Agent Optimizer is an MIT-licensed Salesforce Agent Skill packaged as the
sfao command for Codex, Claude Code, and GitHub Copilot.
Current version: 1.0.2
It installs agent instructions that enforce Salesforce-first solutioning, configuration before custom code, minimal reversible changes, token-efficient Knowledge, least-privilege planning, explicit org aliases, package.xml awareness, and destructive-operation guardrails.
Quick Start
uv tool install salesforce-agent-optimizer
sfao install --project --platform all
sfao knowledge init --project-root .
sfao doctor
Use uv tool install or pipx install for CLI isolation. Plain pip install
works, but isolated tool installers usually avoid PATH and dependency friction.
Install
Recommended:
uv tool install salesforce-agent-optimizer
sfao install --project --platform all
sfao doctor
Alternative:
pipx install salesforce-agent-optimizer
sfao install --project --platform all
sfao doctor
Install directly from GitHub before or outside PyPI publication:
uv tool install git+https://github.com/lucabenedettini/salesforce-ai-agent-optimizer.git
sfao install --project --platform all
sfao doctor
Plain pip is acceptable when you intentionally want the command in the active
Python environment:
pip install git+https://github.com/lucabenedettini/salesforce-ai-agent-optimizer.git
sfao install --project --platform all
sfao doctor
Main sfao Commands
| Command | What it does |
|---|---|
sfao version |
Prints the installed Salesforce Agent Optimizer version. |
sfao install --project --platform all |
Installs Codex, Claude Code, and GitHub Copilot adapters in the current project. |
sfao install --project --platform codex |
Installs only the Codex project skill under .agents/skills/. |
sfao install --project --platform claude |
Installs only the Claude Code project skill under .claude/skills/. |
sfao install --project --platform copilot |
Installs only AGENTS.md and GitHub Copilot instruction files. |
sfao update --project --platform all |
Updates only files previously generated by sfao; user-edited files are skipped. |
sfao uninstall --project --platform all --yes |
Removes only generated adapter files; project folders and user-owned files are kept. |
sfao doctor |
Checks the local environment, installed adapters, Salesforce CLI availability, and common PATH issues. |
sfao doctor --verbose |
Prints full diagnostic details. |
sfao doctor --json |
Prints compact machine-readable diagnostics. |
sfao validate |
Validates installed files or the source tree, including frontmatter, YAML, TOML, JSON, Python, versions, and newline shape. |
sfao validate --verbose |
Prints validation details useful for troubleshooting. |
sfao validate --json |
Prints compact machine-readable validation results. |
sfao knowledge init --project-root . |
Creates .salesforce-agent-knowledge/ for a Salesforce project. |
sfao knowledge refresh --project-root . |
Refreshes local Knowledge after metadata changes. |
sfao knowledge doctor --project-root . |
Checks whether local Knowledge exists and is usable. |
sfao knowledge refresh --project-root . --target-org <alias> |
Optionally enriches Knowledge from an org. The alias must be explicit. |
sfao version-context scaffold |
Creates local Salesforce release/API context files if missing. |
sfao version-context update |
Refreshes concise Salesforce release/API/package guidance from official Salesforce sources. |
sfao version-context validate |
Checks version-context files for required content. |
What Gets Installed
For Codex:
.agents/skills/salesforce-agent-optimizer/SKILL.md
.agents/skills/salesforce-agent-optimizer/references/
.agents/skills/salesforce-agent-optimizer/scripts/
.agents/skills/salesforce-agent-optimizer/agents/openai.yaml
For Claude Code:
.claude/skills/salesforce-agent-optimizer/SKILL.md
.claude/skills/salesforce-agent-optimizer/references/
.claude/skills/salesforce-agent-optimizer/scripts/
For GitHub Copilot:
AGENTS.md
.github/copilot-instructions.md
.github/instructions/salesforce-agent-optimizer.instructions.md
Generated files contain this marker:
<!-- Generated by salesforce-agent-optimizer. Managed by sfao. -->
sfao never overwrites or removes user-owned files silently.
Agent Workflow
After installation, the agent instructions require the same phase-gated workflow for metadata information requests, bugfixes, new implementations, architecture work, reviews, release work, and org inspection:
- Review the request and restate scope, products/packages, org/environment, and acceptance criteria.
- Plan from relevant references, local Knowledge, metadata dependencies, least privilege, and official Salesforce context when needed.
- Ask for approval before file, metadata, org, deployable, or destructive changes.
- Implement only approved minimal changes, or mark implementation as
not requiredfor information-only requests. - Generate
package.xmlwhen metadata is added or modified. - Validate before the final answer.
- Return to planning after failed approval, tests, or validation; stop after three unsuccessful cycles.
- Summarize evidence, changes or no-change result, validation, risks, and ask whether to push and to which branch when repository changes exist.
Knowledge And Version Context
Create or refresh compact local Salesforce project Knowledge:
sfao knowledge init --project-root .
sfao knowledge refresh --project-root .
sfao knowledge doctor --project-root .
Refresh Salesforce release/API/package context:
sfao version-context scaffold
sfao version-context update
sfao version-context validate
Org access is never implicit. When a command needs Salesforce org metadata or data, the agent must ask for an explicit alias. Production orgs are read-only through the skill guardrails.
Update
uv tool upgrade salesforce-agent-optimizer
sfao update --project --platform all
sfao doctor
Alternative:
pipx upgrade salesforce-agent-optimizer
sfao update --project --platform all
sfao doctor
Uninstall
sfao uninstall --project --platform all --yes
uv tool uninstall salesforce-agent-optimizer
Alternative:
sfao uninstall --project --platform all --yes
pipx uninstall salesforce-agent-optimizer
Privacy And Safety
- Do not commit Salesforce credentials,
.sf/,.sfdx/, auth files, tokens, private keys, or local secrets. - Least privilege is required during planning: inspect current access before granting permissions and grant only the minimum access needed.
- Destructive data or metadata operations require explicit approval for the exact scope.
- Destructive CLI operations require the exact approval phrase
I explicitly approve this deletion. - Knowledge stores compact summaries and hashes, not raw secrets.
Troubleshooting
sfao: command not found
- Run
uv tool update-shell, open a new terminal, or add the tool bin directory to PATH. - On Windows, check the user Scripts directory printed by
pip.
uv: command not found
- Install
uv, or usepipx install salesforce-agent-optimizer.
PyPI package not found
- Use the GitHub install command until the package is published on PyPI.
Salesforce CLI sf not found
- Install the official Salesforce CLI and verify
sf --version.
Skill not visible in Codex, Claude Code, or GitHub Copilot
- Run the matching
sfao install --project --platform ...command again. - Restart the agent surface if it caches instructions.
- Run
sfao doctorandsfao validate.
Stale generated files or version mismatch
- Run
sfao update --project --platform all. - Run
sfao validate --verbose.
More Documentation
End-user and maintainer details live in the wiki source under docs/wiki/:
docs/wiki/Home.mddocs/wiki/Installation.mddocs/wiki/Packaging-And-Publishing.mddocs/wiki/Principles.mddocs/wiki/Testing-And-Manifests.mddocs/wiki/Versioning.md
Build, release, publishing, and package-maintenance details are intentionally kept out of this README so the user-facing install path stays short.
License
MIT. Anyone can use, copy, modify, distribute, and fork this repository under
the terms of LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file salesforce_agent_optimizer-1.0.2.tar.gz.
File metadata
- Download URL: salesforce_agent_optimizer-1.0.2.tar.gz
- Upload date:
- Size: 122.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50c508dc111b39edccbd99cfa1053c296c8f44781ebb72864bea50230020af6e
|
|
| MD5 |
ac78867b8dbfe00c4eee6cc5db75c9cf
|
|
| BLAKE2b-256 |
759ac438110471253b0e3052beeca18a0a39d7902f351f3e20360627b1029e08
|
Provenance
The following attestation bundles were made for salesforce_agent_optimizer-1.0.2.tar.gz:
Publisher:
release.yml on lucabenedettini/salesforce-ai-agent-optimizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
salesforce_agent_optimizer-1.0.2.tar.gz -
Subject digest:
50c508dc111b39edccbd99cfa1053c296c8f44781ebb72864bea50230020af6e - Sigstore transparency entry: 1712491085
- Sigstore integration time:
-
Permalink:
lucabenedettini/salesforce-ai-agent-optimizer@9eab5a7de6c8c749506085fa74361b54fc92b50e -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/lucabenedettini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9eab5a7de6c8c749506085fa74361b54fc92b50e -
Trigger Event:
push
-
Statement type:
File details
Details for the file salesforce_agent_optimizer-1.0.2-py3-none-any.whl.
File metadata
- Download URL: salesforce_agent_optimizer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 171.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1492ff9ba0dd64c69fa5cc1dac6cc002716b7297ed0435bac7c3d446ca5d2b
|
|
| MD5 |
26ec02181cd3323b68640ff6fa722426
|
|
| BLAKE2b-256 |
777d16ba77b6b88d97f2708def3afd9c8e12b7142cce7a8ededb07086672a5b9
|
Provenance
The following attestation bundles were made for salesforce_agent_optimizer-1.0.2-py3-none-any.whl:
Publisher:
release.yml on lucabenedettini/salesforce-ai-agent-optimizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
salesforce_agent_optimizer-1.0.2-py3-none-any.whl -
Subject digest:
5c1492ff9ba0dd64c69fa5cc1dac6cc002716b7297ed0435bac7c3d446ca5d2b - Sigstore transparency entry: 1712491097
- Sigstore integration time:
-
Permalink:
lucabenedettini/salesforce-ai-agent-optimizer@9eab5a7de6c8c749506085fa74361b54fc92b50e -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/lucabenedettini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9eab5a7de6c8c749506085fa74361b54fc92b50e -
Trigger Event:
push
-
Statement type: