Skip to content

Add azd ai skill create/update/show/list/download/delete to manage Foundry Skills from any directory #8142

@therealjohn

Description

@therealjohn

Feature Request

Please add azd ai skill commands to the agent extension that provide full CRUD on Skills in a Foundry Project, following the design specifications in foundrysdk_specs PR #165. This issue is part of the umbrella consolidation effort tracked in #8135 and is a sibling to the connection work in #8139 and project-context work in #8124.

Design Highlights

  • Command surface: azd ai skill create | update | delete | show | list | download
  • Three mutually exclusive create modes:
    1. Inline: --description <...> --instructions <...> -> POST /skills (JSON body)
    2. SKILL.md file: --file ./SKILL.md (CLI parses YAML front matter + Markdown body) -> POST /skills (JSON body)
    3. Gzip package: --file ./skill.tar.gz (CLI uploads as-is) -> POST /skills:import (application/gzip body)
    • The CLI errors out (rather than silently merging) if more than one mode is supplied.
  • Update: description, instructions, or full body via inline flags or --file.
  • Show: metadata only -- body is fetched via download.
  • List: paginated (--top, --orderby).
  • Download:
    • GET /skills/{name}:download always returns application/gzip.
    • Default: CLI extracts the gzip into --output-dir (default ./.agents/skills/<skill-name>/), so the caller ends up with SKILL.md and any sibling assets on disk.
    • --raw: writes the unmodified gzip archive to the output directory.
  • Delete: confirmation by default, --force to skip.
  • --file is not a manifest: read at invocation time only; the CLI does not track or re-read it.
  • Endpoint resolution: Inherits the standard 5-level resolution order from the umbrella surface.
  • Standalone operation: Works outside an azd project given a resolvable project endpoint.
  • Cross-cutting flags: --output json, --no-prompt, --debug, -p / --project-endpoint, --force (delete confirmation skip).

API dependencies

Per the Skills TypeSpec, the data-plane surface is already defined:

  • POST /skills (JSON body)
  • POST /skills:import (application/gzip body)
  • GET /skills/{name} (show)
  • POST /skills/{name} (update)
  • DELETE /skills/{name}
  • GET /skills (list, paginated)
  • GET /skills/{name}:download (application/gzip)

No new server changes required -- this is CLI integration work against an existing TypeSpec surface.


Please refer to the full design spec (foundrysdk_specs PR #165) -- specifically the Skills sub-section under Requirements, the API Surface table (rows 7-8), and the Hero Code Sample "Skill round-trip" scenario -- for implementation guidance.

Additional Context

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions