> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a skill

> Update a skill. Creates a new version if body content changes.

Enforces ownership: only the creator, owning workspace editors,
or org admins can modify.
Stability must be one of: `stable`, `experimental`, `deprecated`.



## OpenAPI

````yaml /openapi.json put /api/v1/skills/{skill_id}
openapi: 3.1.0
info:
  title: DecimalAI Platform
  description: Agent Dataset Lifecycle Platform — Backend API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
tags:
  - name: traces
    description: >-
      Ingest, search, and inspect agent execution traces. A trace is the atomic
      unit of the platform — every other feature (evaluation, compatibility
      scoring, dataset building) operates on traces. Each trace is auto-tagged
      with the manifest hash of the agent that produced it.
  - name: eval-scores
    description: >-
      Push, fetch, and aggregate per-trace evaluation scores. Scores carry
      source provenance (built-in, DeepEval, LangSmith, custom) and feed the
      unified decision engine, which produces a keep / repair / replay / drop
      verdict per trace.
  - name: skills
    description: >-
      Manage reusable instruction blocks (SKILL.md files) that modify agent
      behavior. Skills are first-class manifest components — changes to a skill
      appear in your regression-check impact reports. Use these endpoints to
      create, version, fork, and sync skills with your local SKILL.md files.
  - name: manifests
    description: >-
      Register and inspect manifest versions. A manifest is a snapshot of your
      agent's structural identity (tools, prompts, models, skills) at a point in
      time. The SDK registers manifests automatically; these endpoints expose
      the underlying records.
  - name: datasets
    description: >-
      Build versioned SFT/DPO training datasets from manifest-classified,
      eval-scored traces. Datasets are reproducible — each version locks the
      manifest and filter set used to build it. Export as JSONL, Parquet, or
      push to HuggingFace Hub.
  - name: replay
    description: >-
      Re-execute historical traces against a new manifest version. Replay is the
      deferred-future capability for behavioral verification of agent changes.
      The SDK creates a replay batch, your worker executes each task, then
      submits results back here for eval scoring.
  - name: registry
    description: >-
      Browse and install community skills from the public skills registry. Each
      registry skill carries a SkillScore — an evidence-tiered quality composite
      computed from real-world evals, benchmarks, and ratings across
      organizations. Installing creates a fork in your org — edits don't affect
      the public version.
  - name: agents
    description: >-
      List and inspect agents, plus their multi-agent topology (orchestrator →
      sub-agent edges discovered from traces). Agents are identified by a stable
      agent_name string set in your SDK init() call.
  - name: import
    description: >-
      Bulk-import historical traces from another observability platform or a
      JSONL backup. Useful for migrating from LangSmith / Braintrust / Langfuse.
      Duplicate trace IDs are silently skipped — re-running an import is safe.
paths:
  /api/v1/skills/{skill_id}:
    put:
      tags:
        - skills
      summary: Update a skill
      description: |-
        Update a skill. Creates a new version if body content changes.

        Enforces ownership: only the creator, owning workspace editors,
        or org admins can modify.
        Stability must be one of: `stable`, `experimental`, `deprecated`.
      operationId: update_skill_api_v1_skills__skill_id__put
      parameters:
        - name: skill_id
          in: path
          required: true
          schema:
            type: string
            description: The skill's stable ID (prefixed 'sk_').
            examples:
              - sk_abc123
            title: Skill Id
          description: The skill's stable ID (prefixed 'sk_').
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
            title: Authorization
        - name: decimal_session
          in: cookie
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Decimal Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSkillRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSkillResponse'
              example:
                status: ok
                skill_id: sk_abc123
                name: search-flights
                latest_version_id: sv_v4
        '403':
          description: Caller is not the owner or a workspace editor.
        '404':
          description: Skill not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          label: Python SDK
          source: |-
            from decimalai.skill_router import SkillRouter

            router = SkillRouter(api_key="dai_sk_...")
            router.update_skill(
                skill_id="sk_abc123",
                body_markdown="Updated skill content...",
                change_summary="Tightened the retry guidance.",
            )
components:
  schemas:
    UpdateSkillRequest:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Display Name
          description: Human registry title shown instead of the slug `name`.
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        body_markdown:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Markdown
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
        stability:
          anyOf:
            - type: string
            - type: 'null'
          title: Stability
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        category:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Category
        skill_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Skill Type
          description: >-
            Taxonomy class: capability or preference (legacy
            model-gap/proprietary/convention still accepted).
        skill_scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Skill Scope
          description: 'Knowledge scope: public or private.'
        invocation_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Invocation Mode
          description: 'Who may fire the skill: model, user, or any.'
        trigger_phrases:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Trigger Phrases
        frontmatter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Frontmatter
        change_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Summary
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
      type: object
      title: UpdateSkillRequest
      description: |-
        Validated request for PUT /skills/{id}.

        All fields optional (partial update).
    UpdateSkillResponse:
      properties:
        status:
          type: string
          const: ok
          title: Status
        skill_id:
          type: string
          title: Skill Id
        name:
          type: string
          title: Name
        latest_version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Version Id
          description: ID of the new version if body changed; unchanged otherwise.
      type: object
      required:
        - status
        - skill_id
        - name
      title: UpdateSkillResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Enter your API key (e.g. dai_sk_test_key_001)

````