Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

agentforce-architecture-analyze

БесплатноЗапускает вложенные скриптыНе проверен

Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable…

forcedotcomот forcedotcom★ 1 200 звёзд на GitHub

Об этом скилле

agentforce-architecture-analyze — declared architecture snapshot

Design-time metadata tree for one Agentforce agent: planner → topics → actions → flows → Apex → prompts → NGA plugins. Reads declared metadata only — BotDefinition, GenAiPlanner*, GenAiPlugin*, GenAiFunction*, Flow, ApexClass, GenAiPromptTemplate. Does not read runtime audit rows.

Runtime budget: 30–45s typical, ≤60s hard cap on reference fixtures. Sequential baseline would be 90–220s; parallel Tooling SOQL fan-out delivers a 3–5× speedup. Large bots with many flows scale approximately linearly — each flow metadata retrieve is one round-trip.

Runs inline — no subagent. Every phase is deterministic file processing.

If the user hasn't named an agent

Trigger condition: $ARGUMENTS names no agent (no --agent flag and no exact BotDefinition API name in the prose). Never invent an agent name. Instead, discover what the org actually contains — one read-only query, no pipeline yet. Use the --org alias if given, otherwise the default target org (omit --target-org):

sf data query --query "SELECT DeveloperName, MasterLabel FROM BotDefinition ORDER BY DeveloperName" \
  [--target-org <alias>] --json

If the user gave no org alias, the pipeline block defaults --org to the CLI default target org itself (sf config get target-org --json → .result[0].value) — you don't need to resolve it.

Then branch on the rows returned:

  • Zero agents — tell the user the org has no Agentforce agents and stop. Do not fabricate an agent or a tree.
  • Exactly one agent, or exactly one whose DeveloperName/MasterLabel matches the user's description (e.g. "support", "service", "sales") — use it, say explicitly which agent you picked and why, then run the pipeline block below with ARG_AGENT=<DeveloperName> (and ARG_ORG=<alias> if the user named one) set as its first lines, e.g. ARG_AGENT=Customer_Support_Agent. The block reads ARG_* from the environment; flags in $ARGUMENTS still override.
  • Otherwise — print the block below, with the discovered agents listed as a numbered DeveloperName — MasterLabel table under the first line, and wait for the user to pick.
  • Query fails (no default org, auth error) — print the block below without the list.

Which agent should I document, and in which org?

I need:

  • Agent API name — the DeveloperName of the BotDefinition (e.g. MyAgent, MySalesAgent). Not the label.
  • Org alias — for sf CLI auth (the alias you configured with sf org login)

Optional:

  • Version — an agent_version_api_name like v5. If omitted, I'll resolve the active BotVersion.
  • --force — ignore cached tree; re-fetch everything.
  • --reprobe — re-run the 7-day channel-probe cache (only needed after a Salesforce release).

I'll run the metadata pipeline inline. Artifacts land under ~/.vibe/data/agentforce-architecture-analyze/<org_id15>/<agent_api_name>__<agent_version>/ (overridable with --data-dir).

Pipeline invocation

Run this block once the agent is known — from --agent <api_name> in $ARGUMENTS, or preset as ARG_AGENT=<DeveloperName> after discovery. --org (or ARG_ORG) is optional; without it the CLI default target org is used. One python3 invocation drives the full pipeline. main.py writes .emit_ctx.json; emit_result.py reads it and prints the final === RESULT === block last to stdout.

set -euo pipefail

# zsh arrays are 1-indexed by default; bash arrays are 0-indexed.
# This block uses 0-indexed semantics throughout (_args[$i] starting at i=0),
# so under zsh + `set -u` the very first read of `_args[0]` would trip
# `parameter not set`. KSH_ARRAYS makes zsh treat arrays as 0-indexed,
# matching the bash shebang's expectation. No-op under bash.
[ -n "${ZSH_VERSION:-}" ] && setopt KSH_ARRAYS

# <SKILL_DIR> = absolute path of this skill's own directory (the folder holding
# this SKILL.md); substitute it from the skill path in context. Runtimes install
# skills in different places, so also probe the known install roots and use the
# first that actually contains this skill's scripts. An exported SKILL_ROOT wins.
_skill=agentforce-architecture-analyze
for _c in "${SKILL_ROOT:-}" "<SKILL_DIR>" \
          "${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/$_skill}" \
          "${VIBES_SKILLS_DIR:+$VIBES_SKILLS_DIR/$_skill}" \
          "$HOME/.claude/skills/$_skill" "$PWD/.claude/skills/$_skill" \
          "${PLUGIN_ROOT:-$HOME/.vibe/skills}/$_skill"; do
  [ -n "$_c" ] || continue
  # Some stagers (ADK eval) nest the bundled files under <skill>/artifacts/.
  for _r in "$_c" "$_c/artifacts"; do
    [ -f "$_r/scripts/main.py" ] && { SKILL_ROOT="$_r"; break 2; }
  done
done
[ -f "${SKILL_ROOT:-}/scripts/main.py" ] || { echo "$_skill: scripts not found — set SKILL_ROOT to this skill's directory" >&2; exit 1; }

# Argument parser. Accepts both `--org foo` and `--org=foo`.
# `$ARGUMENTS` is the
Полный SKILL.md на GitHub

Установить agentforce-architecture-analyze в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdassets/cli/describe_sobject.yamlassets/cli/describe_tooling_sobject.yamlassets/cli/list_metadata_genaiprompttemplate.yamlassets/cli/org_display.yamlassets/cli/retrieve_genai_plugin.yamlassets/cli/show_access_token.yamlassets/mermaid/action_tree.mmdassets/mermaid/data_flow.mmdassets/mermaid/dependency_graph.mmdassets/mermaid/invocation_sequence.mmdassets/mermaid/planner_state.mmdassets/soql/apex_class_bodies_by_ids.soqlassets/soql/apex_class_bodies_by_names.soqlassets/soql/bot_definition_details.soqlassets/soql/bot_version_lookup.soqlassets/soql/flow_definition_by_ids.soqlassets/soql/flow_definition_ids_by_names.soqlassets/soql/flow_definition_view_by_durable_ids.soqlassets/soql/flow_metadata_by_id.soqlassets/soql/functions_by_plugins.soqlassets/soql/planner_attrs_by_parent_ids.soqlassets/soql/planner_bundle_functions.soqlassets/soql/planner_definition_by_agent_chain.soqlassets/soql/plugin_functions_by_plugin_ids.soqlassets/soql/plugin_instructions_by_plugin_ids.soqlassets/soql/plugins_by_planner.soqlreferences/architecture_sections.mdreferences/contract.jsonreferences/soql_fields.mdscripts/_shared/__init__.pyscripts/_shared/fs_guard.pyscripts/_shared/paths.pyscripts/_shared/runtime.pyscripts/_shared/sql.pyscripts/cache_check.pyscripts/config.pyscripts/emit_env.pyscripts/emit_result.pyscripts/fetch_soql.py

FAQ

Что делает скилл agentforce-architecture-analyze?

Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces).

Как установить скилл agentforce-architecture-analyze?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл agentforce-architecture-analyze запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить agentforce-architecture-analyze с