Skip to content

feat: add project skill API routes - #30827

Merged
jaaydenh merged 2 commits into
mainfrom
chat-project-skills/api
Oct 18, 2026
Merged

jaaydenh merged 2 commits into
mainfrom
chat-project-skills/api

Conversation

@jaaydenh

@jaaydenh jaaydenh commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds experimental routes for managing a chat project's skills under /api/experimental/organizations/{organization}/chats/projects/{project}/skills: list, create, get, update (PATCH) and delete by skill name.

The handlers reuse the shared skill create and update path from the personal and organization skill APIs. Reading needs chat_project:read on the project and writing needs chat_project:update; callers without access get 404, matching the project instructions routes. Duplicate names and the 100-skill-per-project cap return 409. Writes are audited as chat_project_skill with the skill name as the target. The SDK gains the matching ExperimentalClient methods.

Stack (merge top to bottom):

@jaaydenh

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T08:41:20.388476Z d623418 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: d623418b41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Base automatically changed from chat-project-skills/queries to main October 18, 2026 05:58
Add experimental routes to list, create, read, update and delete skills
on a chat project. Reading needs read on the project and writes need
update; callers who lack the permission get a 404 like the project
instructions routes. The handlers reuse the shared skill create and
update path, map the per-project cap and name index to 409, and audit
every write as a chat_project_skill.

Add matching ExperimentalClient methods.
jaaydenh added a commit that referenced this pull request Oct 18, 2026
Adds the storage and authorization layer for chat project skills. The
`skills` table already allows a `project_id` owner (migration 000621);
this adds the queries for it and authorizes them through the parent chat
project, the same way project instructions work.

- New queries in `skills.sql`: insert, get by name, list metadata,
update (COALESCE on description, content and enabled), delete, and
`GetProjectSkillByIDForUpdate` for the shared update lock.
- dbauthz checks `chat_project:read` on the project for reads and
`chat_project:update` for writes. `authorizeChatProjectInstructions`
became `authorizeChatProjectConfig`, shared by instructions and skills.
`Skill.RBACObject()` still denies project rows so nothing reaches them
without going through the project.
- Audit: new `chat_project_skill` resource type (enum-only migration
000624), `AuditableChatProjectSkill`, and the usual
diff/request/table/FriendlyString/AuditFilter wiring. The API that emits
these entries comes in the next PR.

Stack (merge top to bottom):
- #30826 👈
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
@jaaydenh
jaaydenh force-pushed the chat-project-skills/api branch from d1c3934 to 34c10cd Compare October 18, 2026 05:58
@jaaydenh
jaaydenh merged commit e289c6f into main Oct 18, 2026
29 checks passed
@jaaydenh
jaaydenh deleted the chat-project-skills/api branch October 18, 2026 06:16
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants