Skip to content

feat(mcp): generic ObjectStack Agent Skill generator (ADR-0036 Phase 2b) - #1628

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/mcp-skill
Jun 6, 2026
Merged

feat(mcp): generic ObjectStack Agent Skill generator (ADR-0036 Phase 2b)#1628
xuyushun441-sys merged 1 commit into
mainfrom
feat/mcp-skill

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

ADR-0036 Phase 2b (part 1) — the generic, portable ObjectStack Agent Skill generator. renderSkillMarkdown({ mcpUrl, envName }) emits a SKILL.md (the open Agent Skills standard — Claude Code, OpenAI Codex, Gemini CLI, Copilot, Cursor, …) that teaches any skills-capable agent how to drive an ObjectStack environment over MCP.

Stacked on #1627 (the @objectstack/mcp rename). Base will retarget to main when #1627 merges. Diff here is only the 4 skill files.

Why this shape (ADR-0036 Amendment B/C)

  • One generic skill, not per-app. A customer with dozens of apps in one env installs it once. The content never enumerates a tenant's schema — it instructs the agent to discover live via list_objects / describe_object, so a newly built app needs zero reinstall.
  • Only the connection URL is env-specific, slotted in by the caller (objectui/cloud). Everything else is generic.
  • This is the cross-agent distributable we chose over hand-maintained vendor config snippets.

Contents of the skill

Connect (MCP URL + x-api-key auth — Bearer is session auth), discover-first instruction, the object-CRUD tool reference, and the governance model: every call runs under the caller's permissions + RLS — fewer rows / write rejections are expected, not bugs; confirm destructive ops.

API

Exports renderSkillMarkdown, OBJECTSTACK_SKILL_NAME, OBJECTSTACK_SKILL_DESCRIPTION, RenderSkillOptions.

Tests (local)

skill.test.ts — 8 cases (valid frontmatter, URL slotting + placeholder fallback, env-name intro, x-api-key-not-Bearer, all 7 tools present + discover-first, generic/no-schema, URL trim). Full @objectstack/mcp suite 44 green; build incl. DTS green.

Next in Phase 2b (separate PRs)

  • Key-generation endpoint (framework) — security-critical, isolated PR per the auth red-line: generate a sys_api_key via Phase 1a's generateApiKey, store hash, return raw once.
  • objectui connect surface — Integrations page: show-once key + the env's remote-MCP URL + one-click skill download (calls renderSkillMarkdown).

🤖 Generated with Claude Code

renderSkillMarkdown({ mcpUrl, envName }) produces a portable SKILL.md (open
Agent Skills standard — Claude Code/Codex/Gemini/Copilot/Cursor) teaching any
skills-capable agent to drive an ObjectStack env over MCP.
Per ADR-0036 Amendment C, ONE generic skill, not per-app:
- never enumerates schema (instructs live discovery via list_objects/
describe_object) → one install works for every app, new app = no reinstall;
- only the connection URL is env-specific, slotted by the caller;
- documents the object-CRUD tools, auth via x-api-key (Bearer = session), and
the permissions/RLS governance model.
Exports renderSkillMarkdown + skill name/description consts + RenderSkillOptions.
8 unit tests; full mcp suite 44 green; build incl DTS green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 6, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
specBuildingBuildingPreview, CommentJun 6, 2026 10:08pm

Request Review

@xuyushun441-sys
xuyushun441-sys merged commit 87cb13c into mainJun 6, 2026
7 of 8 checks passed
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling labels Jun 6, 2026
@xuyushun441-sys
xuyushun441-sys deleted the feat/mcp-skill branch June 6, 2026 22:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xuyushun441-sys@os-zhuang