agent-deploy
Skill1 starsChanged 7 months agoMITView on GitHub
Deploy AgentDefinition metadata + register the eval suite with Testing Center, with Trust Layer + eval-regression gating. Refuses to deploy if /argo:trust-layer-audit or /argo:agent-test fail.
In this repository53 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- adrSkill
- agent-discoverSkill
- agent-eval-trendSkill
- agent-exchange-listSkill
- agent-specSkill
- agent-testSkill
- agent-vs-flow-vs-apexSkill
- before-vs-after-triggerSkill
- code-reviewSkill
- complexitySkill
- coverage-trendSkill
- dead-codeSkill
- dependency-graphSkill
- deploySkill
- destructive-changesSkill
- diff-deploySkill
- erdSkill
- field-impactSkill
- flaky-test-finderSkill
- flow-auditSkill
- flow-vs-apexSkill
- fls-auditSkill
- gateway-configSkill
- generate-docsSkill
- limit-usageSkill
- lwc-vs-reactSkill
- mcp-tool-vs-restSkill
- notifySkill
- onboardSkill
- org-diffSkill
- org-exploreSkill
- package-versionSkill
- pattern-packSkill
- perf-reviewSkill
- permset-auditSkill
- pr-prepareSkill
- queueable-vs-batchSkill
- quick-deploySkill
- react-initSkill
- release-notesSkill
- scratch-orgSkill
- security-scanSkill
- sequence-diagramSkill
- sf-initSkill
- sharing-reviewSkill
- slack-agentSkill
- soql-analyzerSkill
- test-coverageSkill
- test-dataSkill
- test-planSkill
- trust-evalSkill
- trust-layer-auditSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
If any fails, emit a [agent-deploy] BLOCKED message with the failing gate name and the underlying skill's output.
- Very specific: line 87
After a successful (non-validate) deploy, register evals via the sf CLI:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are deploying an agent — AgentDefinition + AgentVersion + topics + actions + sub-agents — and registering its eval suite with Testing Center so future runs are tracked. This is the agent-side counterpart to /argo:diff-deploy for code.
Read Project Config First
source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/config.sh"
source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/sf-cli.sh"
sf_cli_check || exit 2
ORG="$(sf_config_get '.platform.defaultTargetOrg' "$ENV")"
AGENT_DIR="$(sf_config_get '.paths.agentDefinitions // empty' "$ENV")"
[[ -z "$AGENT_DIR" ]] && AGENT_DIR="force-app/main/default/botDefinitions"Input
$ARGUMENTS:
<agent-name>— deploy this agent (must exist under<AGENT_DIR>/<name>/)--validate— dry-run viasf project deploy start --dry-run--skip-evals— deploy without running eval gates (NOT recommended; emits a warning)--skip-trust— skip/argo:trust-layer-audit(NOT recommended; emits a warning)--target-org <alias>/--env <name>— overrides--ci— machine output
Pre-deploy gates
The skill refuses to deploy unless the following pass (or are explicitly skipped with the --skip-* flags):
- Trust Layer audit —
/argo:trust-layer-audit <agent-name> --ciexits 0 - Eval suite passes —
/argo:agent-test <agent-name> --ci --fail-on errorexits 0 - Eval-regression check vs. main —
/argo:agent-eval-trend pr <agent-name>exits 0 - Agent discoverable —
/argo:agent-discover <agent-name> --ciconfirms source exists
If any fails, emit a [agent-deploy] BLOCKED message with the failing gate name and the underlying skill's output.
Steps
1. Resolve agent path
AGENT_PATH="${AGENT_DIR}/${NAME}"
[[ -d "$AGENT_PATH" ]] || { echo "[agent-deploy] not found: ${AGENT_PATH}" >&2; exit 2; }2. Run the gates (unless skipped)
gate_trust=0; gate_eval=0; gate_trend=0
[[ "$SKIP_TRUST" != "1" ]] && /argo:trust-layer-audit "$NAME" --ci || gate_trust=$?
[[ "$SKIP_EVALS" != "1" ]] && /argo:agent-test "$NAME" --ci --fail-on error || gate_eval=$?
[[ "$SKIP_EVALS" != "1" ]] && /argo:agent-eval-trend pr "$NAME" || gate_trend=$?
if (( gate_trust + gate_eval + gate_trend > 0 )); then
echo "[agent-deploy] BLOCKED: gates failed (trust=${gate_trust} eval=${gate_eval} trend=${gate_trend})" >&2
exit 1
fi(If --validate, the gates still run — better to know early; the deploy itself is the dry-run.)
3. Deploy the agent metadata
Bundle every file under the agent directory plus any cross-referenced bridge specs:
SOURCES=("$AGENT_PATH")
# If actions reference MCP bridges, include them in the deploy
for spec in mcp/bridges/*.json; do
if grep -lqE "$(basename "$spec" .json)" "${AGENT_PATH}/actions"/*.action-meta.xml 2>/dev/null; then
SOURCES+=("$spec")
fi
done
sf project deploy start \
--target-org "$ORG" \
${VALIDATE:+--dry-run} \
$(printf -- "--source-dir %q " "${SOURCES[@]}") \
--wait 30 \
--json4. Register eval suite with Testing Center
After a successful (non-validate) deploy, register evals via the sf CLI:
for case_file in tests/agent-evals/${NAME}/*.json; do
sf agent test register-case --target-org "$ORG" --agent "$NAME" --file "$case_file" --json
doneThis makes the eval suite visible in the Testing Center UI for ongoing monitoring.
5. Activate the new version
By default, deploys produce an inactive new AgentVersion. The deploy step does NOT auto-activate — operators activate via Setup or via:
sf data update record \
--target-org "$ORG" \
--sobject AgentVersion \
--where "BotDefinitionDeveloperName='${NAME}' AND VersionNumber=$(latest_version)" \
--values "Status='Active'"The skill prints the activation command rather than running it. Activation is an explicit operator decision that should not be automated by default.
6. Append to deploy history
echo '{"deployedAt":"...","org":"...","agent":"'"$NAME"'","version":"v3","validate":'"$VALIDATE"'}' \
>> "${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugin-data}/argo/agent-deploys/<project>/history.jsonl"7. Output
Default Markdown:
# Agent Deploy: order_helper
Pre-deploy gates:
✅ Trust Layer audit: 0 findings
✅ Eval suite: 8/8 passed (0.91 overall)
✅ Eval regression: no regressions vs main
✅ Agent discover: source verified
Deploy:
✅ AgentDefinition + 3 topics + 5 actions + 1 sub-agent + 2 MCP bridge specs
Org: DevVM
Mode: dry-run (--validate) [or: applied (12.4s)]
Eval registration with Testing Center:
✅ 8 cases registered for ongoing monitoring
## To activate the new version:
sf data update record --target-org DevVM --sobject AgentVersion ... \
--values "Status='Active'"
## Or via Setup
Setup → Agents → order_helper → Versions → "Activate" on v3CI mode JSON: {"agent":"order_helper","gates":{"trust":"pass","evals":"pass","regression":"pass"},"deployId":"0Af...","validateOnly":false,"casesRegistered":8}.
8. Exit codes
- 0 — deploy succeeded (or validate succeeded)
- 1 — gate failed OR deploy itself failed
- 2 — invocation error
Rules
- Don't activate by default. Activation routes user traffic to the new version; operators control that. Skill prints the command, doesn't run it
- Always include bridge specs when actions reference them. Otherwise the deployed agent has actions pointing at tools the org doesn't know about
- Skip flags emit warnings.
--skip-trustand--skip-evalsare escape hatches for emergencies, not standard practice. The output makes that clear - Dry-run honors gates too. Knowing the gates would have blocked is valuable even when validating
- Per-env activation status. Activate dev → run smoke evals → activate prod, sequentially. Don't activate everywhere at once
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

