Skip to content

feat: manage project skills from the project page - #30856

Merged
jaaydenh merged 118 commits into
mainfrom
chat-project-skills/project-skills-details
Oct 21, 2026
Merged

jaaydenh merged 118 commits into
mainfrom
chat-project-skills/project-skills-details

Conversation

@jaaydenh

@jaaydenh jaaydenh commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a "Skills" row to the project page Details panel. It shows "None" or the skill count (noting disabled skills) and opens the project skills dialog from #30855. Editing follows the project's permissions.update, the same flag that gates the instructions editor. The server computes it with the project's sharing ACL, so an admin sharee can edit skills, and users who can only read the project get the read-only dialog. Focus returns to the row when the dialog closes. The extending agents docs now point at the project page for managing project skills.

Dogfood UAT on this stack passed: creating, editing, importing, downloading, turning off and deleting skills from the dialog; Save stays disabled until the form is valid; a duplicate name shows the 409 in the dialog; new skills show up in the project page / menu without a reload. The read-only dialog was checked with a stubbed projects list, before project sharing (#30439) landed.

Editor List after saving
New project skill editor Project skills list after saving

Stack (merge top to bottom):

Add sqlc queries for skills owned by a chat project and authorize them
through the parent project in dbauthz: reading needs chat_project:read
and writing needs chat_project:update. Skill.RBACObject keeps denying
project rows so any unwrapped path fails closed.

Add the chat_project_skill audit resource type and
AuditableChatProjectSkill so the upcoming project skill API can record
audit entries.
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.
Chats in a project now get the project's enabled skills as a new
"project" skill source, read as the chat owner each turn. Subagents use
the root chat's project. read_skill loads project skill bodies, and
MergeSkills takes sources in merge order so new sources do not change
its signature.
The "/" menu offers the skills of the chat's project, next to personal,
organization and workspace skills, and /clear and /compact defer to a
project skill with the same name. Documents project skills.
…g in the slash menu

Organization and project skills load through one hook, and the menu
renders its skill groups from one ordered list. Adds project loading and
error stories.
Cover the project-only skill tool check in the integration test, the
project skill body loader's not-found mapping, and the chat-projects
experiment gate in the composer.
…ed skill helpers

Split the form body of SkillEditor into SkillEditorForm, settle saves
through a mutate callback so the editor stays locked until the request
finishes, move the read-only enabled indicator into SkillEnabledSwitch,
and share the empty and loaded form value helpers in utils/skills.ts.
Add API methods and query factories to read, create, update, and delete
chat project skills, a projectSkillsScope for the shared skill helpers,
and ProjectSkillsDialog, which lists a project's skills and edits them
with SkillEditorForm.
Add a Skills row to the project Details panel that opens
ProjectSkillsDialog, with stories for the dialog and the panel, and
document where project skills are managed.
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@jaaydenh

Copy link
Copy Markdown
Collaborator 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-20T11:51:06.368678Z cfb1716 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. Nice work!

Reviewed commit: d8b9163ff0

ℹ️ 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".

@jaaydenh

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: cfb1716407

ℹ️ 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".

Turns check project access once with resolveUsableChatProjectID and then
load instructions and skills, so resolveProjectInstructions had no
production callers. Its tests now cover resolveUsableChatProjectID and
loadProjectInstructions directly.
…retry prompt for unusable projects

A 403 or 404 from the project skills request means the caller lost access
to the project, which the composer already treats as no project skills.
The slash menu still showed "Could not load project skills" with a retry
hint that could never succeed, so a project the caller cannot use no longer
shows a loading or error status. A story covers the menu in that state.
jaaydenh added a commit that referenced this pull request Oct 21, 2026
Chats that belong to a chat project now get the project's skills, next
to personal, organization and workspace skills. They show up in the
model's skill list, load through `read_skill`, and appear in a "Project
skills" group in the `/` menu.

- `coderd/x/skills` adds the `project` source. `MergeSkills` now takes a
list of sources in merge order (personal, organization, project,
workspace). Bare names stay bare unless two sources share a name, in
which case they get `project/<name>` style aliases.
- chatd loads project skills only when the chat owner owns the project
or the project is shared with them. Role grants don't count. This is the
same `usableChatProject` check that project instructions and memory use,
and one check per turn covers both instructions and skills. Disabled
skills are skipped. A failed load logs a warning and the turn continues
without them. Subagents use their root chat's project; that lookup is
now a helper shared with project instructions.
- The site loads project skills for the composer on the project page and
in project chats, behind the `chat-projects` experiment. `/clear` and
`/compact` defer to a project skill with the same name, as they already
do for other sources. When the user can't use the project, the site
treats it as no project skills, like chatd, so those commands keep
working and the `/` menu shows no retry prompt for project skills. That
covers a 403 or 404 from the project skills request and a project
missing from the user's project list, which holds only owned and shared
projects, so an administrator role that can read the project doesn't
count. Other failures are retried and leave the list unknown. A cached
project list is also unknown while it refetches or after a failed
refetch, so a share revoked since it was cached keeps those commands
pending instead of deferring to stale project skills.
- Docs gain a "Project skills" section in the extending agents page.
`coderd/x/chatd/ARCHITECTURE.md` gains a paragraph on project skills.

Dogfood UAT on this branch passed: project skills appear in the project
page `/` menu and in project chats, `read_skill` loads them, disabled
and deleted skills report not found, chats outside the project don't see
them, and a subagent gets them through its root chat. The site reads
project skills from the chat's own `project_id`, so subagent chats show
them in the composer once sub-chats carry their root's project (#30683).

| Project page `/` menu | `read_skill` in a project chat |
| --- | --- |
| <img alt="Project skills group in the project page slash menu"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30838-project-skills/pr/project-page-slash-menu.png"
width="600" /> | <img alt="read_skill loading a project skill in a
project chat"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30838-project-skills/pr/project-chat-read-skill.png"
width="600" /> |

Stack (merge top to bottom):
- #30838 👈
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
- #31122
jaaydenh added a commit that referenced this pull request Oct 21, 2026
…ed skill helpers (#30854)

Pulls the skill form body out of `SkillEditor` into a `SkillEditorForm`
with no dialog wrapper, and moves the row helpers (download, delete
confirmation, form values from a skill) out of
`SkillsTable`/`SkillsTableView` so the project skills dialog in the next
PR can reuse them. `SkillEnabledSwitch` gains a `readOnly` prop.

The personal and organization skill pages behave the same, with two
small fixes that came along: Save is locked while a submit is in flight,
so a double click no longer sends two create requests, and the Body
placeholder renders its line breaks.

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854 👈
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
- #31122
Base automatically changed from chat-project-skills/project-skills-dialog to main October 21, 2026 14:08
jaaydenh added a commit that referenced this pull request Oct 21, 2026
Adds `ProjectSkillsDialog`, the dialog for managing a chat project's
skills, plus the API client methods and react-query factories for the
project skill routes from #30827. Nothing opens the dialog yet; the next
PR adds the entry point in the project page Details panel.

- List view: "Project skills" with each skill's name, description, an
enabled switch and last updated time, a row menu with Edit (View when
read-only), Download and Delete, and a "No skills added yet" empty
state.
- New and Edit replace the list inside the same dialog and reuse
`SkillEditorForm`, including paste-to-import and file upload. Name is
locked when editing, and Escape asks before discarding unsaved edits.
- Without update permission the dialog is read-only: no New, Delete or
Save, and fields are disabled.
- Create, update and delete invalidate the project skill list, so the
composer `/` menu picks up changes too. A 409 (duplicate name or the
100-skill cap) is shown in the form and refreshes the list.

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854
- #30855 👈
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
- #31122
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

CODAGT-1438

@jaaydenh
jaaydenh merged commit 7253bd1 into main Oct 21, 2026
30 checks passed
@jaaydenh
jaaydenh deleted the chat-project-skills/project-skills-details branch October 21, 2026 15:06
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 21, 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.

4 participants