Official agent skill

Add Endpoint

by Azure in Azure/azure-sdk-tools

Add a new FastAPI endpoint to APIView Copilot. An agent skill from Azure/azure-sdk-tools.

OfficialMITAuto-check passedBackend & APIs

Install Add Endpoint

skills CLI
$ npx skills add Azure/azure-sdk-tools --skill add-endpoint -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Azure/azure-sdk-tools add-endpoint --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Azure/azure-sdk-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/python-packages/apiview-copilot/.github/skills/add-endpoint .claude/skills/add-endpoint && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-endpoint
GitHub stars
134
Token cost
~1.9k tokens
SKILL.md length
542 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Add a new FastAPI endpoint to APIView Copilot. An agent skill from Azure/azure-sdk-tools.

  • Works in 5 steps: Define Pydantic request/response models → Define the endpoint function → Serialization → …
  • Create endpoint
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • New POST endpoint

What it does

Add Endpoint is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Add a new FastAPI endpoint to APIView Copilot. Use for: add endpoint, new endpoint, new API route, add route, create endpoint, add API, new POST endpoint, new GET endpoint.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development. It works with FastAPI and Python. The repository describes itself as: Tools repository leveraged by the Azure SDK team. The licence is MIT.

When your agent uses it

  • Create endpoint
  • New POST endpoint
  • New GET endpoint

Example prompts

  • “/add-endpoint”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Define Pydantic request/response models
  2. Define the endpoint function
  3. Serialization
  4. Add a corresponding CLI command
  5. Common pitfalls to avoid

What it can do on your machine

Read from SKILL.md and the folder at commit 6e4fb2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Endpoint loads about 1.9k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 542 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Azure/azure-sdk-tools at commit 6e4fb2b, republished under its MIT licence (© Azure). 542 words, ~1,911 tokens.

Download SKILL.mdSave it as .claude/skills/add-endpoint/SKILL.md (or your agent's skills folder).
name
add-endpoint
description
Add a new FastAPI endpoint to APIView Copilot. Use for: add endpoint, new endpoint, new API route, add route, create endpoint, add API, new POST endpoint, new GET endpoint.

Add a FastAPI Endpoint

Checklist

When adding a new endpoint, follow every step below.

1. Define Pydantic request/response models
  • Place models near where they're used — in app.py for endpoint-specific models, or in src/_models.py for shared/reusable models.
  • All multi-word field names MUST use camelCase aliases. Never expose snake_case in the JSON API.
  • Add class Config with populate_by_name = True on any model that has aliases so it can be constructed with either the Python name or the alias.
  • Use Field(...) for required fields, Field(None, ...) or Field(default=..., ...) for optional ones.
  • Every model must have a triple-double-quote docstring.
Example
python
class MyFeatureRequest(BaseModel):
    """Request model for my feature."""

    review_id: str = Field(..., alias="reviewId")
    language: str
    include_deleted: bool = Field(False, alias="includeDeleted")
    max_results: Optional[int] = Field(None, alias="maxResults")

    class Config:
        """Configuration for Pydantic model."""

        populate_by_name = True


class MyFeatureResponse(BaseModel):
    """Response model for my feature."""

    job_id: str = Field(..., alias="jobId")
    result_count: int = Field(..., alias="resultCount")

    class Config:
        """Configuration for Pydantic model."""

        populate_by_name = True
Rules
RuleCorrectWrong
JSON field casing"reviewId""review_id"
Alias declarationField(..., alias="reviewId")bare review_id: str for multi-word names
Config on aliased modelsclass Config: populate_by_name = Truemissing Config
Single-word fieldslanguage: str (no alias needed)language: str = Field(..., alias="language")
2. Define the endpoint function
  • Use @app.post(...) or @app.get(...) etc. with response_model= pointing to the response model.
  • Set status_code= when it's not the default 200 (e.g., 202 for async jobs).
  • Add Depends(require_roles(...)) for authentication. Use AppRole.READER / AppRole.APP_READER for read-only, AppRole.WRITER / AppRole.APP_WRITER for mutations.
  • Add a docstring describing the endpoint.
  • Wrap business logic in try/except and raise HTTPException with appropriate status codes.
  • For long-running work, use asyncio.to_thread(...) or background tasks.
Example
python
@app.post("/my-feature", response_model=MyFeatureResponse)
async def my_feature(
    request: MyFeatureRequest,
    _claims=Depends(require_roles(AppRole.READER, AppRole.APP_READER)),
):
    """Handle my feature requests."""
    try:
        result = await asyncio.to_thread(do_work, review_id=request.review_id)
        return MyFeatureResponse(job_id=result.id, result_count=result.count)
    except Exception as e:
        logger.error("Error in /my-feature: %s", e, exc_info=True)
        raise HTTPException(status_code=500, detail="Internal server error") from e
3. Serialization

FastAPI automatically serializes response models by alias when response_model is set. This means:

  • The JSON response will use the alias names (jobId, resultCount), not the Python names.
  • No extra by_alias=True call is needed — FastAPI handles this via the response_model.
  • When constructing a response object in code, use the Python field names: MyFeatureResponse(job_id=..., result_count=...).
4. Add a corresponding CLI command

Every endpoint must have a CLI command in cli.py with a --remote flag. The core logic must be shared between remote and local paths to the maximum extent practical.

Architecture: shared core function

Extract the business logic into a standalone function (in src/ or at module level in cli.py) that both the endpoint and the CLI's local path call. The CLI's --remote path sends an HTTP request to the endpoint instead.

                ┌─────────────┐
                │ core logic  │  ← shared function in src/
                │ (do_work)   │
                └──────┬──────┘
                       │
          ┌────────────┴────────────┐
          │                         │
   ┌──────┴──────┐          ┌──────┴──────┐
   │  app.py     │          │  cli.py     │
   │  endpoint   │          │  (local)    │
   └─────────────┘          └─────────────┘
                                   │
                            if --remote:
                            HTTP POST → endpoint
Show full SKILL.md (205 more words)Show less
CLI handler pattern
python
def my_feature(language: str, review_id: str, include_deleted: bool = False, remote: bool = False):
    """Describe the command."""
    if remote:
        # Remote: HTTP call to the deployed endpoint
        settings = SettingsManager()
        base_url = settings.get("WEBAPP_ENDPOINT")
        payload = {"language": language, "reviewId": review_id, "includeDeleted": include_deleted}
        resp = requests.post(
            f"{base_url}/my-feature", json=payload, headers=_build_auth_header(), timeout=60
        )
        if resp.status_code == 200:
            print(json.dumps(resp.json(), indent=2))
        else:
            print(f"Error: {resp.status_code} - {resp.text}")
    else:
        # Local: call shared core logic directly
        result = do_work(language=language, review_id=review_id, include_deleted=include_deleted)
        print(json.dumps(result, indent=2))

Key rules:

  • The --remote payload must use camelCase keys matching the endpoint's request model aliases.
  • Local mode calls the same core function that the endpoint calls.
  • Use _build_auth_header() for remote authentication.
  • Use SettingsManager().get("WEBAPP_ENDPOINT") for the base URL.
Register the command

In CliCommandsLoader.load_command_table, add the command to the appropriate CommandGroup:

python
with CommandGroup(self, "review", "__main__#{}") as g:
    # ... existing commands ...
    g.command("my-feature", "my_feature")

Register any command-specific arguments in load_arguments:

python
with ArgumentsContext(self, "review my-feature") as ac:
    ac.argument("review_id", options_list=["--review-id", "-r"], help="The review ID.")
    ac.argument("include_deleted", action="store_true", help="Include deleted items.")

Notes:

  • --remote and --language are already registered globally — don't re-register them.
  • Knack maps function parameter names to CLI flags automatically (e.g., review_id → --review-id).
  • Use type=resolve_language_to_canonical for language params (already global).
5. Common pitfalls to avoid
  • Never return raw dicts with snake_case keys from an endpoint. Always use a typed response model.
  • Never omit alias= on multi-word field names. The API contract is camelCase.
  • Never use model_config = ConfigDict(alias_generator=to_camel) — this project uses explicit alias= per field, not automatic generators.
  • Never forget populate_by_name = True on models with aliases — without it, the model can't be constructed using Python field names.
  • Never duplicate core logic between the endpoint and the CLI local path. Extract it into a shared function in src/.
  • Never use snake_case keys in the remote payload — the --remote path must send camelCase keys matching the request model aliases.
  • Never re-register --remote or --language in command-specific ArgumentsContext — they are global.

© Azure, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/python-packages/apiview-copilot/.github/skills/add-endpoint of Azure/azure-sdk-tools.

Open the folder on GitHubat commit 6e4fb2b

Compare with similar skills

Add Endpoint next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Endpoint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Endpoint this skillAzure/azure-sdk-tools134—~1.9kAutomated safety check: PassMIT
Fastcrudbenavlabs/fastcrud1.6k—~5kAutomated safety check: PassMIT
Phoenix ServerArize-ai/phoenix12k—~1.6kAutomated safety check: PassCustom licence
FastAPI Project Templateswshobson/agents40k12 repos~901Automated safety check: PassMIT
Holm Webvolfpeter/holm132—~1.2kAutomated safety check: PassMIT
Starlettesimonw/research783—~8.6kAutomated safety check: NotesNone

Similar skills

  • Fastcrud

    benavlabs/fastcrud

    A skill your agent uses when building or modifying CRUD endpoints with FastCRUD (the fastcrud PyPI package) in a FastAPI project — covers FastCRUD, crudrouter, EndpointCreator, FilterConfig…

    1.6k GitHub stars~5k tokensUpdated 13 days ago
    Backend & APIsAuto-check passed
  • Phoenix Server

    Arize-ai/phoenix

    Backend development guide for the Phoenix AI observability platform (Strawberry GraphQL, SQLAlchemy async, FastAPI).

    12k GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Scaffolds FastAPI projects with a layered app layout, dependency injection through Depends, async handlers and database access, middleware and pytest setup.

    40k GitHub starsUsed in 12 repos~901 tokens
    Backend & APIsAuto-check passed
  • Holm Web

    volfpeter/holm

    A skill your agent uses when working on web apps built with holm, or to answer questions about holm.

    132 GitHub stars~1.2k tokensUpdated 22 days ago
    Backend & APIsAuto-check passed
  • Starlette

    simonw/research

    Build async web applications and APIs with Starlette 1.0, the lightweight ASGI framework for Python.

    783 GitHub stars~8.6k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes
  • Fba

    Zhongye1/KnowAgenticRAG

    FastAPI Best Architecture (fba) project development guide. An agent skill from Zhongye1/KnowAgenticRAG.

    143 GitHub stars~758 tokensUpdated 8 days ago
    Backend & APIsAuto-check passed

More from Azure/azure-sdk-tools

All 35 skills in this repo
  • Apiview Feedback Resolution

    Azure/azure-sdk-tools

    Official

    Analyze and resolve APIView review feedback on Azure SDK PRs.

    134 GitHub stars~547 tokensUpdated today
    Auto-check passed
  • Official

    Deploy test resources and run Azure SDK tests in live, record, or playback mode.

    134 GitHub stars~1.5k tokensUpdated today
    Auto-check: notes
  • Azsdk Common Pipeline Analysis

    Azure/azure-sdk-tools

    Official

    Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format.

    134 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Official

    Create, get, update, abandon, and link SDK PRs to release plan work items for Azure SDK releases.

    134 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Azure Typespec Assessment

    Azure/azure-sdk-tools

    Official

    Assess Azure TypeSpec Git diffs for semantic intent, REST and downstream SDK breaking changes, Azure Guidelines compliance, and documentation completeness.

    134 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Add Endpoint

What does Add Endpoint do?

Add a new FastAPI endpoint to APIView Copilot. An agent skill from Azure/azure-sdk-tools. Add Endpoint is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Add a new FastAPI endpoint to APIView Copilot.

When should I use Add Endpoint?

Add Endpoint fits situations like: create endpoint; new POST endpoint; new GET endpoint.

How do I install Add Endpoint in Claude Code?

Run `npx skills add Azure/azure-sdk-tools --skill add-endpoint -a claude-code`. Or copy the skill folder (packages/python-packages/apiview-copilot/.github/skills/add-endpoint in Azure/azure-sdk-tools) into .claude/skills/add-endpoint in your project. Claude Code loads it when a task matches its description.

How do I install Add Endpoint in Codex?

Run `npx skills add Azure/azure-sdk-tools --skill add-endpoint -a codex`. Or copy the skill folder (packages/python-packages/apiview-copilot/.github/skills/add-endpoint in Azure/azure-sdk-tools) into .agents/skills/add-endpoint in your project. Codex loads it when a task matches its description.

Can I use Add Endpoint in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Azure/azure-sdk-tools --skill add-endpoint -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-endpoint, .gemini/skills/add-endpoint, .github/skills/add-endpoint and .opencode/skills/add-endpoint in your project.

What does Add Endpoint need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Endpoint is instructions for the agent only. Our summary lists: Python 3.

Does Add Endpoint access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Endpoint safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Endpoint use?

Add Endpoint is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Endpoint use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Endpoint?

Skills that share tags, products or a category with Add Endpoint: Fastcrud (benavlabs/fastcrud, 1.6k stars), Phoenix Server (Arize-ai/phoenix, 12k stars), FastAPI Project Templates (wshobson/agents, 40k stars) and Holm Web (volfpeter/holm, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Endpoint?

Azure (a GitHub organization, an official publisher) maintains it in Azure/azure-sdk-tools, which has 134 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: Azure/azure-sdk-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.