Skip to content

🧩 feat: Add Skill Creation and File Deletion to Management API - #16878

Merged
dustinhealy merged 5 commits into
devfrom
feat/agent-management-skill-file-crud
Oct 16, 2026
Merged

dustinhealy merged 5 commits into
devfrom
feat/agent-management-skill-file-crud

Conversation

@dustinhealy

@dustinhealy dustinhealy commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The machine-authenticated Skill management API supports reading and updating Skills and creating or replacing text files, but it cannot create Skills or delete obsolete files.

This PR adds Skill creation and Skill-file deletion to the versioned management API. The endpoints retain the existing tenant, role, capability, ACL, content-source, and cleanup boundaries. Whole-Skill deletion is intentionally out of scope until it has a durable cleanup design that protects all writers and supports retries after partial failure.

How it works

The management adapters validate and project the versioned wire contract, then reuse the existing browser Skill handlers for creation, permission grants, rollback, and file cleanup. Mutating operations uniformly require the Skills USE/CREATE role permissions; file deletion checks EDIT access. Git-synchronized and deployment-provided Skills remain read-only.

POST   /api/agents/v1/skills
DELETE /api/agents/v1/skills/:id/files/*relativePath

Type of change

  • Feature
  • Documentation
  • Tests / tooling / CI

Testing

Tested environments/configuration:

  • Local Node.js test environment with MongoMemoryServer and a real RSA/JWKS OIDC fixture

Automated tests:

  • npm exec --workspace=packages/api -- jest --runInBand --coverage=false src/skills/management.spec.ts (41 passing)
  • npm exec --workspace=packages/api -- jest --runInBand --coverage=false src/skills/handlers.spec.ts src/storage/local-delete.spec.ts src/storage/ownedBlobDelete.spec.ts (21 passing)
  • npm exec --workspace=packages/data-schemas -- jest --runInBand --coverage=false src/methods/skill.spec.ts (125 passing)
  • npm exec --workspace=api -- jest --runInBand --coverage=false server/routes/agents/__tests__/openapi.contract.spec.js server/routes/skills.test.js server/services/Files/Azure/crud.spec.js server/services/Files/Local/__tests__/crud-traversal.spec.js server/services/Files/Local/__tests__/cache-bust.spec.js (75 passing)
  • npm exec --workspace=packages/api -- tsc --noEmit
  • npm exec --workspace=packages/data-schemas -- tsc --noEmit
  • Targeted ESLint and Prettier checks
  • npm run openapi:check --workspace=packages/api
  • git diff --check

Screenshots / recordings

No user-facing change.

Risk / compatibility

The API additions are backward-compatible. File deletion now waits for storage cleanup before removing metadata, which can increase request latency; a storage failure leaves the metadata available for retry, and revision matching preserves a concurrently replaced file. Local, Azure, and Firebase deletion use the persisted file owner rather than the acting manager while retaining strict owner-namespace validation. The existing JSON PUT contract remains limited to UTF-8 text files up to 1 MiB; this PR does not add multipart or raw binary transfer. All writes remain limited to inline Skills in the authenticated tenant.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors
  • User-facing or complex behavior is documented where necessary
  • Required dependency changes have been merged/published
  • Required documentation PR: N/A

Copilot AI balanced review requested due to automatic review settings October 7, 2026 20:34

Copilot AI 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.

🟡 Changes recommended

File deletion can return success before storage cleanup completes or fails.

1 open finding
What changed in this PR

Completes machine-authenticated Skill CRUD by adding creation and deletion operations while reusing existing validation, authorization, and cleanup handlers.

Changes:

  • Adds create, Skill-delete, and file-delete management endpoints.
  • Extends OpenAPI schemas and documentation.
  • Adds authorization, validation, persistence, and contract tests.
File Description
packages/​api/​src/​skills/​management.ts Implements management adapters and authorization.
packages/​api/​src/​skills/​management.spec.ts Tests CRUD behavior and permissions.
packages/​api/​src/​openapi/​skills.ts Defines new endpoint contracts.
packages/​api/​openapi/​agents.openapi.json Updates generated OpenAPI output.
docs/​skills-management-api.md Documents the completed CRUD surface.
api/​server/​routes/​agents/​skills.js Registers the new routes.
api/​server/​routes/​agents/​__tests__/​skills.spec.js Updates route wiring fixtures.
api/​server/​routes/​agents/​__tests__/​openapi.contract.spec.js Adds end-to-end contract coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/api/src/skills/management.ts
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-13T16:47:42.811154Z db60050 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 chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58f1d675d1

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

Comment thread packages/api/src/skills/handlers.ts Outdated
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04a030bbb8

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

Comment thread api/server/services/Files/Local/crud.js Outdated
Comment thread packages/api/src/skills/management.ts Outdated
Comment thread packages/api/src/skills/management.ts Outdated
Comment thread api/server/services/Files/Local/crud.js Outdated
@dustinhealy
dustinhealy force-pushed the feat/agent-management-skill-file-crud branch from 04a030b to 5d5c222 Compare October 12, 2026 02:22
@dustinhealy dustinhealy changed the title 🧩 feat: Complete Skill Management CRUD 🧩 feat: Add Skill Creation and File Deletion to Management API Oct 12, 2026
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 5d5c2225f6

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

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Skills UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 12, 2026
@dustinhealy
dustinhealy added this pull request to stack #17039 October 13, 2026 00:14
@dustinhealy
dustinhealy removed this pull request from stack #17039 October 13, 2026 02:44
@dustinhealy
dustinhealy added this pull request to stack #17045 October 13, 2026 02:44
@dustinhealy
dustinhealy force-pushed the feat/agent-management-skill-file-crud branch from 5d5c222 to db60050 Compare October 13, 2026 02:56
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: db6005053d

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

@dustinhealy
dustinhealy marked this pull request as ready for review October 13, 2026 20:05
@dustinhealy
dustinhealy force-pushed the feat/agent-management-skill-file-crud branch from db60050 to 66deb8c Compare October 16, 2026 13:55
@dustinhealy
dustinhealy merged commit a03d90e into dev Oct 16, 2026
41 checks passed
@dustinhealy
dustinhealy deleted the feat/agent-management-skill-file-crud branch October 16, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Skills UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants