Skip to content

feat(openai-docs): add OpenAI Docs plugin#253

Open
amondnet wants to merge 4 commits into
mainfrom
amondnet/openai-docs
Open

feat(openai-docs): add OpenAI Docs plugin#253
amondnet wants to merge 4 commits into
mainfrom
amondnet/openai-docs

Conversation

@amondnet

@amondnet amondnet commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Adds the openai-docs plugin to surface official OpenAI developer docs, model selection, and migration guidance via the openaiDeveloperDocs MCP server. Expands path validation in the latest‑model resolver (including file://) and improves CLI arg handling; CI excludes vendored skill code in Codacy.

  • New Features

    • Local openai-docs plugin (Apache-2.0; NOTICE included) with README and 1.0.0 release.
    • Bundles openaiDeveloperDocs MCP server (https://developers.openai.com/mcp) with tools: search_openai_docs, fetch_openai_doc, list_openai_docs, get_openapi_spec.
    • Fallback references and scripts/resolve-latest-model-info.js for latest-model and guide URL resolution.
    • Marketplace entries for .agents, .claude-plugin, .cursor-plugin, plus relevance signals (OpenAI hosts and package.json openai dep).
  • Bug Fixes

    • Harden scripts/resolve-latest-model-info.js: confine reads to the working directory for both plain paths and file:// URLs; throw clear errors when --source/--url/--base-url lack values.
    • Exclude vendored plugins/openai-docs/skills/openai-docs/** from Codacy.

Written for commit 3e5417a. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added an “OpenAI Docs” plugin with built-in access to OpenAI developer documentation and related guidance.
    • Added support for installing the new plugin from the marketplace and via the documented install command.
  • Documentation

    • Updated the README and plugin docs with setup details, capabilities, and usage guidance.
    • Added reference guides for model selection, prompting, and upgrading workflows.
  • Chores

    • Registered the new plugin across marketplace and release configuration files.
    • Excluded plugin-specific files from static analysis.

Add a new local plugin bundling OpenAI's openai-docs skill (from the
openai/codex repo sample, Apache-2.0) with the openaiDeveloperDocs
remote HTTP MCP server (https://developers.openai.com/mcp).

The skill was adapted for Claude Code: Codex-agent-specific content
(Codex manual helper, self-knowledge/surface-map sections, `codex mcp
add` steps, fetch-codex-manual.mjs, agents/+assets/) was removed,
while OpenAI docs MCP guidance, model selection, migration, and
prompting guidance were retained. A NOTICE file records the source,
Apache-2.0 license, and modifications.

- plugins/openai-docs/ — Claude source manifest
  (.claude-plugin/plugin.json), generated runtime manifests
  (.codex-plugin/, .cursor-plugin/, root plugin.json, .mcp.json,
  mcp_config.json), README, and skills/openai-docs/ (SKILL.md,
  references/, scripts/resolve-latest-model-info.js, LICENSE.txt,
  NOTICE)
- .claude-plugin/marketplace.json — new entry (source of truth) with
  relevance signals
- .agents/plugins/marketplace.json, .cursor-plugin/marketplace.json —
  generated marketplace entries
- release-please-config.json, .release-please-manifest.json —
  version tracking (1.0.0)
- README.md — Built-in Plugins listing
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
claude-code-plugins Ready Ready Preview, Comment Jul 7, 2026 4:29am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new "openai-docs" plugin registered across all marketplace/manifest files (agents, claude, cursor, release manifest, release-please config, README, Codacy excludes). It includes per-agent plugin manifests, MCP server configuration pointing to OpenAI's Developer Docs endpoint, a SKILL.md defining MCP-based documentation workflows, bundled reference guides (latest-model mapping, prompting guide, upgrade guide), license/notice files, and a Node.js script to resolve latest model metadata from markdown.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Changes

OpenAI Docs Plugin Addition

Layer / File(s) Summary
Marketplace and manifest registrations
.agents/plugins/marketplace.json, .claude-plugin/marketplace.json, .cursor-plugin/marketplace.json, .release-please-manifest.json, release-please-config.json, .codacy.yml, README.md
Registers the openai-docs plugin entry with metadata, policy, relevance rules, version, release config, static analysis exclusion, and README listing.
Plugin manifests and MCP server configuration
plugins/openai-docs/.claude-plugin/plugin.json, plugins/openai-docs/.codex-plugin/plugin.json, plugins/openai-docs/.cursor-plugin/plugin.json, plugins/openai-docs/.mcp.json, plugins/openai-docs/mcp_config.json, plugins/openai-docs/plugin.json, plugins/openai-docs/README.md
Defines per-agent plugin manifests and MCP server config targeting the OpenAI Developer Docs MCP endpoint, plus plugin documentation.
Skill definition and workflow rules
plugins/openai-docs/skills/openai-docs/SKILL.md, .../LICENSE.txt, .../NOTICE
Defines the skill's MCP tool usage, workflow configuration, fallback behavior, quality/tooling rules, and license/attribution.
Model, prompting, and upgrade reference guides
plugins/openai-docs/skills/openai-docs/references/*
Adds reference markdown for latest-model mapping, GPT-5.5 prompting guidance, and upgrade workflow/checklist.
Model info resolution script
plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js
Implements a CLI to parse local/remote markdown and output normalized latest-model metadata as JSON.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the new OpenAI Docs plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch amondnet/openai-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🔍 Tessl Skill Review

plugins/openai-docs/skills/openai-docs/SKILL.md

score

Review Details

Review Details

Dimension Score Detail
conciseness ██░ 2/3 The skill is moderately efficient but includes some redundancy—source priority, fallback behavior, and model-selection steps are repeated across multiple sections (Workflow Configuration, Workflow, Reference map, Tooling notes, MCP unavailable). Some sections could be consolidated to reduce token usage.
actionability ██░ 2/3 The skill provides specific MCP tool names, concrete script commands (e.g., node scripts/resolve-latest-model-info.js), and clear URLs to fetch. However, it lacks executable code examples for common tasks like making an API call or performing a doc search, and much of the guidance is procedural prose rather than copy-paste-ready commands or code blocks.
workflow clarity ███ 3/3 The workflow is well-sequenced with clear decision branches (docs lookup vs model selection vs upgrade), explicit fallback chains (MCP → web search → bundled references with disclosure), validation gates (compatibility checks, freshness checks), and feedback loops (if fetch fails → try MCP → try search → use fallback and disclose). The upgrade workflow in the referenced upgrade-guide.md adds further validation checkpoints.
progressive disclosure ███ 3/3 The skill provides a clear reference map pointing to bundled files (references/latest-model.md, references/upgrade-guide.md, references/prompting-guide.md) and a script, with the instruction 'Read only what you need.' All referenced paths exist in the bundle, and the main SKILL.md stays at overview level while deferring detailed guidance to the appropriate reference files.

Overall: This is a well-structured skill with strong workflow clarity and good progressive disclosure across its bundle files. Its main weaknesses are moderate redundancy across sections (source priority and fallback logic appear in multiple places) and a lack of concrete executable examples for common operations like performing a doc search or making an API call. The decision trees and fallback chains are thorough and well-designed.

Suggestions:

  • Consolidate the repeated source-priority/fallback logic (appears in 'Source Priority', 'If the MCP server is unavailable', 'Workflow' steps 2/6, and 'Tooling notes') into a single authoritative section to reduce token usage.
  • Add a concrete executable example showing a typical MCP tool invocation pattern or a sample API call to improve actionability beyond procedural prose.

To improve your score, point your agent at the Tessl optimization guide. Need help? Jump on our Discord.

Feedback

Report issues with this review at tesslio/skill-review, or send private feedback from your terminal with tessl feedback.

@codacy-production

codacy-production Bot commented Jul 7, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the new openai-docs plugin to the marketplace, adding its configuration files, documentation, and a helper script to resolve the latest model info. The review feedback identifies a potential TypeError in the CLI argument parsing of resolve-latest-model-info.js when arguments are missing, and recommends updating the documentation to use bun run instead of executing the script directly with node to align with repository standards.

Comment thread plugins/openai-docs/skills/openai-docs/SKILL.md
Comment thread plugins/openai-docs/skills/openai-docs/SKILL.md
Comment thread plugins/openai-docs/skills/openai-docs/references/upgrade-guide.md
Confine a CLI/env-supplied local source path to the current working
directory before reading it, addressing SonarCloud jssecurity:S8707
(path canonicalized from CLI-controlled data must be validated). The
default remote URL path and in-tree reference reads are unaffected.
NOTICE updated to record the hardening.
The openai-docs skill is vendored from openai/codex (Apache-2.0). Codacy's
heuristic rules (detect-non-literal-fs-filename, detect-object-injection)
flag its resolve-latest-model-info.js regardless of validation. Follow the
repo's documented convention for vendored code and exclude the skill path,
matching the existing skillopt-sleep / external-plugins exclusions.
@amondnet amondnet marked this pull request as ready for review July 7, 2026 04:02
@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds an openai-docs plugin to the pleaseai/claude-code-plugins marketplace. The plugin wraps OpenAI's upstream openai-docs skill (Apache-2.0), adapts it for Claude Code by removing Codex-agent-specific sections, provides the openaiDeveloperDocs remote MCP server, and bundles fallback reference files for model selection and prompt-upgrade guidance.

  • New plugin: Adds plugins/openai-docs with marketplace entries across .agents, .claude-plugin, and .cursor-plugin, plus MCP config pointing to https://developers.openai.com/mcp.
  • Script hardening: resolve-latest-model-info.js now validates both plain local paths and file:// URLs against process.cwd() before reading, preventing path traversal.
  • Codacy exclusion: Vendored skill files under plugins/openai-docs/skills/openai-docs/ are excluded from static analysis to avoid false positives on upstream code.

Confidence Score: 5/5

This PR is safe to merge — it adds a new self-contained plugin with no changes to existing plugin logic.

The path-traversal guard in resolve-latest-model-info.js correctly handles both plain local paths and file:// URLs before any file read. The fallback chain in SKILL.md is well-defined. The only findings are a display-name capitalisation nit and a missing Node 18+ runtime note in the README, neither of which affects correctness or security.

No files require special attention for merge safety. The references/latest-model.md duplicate row and plugin.json author fields were already called out in prior review threads.

Important Files Changed

Filename Overview
plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js Path-traversal guard correctly handles both plain paths and file:// URLs; global fetch() requires Node 18+ with no engine constraint documented
plugins/openai-docs/skills/openai-docs/references/latest-model.md Retained from upstream; contains a duplicate gpt-5.5 row that was flagged in a prior review thread
plugins/openai-docs/plugin.json Author and repository still credit upstream OpenAI/codex rather than the pleaseai maintainers — flagged in a prior thread
plugins/openai-docs/.codex-plugin/plugin.json displayName "Openai Docs" has incorrect capitalization; should be "OpenAI Docs"
plugins/openai-docs/.cursor-plugin/plugin.json displayName "Openai Docs" has incorrect capitalization; should be "OpenAI Docs"
plugins/openai-docs/skills/openai-docs/SKILL.md Well-structured skill with clear source priority, fallback chain, and scope boundaries
plugins/openai-docs/.mcp.json Correctly configures the remote HTTP MCP server at https://developers.openai.com/mcp
.claude-plugin/marketplace.json Adds openai-docs marketplace entry with relevance signals for OpenAI hosts and package.json openai dep
.codacy.yml Correctly excludes vendored upstream skill code from Codacy static analysis
release-please-config.json Adds openai-docs plugin with extra-files entries covering all four plugin.json manifests

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User asks OpenAI docs question] --> B{SKILL.md trigger}
    B --> C[openai-docs skill activates]
    C --> D{Question type?}

    D -->|Model selection / latest| E[Fetch remote latest-model.md]
    E -->|Success| F[Parse model + guide URLs]
    E -->|Fail| G[Load references/latest-model.md fallback]

    D -->|Model / prompt upgrade| H[Run resolve-latest-model-info.js]
    H --> I{source type?}
    I -->|https://| J[fetch remote URL]
    I -->|file:// or local path| K[Validate vs CWD path-traversal guard]
    K -->|Outside CWD| L[Throw error]
    K -->|Within CWD| M[fs.readFile]
    J --> N[Parse latestModelInfo block]
    M --> N
    N -->|Found| O[Output JSON: model, migrationGuideUrl, promptingGuideUrl]
    N -->|Not found| P[Error - use bundled fallback]

    D -->|General docs lookup| Q[mcp__openaiDeveloperDocs__search_openai_docs]
    Q --> R[mcp__openaiDeveloperDocs__fetch_openai_doc]
    R -->|Unavailable| S[Official-domain web search fallback]

    O --> T[Fetch migrationGuideUrl + promptingGuideUrl]
    T -->|Fail| U[MCP/search fallback or bundled references]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[User asks OpenAI docs question] --> B{SKILL.md trigger}
    B --> C[openai-docs skill activates]
    C --> D{Question type?}

    D -->|Model selection / latest| E[Fetch remote latest-model.md]
    E -->|Success| F[Parse model + guide URLs]
    E -->|Fail| G[Load references/latest-model.md fallback]

    D -->|Model / prompt upgrade| H[Run resolve-latest-model-info.js]
    H --> I{source type?}
    I -->|https://| J[fetch remote URL]
    I -->|file:// or local path| K[Validate vs CWD path-traversal guard]
    K -->|Outside CWD| L[Throw error]
    K -->|Within CWD| M[fs.readFile]
    J --> N[Parse latestModelInfo block]
    M --> N
    N -->|Found| O[Output JSON: model, migrationGuideUrl, promptingGuideUrl]
    N -->|Not found| P[Error - use bundled fallback]

    D -->|General docs lookup| Q[mcp__openaiDeveloperDocs__search_openai_docs]
    Q --> R[mcp__openaiDeveloperDocs__fetch_openai_doc]
    R -->|Unavailable| S[Official-domain web search fallback]

    O --> T[Fetch migrationGuideUrl + promptingGuideUrl]
    T -->|Fail| U[MCP/search fallback or bundled references]
Loading

Reviews (2): Last reviewed commit: "chore(openai-docs): apply AI code review..." | Re-trigger Greptile

Comment thread plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js Outdated
Comment thread plugins/openai-docs/skills/openai-docs/references/latest-model.md
Comment thread plugins/openai-docs/plugin.json

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 21 files

Confidence score: 2/5

  • In plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js, file:// inputs can bypass the existing traversal guard and read files outside the working directory, which creates a real path-traversal exposure if the source is user-influenced—apply the same canonical path validation used for plain paths before any file URL read, then re-test this code path before merging.
  • In plugins/openai-docs/skills/openai-docs/references/latest-model.md, gpt-5.5 appears twice with different descriptions, so readers can misinterpret capabilities and make incorrect model choices from the reference—deduplicate or clearly merge the entries so one model ID maps to one unambiguous description before merge.
Architecture diagram
sequenceDiagram
    participant User as User/Developer
    participant Agent as Claude Code (Agent)
    participant Plugin as openai-docs Plugin
    participant Script as resolve-latest-model-info.js
    participant MCP as OpenAI MCP Server
    participant LocalRef as Local References/FS

    Note over User,LocalRef: Runtime flow after plugin installation

    User->>Agent: Ask about latest model / OpenAI docs
    Agent->>Plugin: Activate openai-docs skill (via query matching)

    alt Model-selection or latest-model query
        Plugin->>Script: Execute resolve-latest-model-info.js --source <URL|path>
        alt Source is remote URL
            Script->>MCP: Fetch latest-model.md (HTTP GET)
            MCP-->>Script: Markdown content
        else Source is local file
            Script->>LocalRef: Read file (with path traversal guard)
            LocalRef-->>Script: File content
        end
        Script->>Script: Parse latestModelInfo block
        alt Parsing successful
            Script-->>Plugin: JSON: {model, modelSlug, migrationGuideUrl, promptingGuideUrl}
        else Parsing fails
            Script-->>Plugin: Error (exit 1)
        end
    else General docs lookup
        Plugin->>MCP: search_openai_docs(query)
        MCP-->>Plugin: Relevant doc titles
        Plugin->>MCP: fetch_openai_doc(docUrl)
        MCP-->>Plugin: Doc content
    end

    alt MCP tools available
        Plugin->>MCP: get migration/prompting guide content via MCP
        MCP-->>Plugin: Guidance text
    else MCP unavailable
        Plugin->>LocalRef: Read bundled fallback references (latest-model.md, upgrade-guide.md, prompting-guide.md)
        LocalRef-->>Plugin: Fallback content
        Note over Plugin: Discloses fallback usage to user
    end

    alt Path-traversal guard triggered (local source)
        Script->>LocalRef: Resolve and validate path inside cwd
        alt path escapes cwd
            Script-->>Script: Throw Error: refusing to read outside cwd
            Script-->>Plugin: Error
        else path safe
            Script->>LocalRef: Read file
        end
    end

    Plugin->>Plugin: Assemble answer with citations
    Plugin-->>Agent: Signed result (with source attribution)
    Agent-->>User: Display answer
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js Outdated
Comment thread plugins/openai-docs/skills/openai-docs/references/latest-model.md
- readSource: confine file:// URLs to the working directory too (the guard
  previously only covered plain paths, so a file:// source could still read
  arbitrary host files) — Greptile P1 / cubic P1
- parseArgs: throw a clear error when --source/--url/--base-url is given
  without a value instead of passing undefined downstream — Gemini
- NOTICE updated to record the expanded hardening
@amondnet

amondnet commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the new openai-docs plugin, which provides authoritative guidance from official OpenAI developer docs, model selection, and prompt migration, integrated via the OpenAI Developer Docs MCP server. The changes include adding marketplace configurations, documentation, reference guides, and a utility script to resolve the latest model information. The review feedback recommends simplifying the path validation logic in the resolution script to prevent directory reading errors, and suggests updating the documentation to run the resolution script via package.json scripts rather than executing the node script directly.

: source;
const allowedBase = path.resolve(process.cwd());
const resolved = path.resolve(allowedBase, localPath);
if (resolved !== allowedBase && !resolved.startsWith(allowedBase + path.sep)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[MEDIUM] 경로 검증 로직 단순화 및 디렉터리 읽기 방지

Problem: resolved !== allowedBase 조건문은 현재 작업 디렉터리(CWD) 자체를 가리키는 경로를 허용하지만, 디렉터리를 파일로 읽으려고 시도하면 EISDIR 에러가 발생합니다.
Rationale: 안전한 입력 유효성 검사 및 방어적 프로그래밍(Defensive Programming) 원칙에 따라, 디렉터리 자체를 읽으려는 시도를 사전에 차단하고 조건식을 더 직관적으로 단순화하는 것이 좋습니다.
Suggestion: resolved !== allowedBase 체크를 제거하고, allowedBase + path.sep로 시작하는지 여부만 확인하면 디렉터리 자체를 읽는 것을 방지할 수 있습니다.

Suggested change
if (resolved !== allowedBase && !resolved.startsWith(allowedBase + path.sep)) {
if (!resolved.startsWith(allowedBase + path.sep)) {
References
  1. Handle edge cases with guard clauses, and isolate side effects at the boundary. (link)

- For API reference, schema, parameter, or required-field questions, use `mcp__openaiDeveloperDocs__get_openapi_spec` when available to verify the API shape alongside the relevant guide or reference page.
- Use `mcp__openaiDeveloperDocs__list_openai_docs` only when you need to browse or discover pages without a clear query.
- For model-selection, "latest model", or default-model questions, fetch `https://developers.openai.com/api/docs/guides/latest-model.md` first. If that is unavailable, load `references/latest-model.md`.
- For model upgrades or prompt upgrades, run `node scripts/resolve-latest-model-info.js` only when the target is latest/current/default or otherwise unspecified; otherwise preserve the explicitly requested target.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[MEDIUM] package.json에 정의된 스크립트 사용 권장

Problem: 문서에서 node scripts/resolve-latest-model-info.js와 같이 스크립트 파일을 직접 실행하도록 안내하고 있습니다.
Rationale: 특정 런타임 바이너리가 PATH에 존재한다고 가정하는 대신, package.json에 스크립트를 정의하고 bun run <script> 등을 통해 실행하는 것이 일관성을 유지하고 환경 의존성을 줄이는 데 좋습니다.
Suggestion: 해당 스크립트를 package.json의 scripts에 등록하고, 문서에서는 bun run <script> 형태로 실행하도록 수정해 주세요.

Suggested change
- For model upgrades or prompt upgrades, run `node scripts/resolve-latest-model-info.js` only when the target is latest/current/default or otherwise unspecified; otherwise preserve the explicitly requested target.
- For model upgrades or prompt upgrades, run bun run resolve-model-info only when the target is latest/current/default or otherwise unspecified; otherwise preserve the explicitly requested target.
References
  1. Prefer using scripts defined in package.json (e.g., via 'bun run <script>') over executing script files directly in documentation. This maintains consistency and avoids assuming specific runtime binaries are available in the PATH.

- Find the latest model ID and explicit migration or prompt-guidance links.
- Prefer explicit links from the latest-model page over derived URLs.
- For explicit named-model requests, preserve the requested model target. Mention newer remote guidance only as optional.
- For dynamic latest/current/default upgrades, run `node scripts/resolve-latest-model-info.js`, then fetch both returned guide URLs directly when possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[MEDIUM] package.json에 정의된 스크립트 사용 권장

Problem: 문서에서 node scripts/resolve-latest-model-info.js와 같이 스크립트 파일을 직접 실행하도록 안내하고 있습니다.
Rationale: 특정 런타임 바이너리가 PATH에 존재한다고 가정하는 대신, package.json에 스크립트를 정의하고 bun run <script> 등을 통해 실행하는 것이 일관성을 유지하고 환경 의존성을 줄이는 데 좋습니다.
Suggestion: 해당 스크립트를 package.json의 scripts에 등록하고, 문서에서는 bun run <script> 형태로 실행하도록 수정해 주세요.

Suggested change
- For dynamic latest/current/default upgrades, run `node scripts/resolve-latest-model-info.js`, then fetch both returned guide URLs directly when possible.
- For dynamic latest/current/default upgrades, run bun run resolve-model-info, then fetch both returned guide URLs directly when possible.
References
  1. Prefer using scripts defined in package.json (e.g., via 'bun run <script>') over executing script files directly in documentation. This maintains consistency and avoids assuming specific runtime binaries are available in the PATH.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/openai-docs/.claude-plugin/plugin.json`:
- Around line 1-25: The Claude manifest for openai-docs is missing the skills
entry, so the new skill bundle will not be included in generated downstream
manifests. Update the plugin manifest in the openai-docs plugin to add the
skills/openai-docs path in the skills list, using the existing manifest
structure and the multi-format generator expectations from
scripts/multi-format.ts, then regenerate the derived files so the new SKILL.md
is surfaced correctly.

In `@plugins/openai-docs/skills/openai-docs/references/latest-model.md`:
- Around line 1-37: The latest model guide currently only provides a markdown
table, but resolve-latest-model-info.js expects parseable latestModelInfo
metadata to determine the model and guide URLs. Add the required latestModelInfo
block/comment to latest-model.md in a format the resolver can read, keeping the
existing table as human-readable fallback. Make sure the metadata includes the
latest model mapping and URL fields so the offline freshness-check path can
resolve entries when the remote doc is unavailable.

In `@plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js`:
- Around line 53-63: The remote fetch in resolve-latest-model-info.js has no
timeout, so a slow endpoint can block the skill invocation indefinitely. Update
the fetch logic in the helper that returns response.text() to use an
AbortController with a bounded timeout, and ensure the timeout is cleared after
the request completes. Keep the existing response.ok error handling, but add a
clear timeout-specific failure path so the script fails fast instead of hanging.

In `@plugins/openai-docs/skills/openai-docs/SKILL.md`:
- Around line 1-4: Restore the SKILL.md frontmatter contract by updating the
metadata in openai-docs so it includes the required allowed-tools entry and
changes the skill name to the mandated gerund form. Use the existing frontmatter
block at the top of SKILL.md, keep the description intact, and ensure the skill
metadata matches the format expected by the skill-format rules so the MCP tools
used by the body remain available.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 46893778-a033-4feb-9668-357b692d329e

📥 Commits

Reviewing files that changed from the base of the PR and between ca50a8a and 3e5417a.

📒 Files selected for processing (21)
  • .agents/plugins/marketplace.json
  • .claude-plugin/marketplace.json
  • .codacy.yml
  • .cursor-plugin/marketplace.json
  • .release-please-manifest.json
  • README.md
  • plugins/openai-docs/.claude-plugin/plugin.json
  • plugins/openai-docs/.codex-plugin/plugin.json
  • plugins/openai-docs/.cursor-plugin/plugin.json
  • plugins/openai-docs/.mcp.json
  • plugins/openai-docs/README.md
  • plugins/openai-docs/mcp_config.json
  • plugins/openai-docs/plugin.json
  • plugins/openai-docs/skills/openai-docs/LICENSE.txt
  • plugins/openai-docs/skills/openai-docs/NOTICE
  • plugins/openai-docs/skills/openai-docs/SKILL.md
  • plugins/openai-docs/skills/openai-docs/references/latest-model.md
  • plugins/openai-docs/skills/openai-docs/references/prompting-guide.md
  • plugins/openai-docs/skills/openai-docs/references/upgrade-guide.md
  • plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js
  • release-please-config.json

Comment on lines +1 to +25
{
"name": "openai-docs",
"version": "1.0.0",
"description": "Authoritative, current guidance from official OpenAI developer docs, model selection, and model/prompt migration — backed by the OpenAI Developer Docs MCP server.",
"author": {
"name": "OpenAI",
"url": "https://github.com/openai/codex"
},
"homepage": "https://developers.openai.com",
"repository": "https://github.com/openai/codex",
"license": "Apache-2.0",
"keywords": [
"openai",
"docs",
"mcp",
"model-selection",
"api"
],
"mcpServers": {
"openaiDeveloperDocs": {
"type": "http",
"url": "https://developers.openai.com/mcp"
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Wire the new skill bundle into the Claude manifest.

skills/openai-docs/SKILL.md is added, but this manifest never sets skills, so the multi-format pipeline won't surface the skill in downstream manifests. Add the skills/openai-docs entry here before regenerating the derived files. Based on learnings from scripts/multi-format.ts, skills is the input the generator uses to emit the downstream skill path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openai-docs/.claude-plugin/plugin.json` around lines 1 - 25, The
Claude manifest for openai-docs is missing the skills entry, so the new skill
bundle will not be included in generated downstream manifests. Update the plugin
manifest in the openai-docs plugin to add the skills/openai-docs path in the
skills list, using the existing manifest structure and the multi-format
generator expectations from scripts/multi-format.ts, then regenerate the derived
files so the new SKILL.md is surfaced correctly.

Comment on lines +1 to +37
# Latest model guide

This file is a curated helper. Every recommendation here must be verified against current OpenAI docs before it is repeated to a user.

## Current model map

| Model ID | Use for |
| --- | --- |
| `gpt-5.5` | Latest/default text and reasoning model for most new apps, including coding and tool-heavy workflows |
| `gpt-5.5-pro` | Maximum reasoning or quality when latency and cost matter less |
| `gpt-5.4` | Previous default text and reasoning model; use for existing GPT-5.4 integrations |
| `gpt-5.4-mini` | Lower-cost testing and lighter production workflows |
| `gpt-5.4-nano` | High-throughput simple tasks and classification |
| `gpt-5.5` | Explicit no-reasoning text path via `reasoning.effort: none` |
| `gpt-4.1-mini` | Cheaper no-reasoning text |
| `gpt-4.1-nano` | Fastest and cheapest no-reasoning text |
| `gpt-5.3-codex` | Agentic coding, code editing, and tool-heavy coding workflows |
| `gpt-5.1-codex-mini` | Cheaper coding workflows |
| `gpt-image-2` | Best image generation and edit quality |
| `gpt-image-1.5` | Less expensive image generation and edit quality |
| `gpt-image-1-mini` | Cost-optimized image generation |
| `gpt-4o-mini-tts` | Text-to-speech |
| `gpt-4o-mini-transcribe` | Speech-to-text, fast and cost-efficient |
| `gpt-realtime-1.5` | Realtime voice and multimodal sessions |
| `gpt-realtime-mini` | Cheaper realtime sessions |
| `gpt-audio` | Chat Completions audio input and output |
| `gpt-audio-mini` | Cheaper Chat Completions audio workflows |
| `sora-2` | Faster iteration and draft video generation |
| `sora-2-pro` | Higher-quality production video |
| `omni-moderation-latest` | Text and image moderation |
| `text-embedding-3-large` | Higher-quality retrieval embeddings; default in this skill because no best-specific row exists |
| `text-embedding-3-small` | Lower-cost embeddings |

## Maintenance notes

- This file will drift unless it is periodically re-verified against current OpenAI docs.
- If this file conflicts with current docs, the docs win.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Add parseable latestModelInfo metadata.

resolve-latest-model-info.js only consumes a latestModelInfo block/comment. This table-only fallback gives the resolver nothing to parse, so the offline freshness-check path cannot resolve the model or guide URLs when the remote doc is unavailable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openai-docs/skills/openai-docs/references/latest-model.md` around
lines 1 - 37, The latest model guide currently only provides a markdown table,
but resolve-latest-model-info.js expects parseable latestModelInfo metadata to
determine the model and guide URLs. Add the required latestModelInfo
block/comment to latest-model.md in a format the resolver can read, keeping the
existing table as human-readable fallback. Make sure the metadata includes the
latest model mapping and URL fields so the offline freshness-check path can
resolve entries when the remote doc is unavailable.

Comment on lines +53 to +63

const response = await fetch(source, {
headers: { accept: "text/markdown,text/plain,*/*" },
});

if (!response.ok) {
throw new Error(`failed to fetch ${source}: ${response.status}`);
}

return response.text();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a timeout to the remote fetch.

The fetch call has no AbortController/timeout. Since the skill invokes this script synchronously (per SKILL.md's "Freshness check" step) to decide which upgrade guide to use, a slow or unresponsive remote endpoint will hang the entire skill invocation with no bound.

⏱️ Proposed fix: add a request timeout
-  const response = await fetch(source, {
-    headers: { accept: "text/markdown,text/plain,*/*" },
-  });
+  const controller = new AbortController();
+  const timeout = setTimeout(() => controller.abort(), 10_000);
+  let response;
+  try {
+    response = await fetch(source, {
+      headers: { accept: "text/markdown,text/plain,*/*" },
+      signal: controller.signal,
+    });
+  } finally {
+    clearTimeout(timeout);
+  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const response = await fetch(source, {
headers: { accept: "text/markdown,text/plain,*/*" },
});
if (!response.ok) {
throw new Error(`failed to fetch ${source}: ${response.status}`);
}
return response.text();
}
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 10_000);
let response;
try {
response = await fetch(source, {
headers: { accept: "text/markdown,text/plain,*/*" },
signal: controller.signal,
});
} finally {
clearTimeout(timeout);
}
if (!response.ok) {
throw new Error(`failed to fetch ${source}: ${response.status}`);
}
return response.text();
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openai-docs/skills/openai-docs/scripts/resolve-latest-model-info.js`
around lines 53 - 63, The remote fetch in resolve-latest-model-info.js has no
timeout, so a slow endpoint can block the skill invocation indefinitely. Update
the fetch logic in the helper that returns response.text() to use an
AbortController with a bounded timeout, and ensure the timeout is cleared after
the request completes. Keep the existing response.ok error handling, but add a
clear timeout-specific failure path so the script fails fast instead of hanging.

Comment on lines +1 to +4
---
name: "openai-docs"
description: "Use when the user asks how to build with OpenAI products or APIs, needs up-to-date official OpenAI documentation with citations, help choosing the latest model for a use case, or model-upgrade and prompt-upgrade guidance; use the OpenAI docs MCP tools for docs questions, verify API shape with the OpenAPI spec, and restrict fallback browsing to official OpenAI domains."
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Restore the skill frontmatter contract.

SKILL.md is missing allowed-tools, and name: "openai-docs" is not in the required gerund form. The skill-format rules call out both, so this plugin may not expose the MCP tools the body relies on.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openai-docs/skills/openai-docs/SKILL.md` around lines 1 - 4, Restore
the SKILL.md frontmatter contract by updating the metadata in openai-docs so it
includes the required allowed-tools entry and changes the skill name to the
mandated gerund form. Use the existing frontmatter block at the top of SKILL.md,
keep the description intact, and ensure the skill metadata matches the format
expected by the skill-format rules so the MCP tools used by the body remain
available.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants