跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 fusion-devtools

Fusion Devtools

使用Fusion DevTools CLI (fdev) 用于API测试,令牌获取,服务发现,开发过程中的人物查询. 使用for:称Fusion REST APIs,获得作为JSON的访问符,发现服务与环境,解决人,PIM角色活化. 不使用用于:修改后端服务代码,部署服务,基础设施改变,CI/CD管道配置,或服务巴士业务.

1079 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

使用Fusion DevTools CLI (fdev) 用于API测试,令牌获取,服务发现,开发过程中的人物查询. 使用for:称Fusion REST APIs,获得作为JSON的访问符,发现服务与环境,解决人,PIM角色活化. 不使用用于:修改后端服务代码,部署服务,基础设施改变,CI/CD管道配置,或服务巴士业务.

何时用

需要与命令行的Fusion平台服务交互时使用——呼叫API,获取符号,发现服务,或查询人员

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Fusion DevTools、When to use、When not to use、Prerequisites、Core workflows、1 — Call a Fusion REST API。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文还引用了 references/,属于带资源的技能包,代理会按需再读这些文件。

官方 description(原文)

Use Fusion DevTools CLI (fdev) for API testing, token acquisition, service discovery, and person lookup during development. USE FOR: calling Fusion REST APIs, getting access tokens as JSON, discovering services and environments, resolving persons, PIM role activation. DO NOT USE FOR: modifying backend service code, deploying services, infrastructure changes, CI/CD pipeline configuration, or Service Bus operations.

Fusion DevToolsWhen to useWhen not to usePrerequisitesCore workflows1 — Call a Fusion REST APIGET from people service (production)POST with JSON bodyPOST with body from fileDifferent environmentSave response to fileFull URL mode (skip discovery)

兼容:Requires fdev installed as a .NET global tool (dotnet tool install --global --add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" fusion-devtools). Requires Azure AD login (fdev login). Works best alongside fusion-backend-dev for understanding API contracts before calling them. · 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
fusion-devtools
description
Use Fusion DevTools CLI (fdev) for API testing, token acquisition, service discovery, and person lookup during development. USE FOR: calling Fusion REST APIs, getting access tokens as JSON, discovering services and environments, resolving persons, PIM role activation. DO NOT USE FOR: modifying backend service code, deploying services, infrastructure changes, CI/CD pipeline configuration, or Service Bus operations.
compatibility
Requires fdev installed as a .NET global tool (dotnet tool install --global --add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" fusion-devtools). Requires Azure AD login (fdev login). Works best alongside fusion-backend-dev for understanding API contracts before calling them.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「fusion-devtools」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-036968b096e6ca59-Fusion-%E5%87%BD%E6%95%B0.html
请存为 .cursor/skills/fusion-devtools/SKILL.md 或 .claude/skills/fusion-devtools/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/equinor/fusion-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/equinor/fusion-skills' --list

npx skills add 'https://github.com/equinor/fusion-skills' --skill 'fusion-devtools'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: fusion-devtools description: 'Use Fusion DevTools CLI (fdev) for API testing, token acquisition, service discovery, and person lookup during development. USE FOR: calling Fusion REST APIs, getting access tokens as JSON, discovering services and environments, resolving persons, PIM role activation. DO NOT USE FOR: modifying backend service code, deploying services, infrastructure changes, CI/CD pipeline configuration, or Service Bus operations.' license: MIT compatibility: > Requires fdev installed as a .NET global tool (dotnet tool install --global --add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" fusion-devtools). Requires Azure AD login (fdev login). Works best alongside fusion-backend-dev for understanding API contracts before calling them. metadata: version: "0.1.1" status: active owner: "@equinor/fusion-core" tags: - fusion - devtools - cli - rest-api - token - service-discovery - debugging - testing --- # Fusion DevTools ## When to use Use when you need to interact with Fusion platform services from the command line — calling APIs, getting tokens, discovering services, or looking up persons. Typical triggers: - "Call the People API" - "Get a token for the context service" - "Which services are available in production?" - "Test this endpoint" - "Resolve this person's Azure ID" - "What's the base URL for the org service?" - "Get me an access token I can pipe to jq" Implicit triggers: - Agent needs to verify an API contract or response shape - Agent needs a bearer token for an HTTP request - Agent needs to find which service key maps to a URL - Agent needs to look up a person's identity for test data ## When not to use - Modifying backend service source code — use the service repo directly - Deploying or publishing services — use CI/CD pipelines - Infrastructure provisioning — use Terraform/Bicep - Service Bus / SignalR debugging — use Azure portal or dedicated tooling - Managing AI search indexes — separate ops concern ## Prerequisites Install fdev as a .NET global tool: ```bash dotnet tool install --global --add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" fusion-devtools ``` Update to latest: ```bash dotnet tool update --global --add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" fusion-devtools ``` Authenticate before first use: ```bash fdev login ``` ## Core workflows ### 1 — Call a Fusion REST API Use `fdev rest` to call any Fusion service. Service discovery resolves the base URL and acquires a token automatically. ```bash fdev rest '' ``` The path must be quoted in zsh/bash to prevent `?` glob expansion. **Examples:** ```bash # GET from people service (production) fdev rest people '/persons/me?api-version=3.0' # POST with JSON body fdev rest context '/contexts?api-version=1.0' -m post -b '{"query":"test"}' # POST with body from file fdev rest people '/persons/search?api-version=3.0' -m post -b @request.json # Different environment fdev rest people '/persons/me?api-version=3.0' -e ci # Save response to file fdev rest people '/persons/me?api-version=3.0' -o response.json # Full URL mode (skip discovery) fdev rest --url https://httpbin.org/get --no-auth # Custom scope override fdev rest people '/persons/me?api-version=3.0' --scope api://my-app/.default ``` Key options: `-m` method, `-b` body (`@file` supported), `-e` environment, `--url` full URL mode, `--no-auth` skip auth, `--scope` override scope, `-o` output file, `--header KEY=VALUE`. ### 2 — Get an access token Use `fdev get-access-token` for structured JSON token output, similar to `az account get-access-token`. Output is pipe-friendly. ```bash # Token for a specific service (resolves scope via discovery) fdev get-access-token --service-key people # Token with explicit scope fdev get-access-token --scope api://97978493-9777-4d48-b38a-67b0b9cd88d2/.default # Extract just the token fdev get-access-token --service-key people | jq -r '.accessToken' ``` Output format: ```json { "accessToken": "eyJ...", "expiresOn": "2026-05-15T12:00:00+00:00", "expiresOnUnix": 1778846400, "scope": "api://app-id/.default", "tokenType": "Bearer" } ``` ### 3 — Discover services and environments ```bash # List all environments fdev disc envs # List services in an environment (JSON output) # Note: disc subcommand uses single-dash flags (-json, -out) — this is by design fdev disc env list fprd -json # List services showing key and URI fdev disc env list fprd -out ku ``` ### 4 — Look up a person ```bash # Resolve by email fdev persons resolve [email protected] # Search by name fdev persons search "John" ``` ### 5 — Activate PIM role Elevate Azure access when needed for admin operations: ```bash fdev pim azure activate ``` **Safety: always confirm with the user before running PIM activation — this grants elevated access.** ### 6 — Get a raw JWT token (clipboard) For quick clipboard-based token workflows (existing command): ```bash fdev token # test environment token fdev token --prod # production token ``` ## Instructions ### Step 1 — Confirm fdev is available Before using any fdev command, verify it is installed: ```bash fdev --version ``` If not installed, show the install command from Prerequisites. If authentication is needed, run `fdev login`. ### Step 2 — Choose the right command | Need | Command | |---|---| | Call a Fusion API and see the response | `fdev rest ''` | | Get a token for scripting/piping | `fdev get-access-token --service-key ` | | Find available services | `fdev disc env list ` | | Find service base URL and scope | `fdev disc env list -json` then filter by key | | Look up a person | `fdev persons resolve ` | | Quick clipboard token | `fdev token` | ### Step 3 — Use verbose mode for debugging Add `--verbose` to any command for diagnostic output including cache hit/miss, full request/response headers, and token details. ```bash fdev rest people '/persons/me?api-version=3.0' --verbose ``` ### Step 4 — Bypass cache when needed Service discovery results are cached locally (environments: 24h, services: 1h). Use `--no-cache` to force fresh lookups: ```bash fdev rest people '/persons/me?api-version=3.0' --no-cache ``` ## Environments | Key | Purpose | Notes | |---|---|---| | `ci` | Continuous integration / development | Least stable, latest changes | | `fqa` | Quality assurance | Pre-production validation | | `fprd` | Production | Default environment | Default environment is `fprd` for all commands. Override with `-e `. ## Reference guides See `references/` for detailed command options and workflow recipes: - `command-reference.md` — compact command cheat sheet with all options - `agentic-patterns.md` — common agentic workflow recipes ## Safety - This skill is mutation-capable. Repository-local workflow instructions take precedence over inline guidance when they conflict. - Never expose raw access tokens in output shown to users — truncate or redact when displaying - Always quote paths containing `?` in shell commands to prevent glob expansion - Use `--no-auth` only for genuinely public endpoints - Confirm with the user before running `fdev pim azure activate` (elevated access) - Do not store or log tokens to files unless explicitly requested

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…