Skip to content

feat(skills): inject skill instructions into Responses API system prompt #6134

@varshaprasad96

Description

@varshaprasad96

Summary

When skills are attached to a Responses API call, their SKILL.md instructions should be injected into the model's system prompt. This is the foundational integration layer — every skill needs its instructions surfaced to the model regardless of execution model.

This is Tier 1 of the Skills–Responses integration (see #5891 for the Skills CRUD API, now complete).

Motivation

The Skills API (#5891) provides CRUD for versioned skill bundles, but skills are inert without integration into the inference path. The most immediate value is making the model aware of skill instructions so it can follow them when using existing tools (code_interpreter, file_search, function calls).

Example: a "code-review" skill with SKILL.md instructions like "Always check for SQL injection, XSS, and auth bypass" would guide the model's behavior during a Responses API call without requiring any new tool type or container.

Proposed Design

Add a skills parameter to the Responses API create endpoint:

response = client.responses.create(
    model="gpt-4o",
    input="Review this code for security issues",
    skills=["skill-abc123"],  # skill IDs
)

When skills is provided:

  1. The Responses provider resolves each skill ID via the Skills API
  2. For each skill, reads the SKILL.md manifest (name, description, instructions)
  3. Prepends the skill instructions to the system prompt, formatted as:
## Skill: {name}
{description}

### Instructions
{instructions}
  1. The model generates its response with the skill context available

Tasks

  • 1. Add skills parameter (list of skill IDs) to the Responses API create request model
  • 2. Add Api.skills as an optional dependency for the Responses provider
  • 3. In the builtin Responses provider, resolve skill IDs and read SKILL.md instructions
  • 4. Inject skill instructions into the system prompt before the inference call
  • 5. Add unit tests for skill instruction injection
  • 6. Add integration test: create skill → create response with skill → verify instructions influence output
  • 7. Update OpenAPI spec and provider docs

Dependencies

Non-goals (handled by separate issues)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions