Repository navigation
Workspace skills v2: on-demand skills, procedures, versions and usage - #1149
Merged
Merged
Conversation
Generating skills deleted every pending skill in its scope, including Agent Skills Finder suggestions awaiting approval and manual pending ones. Skills now record their source (manual, llm, finder) and generation only replaces its own pending llm suggestions. activeSkillsText also filters by organization, and the skill endpoints validate their bodies with DTOs. Intent capture was one switch for the whole workspace. Admins can now set each member to inherit, on or off (also in bulk, optionally erasing the intents already captured), and members can opt themselves out. Only contributing callers get the _intent parameter; callers without a member identity never contribute. Changes are logged as LEARNING_CHANGED.
Every applied skill was pasted into the initialize instructions, a skill could only hold a 2,000-character rule, and edits overwrote it. - skills_list / skill_get on /mcp/:serverId when the caller sees an applied skill, scoped to the server's organization and the caller's visible connectors; each skill is also offered as an MCP prompt. - Per-server skills_delivery: auto (full text up to 6,000 characters, else an index), inline or index. The migration pins servers already above the threshold to inline so nothing changes until an admin opts in. - Optional body (markdown, up to 20,000 characters) served by skill_get only; the Skills Finder can file one. - Edits keep the previous content in kg_skill_versions; skill_get and prompts count uses. Consolidate leaves skills with a procedure alone. - AI Skills page shows procedure, version, usage and history; the MCP server page gets the delivery setting.
This was referenced Oct 19, 2026
Closed
10 tasks done
Contributor
Author
|
Update after review (19 Oct): verified with a real model (gpt-4o-mini driving the MCP server as a chat client) and two independent security reviews. Fixes are in the PRs they belong to:
Merge the stack in order (#1146 → #1149 → #1152 → #1154 → #1158) and release them together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workspace skills v2, see #1148. Builds on #1146: until that is merged this PR also shows its commit; the changes here are in the last commit, "Serve workspace skills on demand with procedures and versions".
Today every applied skill of a server is pasted into the MCP
initializeinstructions, a skill can only hold a 2,000-character rule, and an edit overwrites it. Workspaces with many skills or real procedures ended up keeping them outside AnythingMCP and pointing to them. This serves skills on demand, lets a skill carry a full procedure, and keeps versions and usage.Changes
/mcp/:serverId, offered when the caller can see at least one applied skill:skills_list(query?): id, title, when to use, version, whether it has a procedure.skill_get(skill): one skill in full, by id or exact title (case-insensitive). Counts the use.mcp_server_configs.skills_delivery, editable on the MCP server page and viaPUT /api/mcp-servers/:id):auto(default): full text up to 6,000 characters, otherwise an index of ids, titles and "when to use", capped at about 8,000 characters with a pointer toskills_list.inline: always the full text (today's format, unchanged byte for byte for skills without a procedure).index: always the index.inlineon servers whose applied server-scoped skills are already above 6,000 characters.body, markdown, up to 20,000 characters): never pasted into the instructions. Full-text mode mentions it with the skill id;skill_getand the prompt return it. The shared/mcpworkspace guide has noskill_get, so it returns procedures in full.skills_save_to_workspaceaccepts an optionalprocedure.kg_skill_versionsand incrementsversion; status-only changes do not.GET /api/knowledge-graph/skills/:id/versions(ADMIN/EDITOR).use_countandlast_used_at, incremented byskill_getand prompt use (best effort, never fails the read).kg_how_to_obtainand the knowledge-graph resource list skill ids and point toskill_get.docs/knowledge-graph.md, "How skills reach the AI client".Cloud and self-hosted behave the same. The shared
/mcptoolset is unchanged.Behaviour change for existing servers
Checked against current data before writing the migration: only servers above the threshold change mode (they are pinned to
inline, which keeps today's text); every other server with skills stays under 6,000 characters, soautoproduces exactly today's text. What is new for servers with applied skills is two read-only tools (skills_list,skill_get) and the skill prompts.Type
Testing
Commands and results:
packages/backend:npx prisma generate,npx tsc --noEmit -p tsconfig.json: no errorspackages/backend:npm run lint: 0 errors (existing warnings only); eslint --fix rewrites of untouched files were revertedpackages/backend:npx jest: 676 suites passed, 4 skipped; 20429 tests passed, 1496 skippedpackages/frontend:npx tsc --noEmit -p tsconfig.json: no errors; eslint on the changed files: no findingsprisma migrate deployon an empty scratch database,prisma migrate diffagainst the schema: empty. Data check on a scratch database: a server with 25 applied skills (about 7,500 characters) becameinline, a server with one short applied skill and one long pending skill stayedauto.New unit tests cover the delivery modes (inline format unchanged, procedure referenced not pasted, auto switch, index budget and overflow),
getForCallerscope and usage counting, versioning (content change vs status-only, other organization refused), and the endpoint (tools and prompts only when a skill is visible, scope arguments,skill_gettext and not-found).Manual end-to-end on a local backend (scratch database, MCP API key, JSON-RPC over
/mcp/:serverId):skills_list/skill_get.(full procedure: skill_get "<id>"); both tools appear;skill_getby exact title (different case) returns the procedure;prompts/listshowsangebot-erstellenandprompts/getreturns the skill.skillsDeliveryis rejected with 400.index: the instructions show the index; switched back toautofrom the UI, saved and confirmed via the API.skill_getwith the first workspace's skill id or title returns "No skill … on this server";skills_listshows only its own skill; the versions endpoint returns 404.Checklist
npx jest)Related Issues
Fixes #1148
Depends on #1146