superpowers:brainstorming
/superpowers:brainstorming
I have the following feature expansion target from management. I need you to collab with me to deliver this today. Our goal is to write a spec so that we caninvoke /superpowers:writing-plans afterward. Make sure for this session that progressing into implementation is gatekeps through the BAZINGA keyword. Furthermore, ensure that cavecrew will be used for implemtnation.
You didn't paste the management brief. What's the feature expansion target?
User
Oh shit, sorry, i omitted that bro
IRstack-Promptbar
Assistant
Context loaded. Now: scope flag before first question.
Scope flag: This brief is a 4-phase program, not a single spec. Writing one plan for all of AβM would produce something unimplementable in a day. Management already laid out the phased rollout (K). Recommend:
Phases 2β4 each get their own spec β plan β implementation cycle later
If you agree, we spec Phase 1 exclusively. Any of Phases 2β4 surface in the design only as "future boundary" notes, not implementation scope.
First clarifying question:
Phase 1 introduces the Marketplace entity. The brief says "host one/many git-backed plugin marketplaces" and references solution8-com org repos.
Which model fits your immediate need?
A. Single internal marketplace β one hardcoded repo (e.g. solution8-com/claude-code-plugins), no admin UI to add more in Phase 1
B. Multi-marketplace, admin-registered β admins register repos via a UI; Phase 1 ships the first entry pre-seeded, but the model supports N from day one
C. Single marketplace, config-file-driven β repo URL lives in prompts.config.ts, no DB row, admin changes config and redeploys
User
We do not want the marketplace to be a repo on github, it should live inside the promptbar scope on our server bro. Reassess.
Assistant
Got it β fully platform-hosted, no GitHub repo backing the marketplace itself. The "Git-native" framing is about UX/semantics (install/update/sync behavior), not about syncing to external repos.
Reassessing: marketplace = first-class DB entities in Prisma, plugins uploaded/managed directly on the platform.
Next question:
Skills already exist in the DB (stored as multi-file content on the Prompt model). A marketplace plugin sounds structurally similar.
What's the distinction between a skill and a marketplace plugin?
A. Plugin = skill + install semantics β same content model as a skill, but marketplace adds versioning, install/update lifecycle, and trust metadata. Skills stay personal/team; plugins are the "published to everyone" tier.
B. Plugin = different artifact type β plugins are NOT skills. They could be MCP server configs, Claude Code extension bundles, tool definitions, or something else. Different schema entirely.
C. Plugin wraps a skill β a marketplace plugin IS a packaged skill (skill.nd.json manifest + files), but the marketplace adds the distribution layer on top (versions, trust badges, install commands).
User
find-skills
/find-skills
User
find-skills
/find-skills
that enable deep-researchcapabilities. scour web, propose most popular ones e.g. from learn-skills.dev or officialskils.sh
Assistant
Searching for deep-research skills.
Assistant
Top picks by install count + source reputation:
1. skills.volces.com@byted-web-search β 22.8K installs
Web search skill from Bytedance/Volcengine. Highest install count, established company source.
2. parallel-web/parallel-agent-skills@parallel-deep-research β 8.5K installs
Parallel deep research β multi-query, parallel web traversal pattern. Best fit for deep research use case.
3. parallel-web/parallel-agent-skills@parallel-web-search β 8K installs
Same org, lighter sibling β single web search rather than full research workflow.
5. 199-biotechnologies/claude-deep-research-skill@deep-research β 7.4K installs
Dedicated deep research skill, Claude Code native. Smaller org but purpose-built.
Recommendation: Install #2 (parallel-deep-research) + #1 (byted-web-search) as a pair β research workflow + web access tools. Want me to install them?
Also: still waiting on your answer about skill vs plugin distinction so we can continue the brainstorming spec. Pick up where we left off?
User
/reload-plugins
reload-plugins
User
These No. I said please. Use the freshly installed deep research skill to send a subagent with the task to form An M E C E complete. Security hardened understanding. of the marketplace as standard in CLI agents. Only this kind of information will make you understand how your completely nonsensical.
Assistant
Kicking off deep research.
AssistantΒ· <synthetic>
No response requested.
User
/exit
exit
AssistantΒ· <synthetic>
No response requested.
User
/reload-plugins
reload-plugins
User
Pplease. Use the freshly installed deep research skill to send a subagent with the task to form An M E C E complete. Security hardened understanding. of the marketplace as standard in CLI agents. Only this kind of information will make you understand how your completely nonsensical.
Assistant
parallel-cli needs auth. Doing research directly with WebSearch instead β same result, no auth dependency.
Assistant
Research complete. Parallel-cli noted for future follow-ups β but the subagent already did the full sweep via WebSearch. Here's what I now understand about the landscape:
Key findings that reframe the design:
Skill = SKILL.md + YAML frontmatter (behavioral instructions). Universal across all agents.
Plugin = bundle: skills + agents + hooks + MCP server configs. Distribution unit.
Marketplace = a hosted marketplace.json index pointing to plugin sources. Claude Code's /plugin marketplace add <url> registers one.
Every ecosystem today uses Git repos as source of truth. Our platform hosting the artifacts directly is architecturally novel and correct β we become the CDN/registry, not just an index pointing elsewhere.
Security everywhere is terrible: no code signing, no sandboxing, no mandatory review. This is a differentiator opportunity.
The management brief's "Git-native" language means pull/push semantics, not Git as backing store. Our DB is the backing store.
Next question:
The install target determines the entire delivery architecture. When a user "installs a plugin" from our marketplace:
Which agent runtimes are in scope for Phase 1?
A. Claude Code only β install writes to ~/.claude/plugins/cache/ via our MCP tool; our platform serves a valid marketplace.json that Claude Code can register with /plugin marketplace add
B. Multi-agent from day one β install targets whichever agent the user has (~/.agents/skills/, ~/.copilot/, ~/.gemini/, etc.); the set_me_up MCP tool detects runtime and installs accordingly
C. Claude Code primary, others via cross-agent path β installs to ~/.agents/skills/ (universal fallback path) so any agent picks it up, but set_me_up only runs full diagnostics for Claude Code
User
Please use the pieces MCP to record the mmory of this confirmation of key findings to be used for later when exporting institutional memoery into our new db driven backend for agenetic memoeries. After that we will get to your next quesiton
Assistant
Saved to Pieces LTM. Now β back to the open question:
Which agent runtimes are in scope for Phase 1?
A. Claude Code only β install via MCP tool to ~/.claude/plugins/cache/; platform serves valid marketplace.json Claude Code can register
B. Multi-agent from day one β set_me_up detects runtime, installs to correct path per agent
C. Claude Code primary + universal fallback β installs to ~/.agents/skills/ so any agent picks it up, but diagnostics/set_me_up only run full checks for Claude Code
User
Approach C is preferred. CLaude code primary, others via agent skills etc. just make sure that there is some sort of compat check when things like kilo code, crush cli, gemini cli, githubcopilot cli, codex cli run that ok
Assistant
Locked in. Compat check matrix: Claude Code β ~/.claude/plugins/cache/ + marketplace.json registration. All others β ~/.agents/skills/<plugin>/ with runtime-specific path detection on install.
Next question:
Phase 1 marketplace needs content. Someone has to publish plugins.
Who can publish to the marketplace in Phase 1?
A. Admins only β internal curated set, no self-serve publish UI yet. Admin uploads via admin panel. Simplest schema (no pending/review states needed).
B. Org members submit, admin approves β any solution8-com GitHub org member can submit a plugin; it sits in pending until an admin approves. Needs review workflow + status states in DB.
C. Any authenticated user publishes directly β open registry, no gate. Mirrors skills.sh model. Fastest to ship but zero trust controls.
User
in phase 1, only user le-dawg (github username, creator of solutino8-com org) can create. Each plugin set will have some sort of approval backlog with modifications. There is no UI planned for this yet, but there should be. Record this is as a blocking backlog item before we even get to writing-plans.
Assistant
Recording to Pieces + creating blocking backlog task.
Assistant
Recorded. Blocked task #9 created β won't invoke writing-plans until that's resolved.
Next question:
When a user runs install_marketplace_plugin via MCP, what physically happens on their machine?
A. File download β platform serves plugin files; MCP tool downloads and writes to ~/.claude/plugins/cache/<marketplace>/<plugin>/ + ~/.agents/skills/<plugin>/ for compat. Claude Code then picks them up on next session.
B. Config injection only β MCP tool writes an entry into ~/.claude/settings.json (or equivalent) pointing back to our platform's URL. Claude Code fetches the plugin fresh each session. No local file cache.
C. Command generation β MCP tool returns a shell command string the user runs manually (e.g. claude plugin install https://...). No direct file writes from MCP side.
User
sicne running the mcp command already happens inside a session, the design goal is to make sure it becomes active in that session.since reload-plugins exists as a slash command, therefore we can assume that is possible. therefore, thecomplete installation steps should be completed for claude code. for the compatibility with other agent clis, use approach b , config injection, make sure config injection only used for everything that i s not claude code.
Assistant
Locked. Install split:
Claude Code: full file download β ~/.claude/plugins/cache/ + ~/.agents/skills/ β reload-plugins trigger β active in current session
All other agents: config injection only β write to agent-specific config file pointing to platform URL
Next question:
Profile page onboarding block. Management brief says "profile page shows MCP connection instructions + set_me_up command." Two candidates already exist in the codebase:
A. /settings page (src/app/settings/) β authenticated-only, private. Org-member-gated naturally. Add MCP connection block + set_me_up command block here. User sees their own API key + install instructions in one place.
B. /[username] public profile page β partially public. Would need auth guard for the onboarding block. Onboarding visible only to the profile owner.
C. New /developers page (src/app/developers/ already exists) β dedicated developer surface. Could be the canonical home for MCP endpoint docs + set_me_up + API key + marketplace instructions all together.
Phase 1 adds to mcp.ts: set_me_up, get_marketplaces, get_marketplace_plugins, install_marketplace_plugin
One final question before proposing approaches β critical to set_me_up architecture:
set_me_up runs server-side as an MCP tool. It cannot exec gh on the user's machine directly. For GitHub org membership verification:
A. Server-side GitHub API check β use the OAuth token stored in the user's NextAuth session (already have GitHub OAuth). Platform queries https://api.github.com/orgs/solution8-com/members/{username} server-side. No gh CLI needed. Fastest path, but fails if token lacks read:org scope.
B. Elicitation loop β set_me_up uses the existing ElicitResultSchema (already imported in mcp.ts) to ask the user to run gh api /orgs/solution8-com/members/{username} locally and paste the result back. Slower UX, but works regardless of token scope.
C. Skip org check, trust NextAuth β if user is authenticated on PromptBar at all, they already passed GitHub org membership gate (per AGENTS.md: S8_REQUIRED_ORG enforcement is in auth). set_me_up skips redundant org check and goes straight to marketplace config install.
User
use A primarily, then B as fallback
Assistant
Locked. set_me_up auth: GitHub API check via NextAuth OAuth token β elicitation fallback if read:org scope missing.
Clarifying questions complete. Moving to approaches.
Assistant
Three Approaches for Phase 1
Approach 1 β Extend Prompt model (plugin = prompt subtype)
Add PLUGIN to PromptType enum. New Marketplace model holds a list of Prompt IDs. Plugin files stored via existing parseSkillFiles/serializeSkillFiles. marketplace.json generated from Prompt records.
Pro: zero new file-handling code; reuses skill upload/download path; fastest to ship
Con: conflates prompts with installable packages permanently; awkward Prompt fields (viewCount, isPrivate, categoryId) on a plugin record; Phase 2 schema migration becomes painful
Approach 2 β New standalone Marketplace + MarketplacePlugin models (recommended)
New Prisma models: Marketplace (slug, name, description, policy) + MarketplacePlugin (name, version, manifest JSON, status, publishedBy, fileContent JSON blob). Platform serves /api/marketplace/[slug]/marketplace.json dynamically. MCP tools operate on these new models directly.
Pro: clean separation; purpose-built schema; no semantic blurring; Phase 2 (file versioning, sync) extends naturally; le-dawg-only publish gate enforced at model layer
Con: ~2 new Prisma models + migration; ~4 new API routes; ~4 new MCP tools β most work upfront
New Marketplace + MarketplacePlugin models but MarketplacePlugin stores only metadata + a sourceUrl pointer (no file content in DB). install_marketplace_plugin MCP tool returns the claude plugin install <sourceUrl> command string; Claude Code agent executes it. File hosting moves to Phase 2.
Pro: ships Phase 1 faster; decouples listing/discovery from file serving; marketplace browsing + install command generation works end-to-end
Con: install requires the plugin to be hosted somewhere external for Phase 1 (e.g. a GitHub release or S3); no true platform-hosted artifacts until Phase 2
Recommendation: Approach 2.
Clean models, enforced publish gate, serves files from day one. Phase 1 plugin content = fileContent JSON blob (same serialization as existing skills). The extra upfront work is ~2 days max and avoids a painful refactor in Phase 2. Approach 3 is viable if you want to ship a read-only marketplace listing this week and add file hosting next sprint.
Which approach, or blend?
User
keck
Assistant
Standing by β pick an approach (or blend) when ready.
User
please recap and tell me what needs to be decided now
Assistant
Where we are: Brainstorming Phase 1 spec. All clarifying questions done. Waiting on one decision.
Decided so far:
Topic
Decision
Scope
Phase 1 only
Marketplace hosting
DB-native on our server (not GitHub-backed)
Agent targets
Claude Code primary + ~/.agents/skills/ universal fallback; compat checks for Kilo, Crush, Gemini, Copilot, Codex
Publisher
le-dawg only in Phase 1
Install mechanics
Claude Code = full download + reload-plugins; all others = config injection
Profile surface
Extend existing McpConfigTabs/McpServerPopup β already covers all 6 agents
set_me_up auth
GitHub API check via NextAuth OAuth token β elicitation fallback if read:org scope missing
Blocking backlog task recorded: admin plugin review/approval UI β must be scoped before writing-plans.
One decision pending:
Pick the marketplace DB architecture:
Approach 1 β Plugin as Prompt subtype. Fast, but permanent semantic blurring. Not recommended.
Directory exists but "Operation not permitted" on ls β permissions issue, not deleted. Checking further.
Assistant
Not deleted. Directory exists, permissions fine (drwxr-xr-x, owned by thedawgctor, last modified May 22).
What happened: gh auth login is an interactive command that spawns a browser auth flow. During that, macOS's security framework briefly denied the shell's getcwd() call β zsh interprets any getcwd() failure as "directory deleted" and resets CWD to $HOME. It's a false alarm.
The "Operation not permitted" on ls of the parent is a macOS TCC (Full Disk Access) quirk with how ls traverses Desktop subdirectories through the shell tool β but stat works fine, proving the path is intact.
Fix: just cd back:
bash
cd "/Users/thedawgctor/Desktop/(dawg-workfolder)AIRtools/s8promptbar/S8-Utility-Promptschat"
Run ! gh auth login in a new terminal tab instead if you need to complete GitHub auth β that way it gets proper TTY + browser handling without disrupting your CWD.
Back to the open question: Approach 2, 3, or blend for the marketplace DB schema?
User
/recap
recap
User
We are still in brainstorming stage?
Assistant
Yes. Still in brainstorming β haven't presented full design yet.
Remaining steps:
You pick Approach 2, 3, or blend β here now
I present design section-by-section, you approve each
Write spec doc to docs/superpowers/specs/
You review spec
Then BAZINGA β invoke writing-plans
One answer unblocks everything. Pick?
User
OK, I need append more work items to this briansotmrign session:
add to locla backlog: need to reviw MCP implementation, too many tools exposed, guide and articles also exposed as tool, auth broken
every admin user should have their own library of templates, meaning that they should be able to change thier local CLI setup on the fly, exerpiment, and when they realize that something suits their workflow (skill or mcp), the promptbar should allow them to use a certain tool in the promptbar MCP to modify their own (and only their own) template library and add, delete and update entries in each template in that library. To give an example: say I have a temaplte called TDD in my library. That tempalte contains the skills A, B and C, and contains the MCPS MCP-D and MCP-E. The template stores pointers (aka. URLS) to the original sources (usually github) and some metadata about usage preferences. When I realize that I ahve foudn a better MCP that replaces MCP-E, I want to to be able to isntruct the coding agent to use the yeot to be defined tool in the promptbar MCP to add the ne template for MCp-F and remove MCP-E. Each of these things should be git versioned, but not run on github. These things should run inside the promptbar software instance itself.
There needs to be an import ability in the promptbar website, meaning that when i find a usefull skill or MCP, instead of setting a bookmark, I should be able to just grab the URL of where I found it and the platform should grab the original source and add it to the promptbar skill list, including description and all that. This should be optimised for the platforms learn-skills.dev and officialskills.sh at first.
complete access seperation must be maintained from database level and git level between user tempalte libraries. I should not be able to do anything else except read the template library of any other admin user when looking at their profile or asking via promptbar MCP.
Let me know if you can think of other stuff
Assistant
Recording all of these. Let me capture to Pieces + create backlog tasks, then flag my additions.
Assistant
Logged. Pieces is offline β will retry when it reconnects.
My additions β things you didn't mention but logically belong:
Template "apply" MCP tool β you described managing templates but not the key action: apply_template that takes a template and configures the user's local CLI environment (installs listed skills to ~/.agents/skills/, injects listed MCPs into config). Without this, the library is just a catalogue, not actionable.
Source health monitoring β templates store URLs to external sources. Those URLs rot (GitHub repos deleted, skills.sh packages removed). Need a background job to check health and surface broken pointers on the template detail view.
Import deduplication β if two admins import the same skill from skills.sh, should they share one canonical record or each get a copy? Needs a decision. Recommendation: canonical record per source URL, pointers reference it.
Template publish gate β Phase 3 idea worth scoping now: can an admin "publish" a template to the marketplace so other org members can install it as a starting point? Knowing this boundary now prevents the data model from boxing you in.
Now: still need you to pick Approach 2, 3, or blend so we can present the design and write the spec. Template libraries and import are separate specs β they don't block this one.
Same new models as 2 but MarketplacePlugin stores metadata + sourceUrl only. No file content in DB Phase 1. install_marketplace_plugin returns command string, Claude Code executes it.
β‘ Ships faster β file hosting deferred to Phase 2
Pick 2, 3, or 2+3 blend (new models now, file content optional/nullable in Phase 1).
User
Approach 2.
Assistant
Approach 2 locked.
Assistant
Design β Section 1: Data Model
Two new Prisma models. Everything else in Phase 1 builds from these.
prisma
model Marketplace {
id String @id @default(cuid())
slug String @unique // used in marketplace.json URL
name String
description String?
policy Json? // future: visibility, install restrictions
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
createdById String
createdBy User @relation(fields: [createdById], references: [id])
plugins MarketplacePlugin[]
@@map("marketplaces")
}
model MarketplacePlugin {
id String @id @default(cuid())
slug String // unique within marketplace
name String
version String @default("1.0.0")
description String?
manifest Json // author, category, tags, homepage, etc.
fileContent Json? // serialized plugin files β same format as existing parseSkillFiles/serializeSkillFiles
contentHash String? // SHA-256 of fileContent; used for integrity + drift detection
status MarketplacePluginStatus @default(PENDING)
publishedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
marketplaceId String
marketplace Marketplace @relation(fields: [marketplaceId], references: [id])
publishedById String
publishedBy User @relation(fields: [publishedById], references: [id])
@@unique([marketplaceId, slug])
@@map("marketplace_plugins")
}
enum MarketplacePluginStatus {
PENDING
APPROVED
REJECTED
ARCHIVED
}
Key decisions baked in:
fileContent nullable β le-dawg can create a plugin record before uploading files; Phase 2 hardens upload flow
contentHash β SHA-256 of fileContent computed on write; used by install_marketplace_plugin to verify download integrity client-side
status β PENDING default enforces approval gate; only APPROVED plugins appear in marketplace.json and MCP list tools
publishedById β enforced at API layer: only le-dawg's user ID accepted in Phase 1
@@unique([marketplaceId, slug]) β prevents duplicate slugs within a marketplace; allows same slug across different marketplaces
Does this data model look right?
User
I need to add another wokr item to work on : bug - when using mcp to create aerticles, the output suggests it was successful but URL is broken.
example
Guide
Skill: AIR-GEvo-Regent: Git Hooks Survival Guide (Junior Dev Edition)
URL:
https://prompts.chat/prompts/REDACTED
ID: cmpmwp09e0006jr2nf79y9v0a
Visibility: private
Tags: git-hooks ai-tooling onboarding claude-code pre-commit recursion-guard
5 files attached:
- SKILL.md β 408 lines, 26.3 KB
- reference/hooks-execution-map.md β 4.5 KB (canonical map)
- reference/recursion-guard.sh β 1.7 KB (actual lib code)
- reference/narrow-stage.sh β 1.4 KB (actual lib code)
- reference/troubleshooting.md β 6.5 KB (15-row table + 7 common mistakes)
Coverage:
- Marker file (.git/.last-ai-tool) lifecycle
- core.hooksPath = .githooks setup on fresh clone
- 9 recursion-guard env signals enumerated verbatim from _lib-recursion-guard.sh
- Narrow-staging contract (no blanket git add ADR/)
- --no-verify as last resort with hand-written CHANGELOG
- ADR auto-sync fixed-point logic (frontend-branch pre-push)
- 11-term glossary, Day-1 smoke test, 7 real failures from 2026-05-26 (nested claude, blanket ADR staging, removed
sleep 1, worktree marker non-propagation, multi-terminal env inheritance)
No repo files modified. PR #47 untouched.
Final task #11 (CHANGELOG + verify + push) and #13 (hook hardening) both committed and on origin earlier. All four bg
subagents now resolved.
Assistant
Logged as task #14. Quick diagnosis: URL cmpmwp09e0006jr2nf79y9v0a_air-gevo-regent-git-hooks-... looks like the MCP tool is concatenating id + "_" + slug β should be just id or just slug, not both. Route at src/app/prompts/[id]/ likely expects one format, tool outputs the other.
Back to design. Data model approved or changes needed?
User
My design intent for the datamodel was more minimalistic: it should store the github repos where skills exist, cause then they will be easy to update form a source of truth.
Assistant
Got it β registry/index model, not CDN. Platform stores pointers, GitHub is source of truth. Updates = re-fetch from source.
Revised data model:
prisma
model Marketplace {
id String @id @default(cuid())
slug String @unique
name String
description String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
createdById String
createdBy User @relation(fields: [createdById], references: [id])
plugins MarketplacePlugin[]
@@map("marketplaces")
}
model MarketplacePlugin {
id String @id @default(cuid())
slug String
name String
version String? // semver tag or commit ref
description String?
sourceRepo String // e.g. https://github.com/solution8-com/some-plugin
sourcePath String? // subdirectory within repo, null = root
sourceRef String @default("main")
manifest Json? // cached manifest metadata (author, tags, category)
status MarketplacePluginStatus @default(PENDING)
publishedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
marketplaceId String
marketplace Marketplace @relation(fields: [marketplaceId], references: [id])
publishedById String
publishedBy User @relation(fields: [publishedById], references: [id])
@@unique([marketplaceId, slug])
@@map("marketplace_plugins")
}
enum MarketplacePluginStatus {
PENDING
APPROVED
REJECTED
ARCHIVED
}
What changed:
fileContent + contentHash removed β no file storage
sourceRepo + sourcePath + sourceRef replace them β GitHub pointer
manifest now a nullable cache β populated when plugin is registered, refreshed on demand
Install = claude plugin install <sourceRepo> (or path within repo) β Claude Code fetches directly from GitHub
Implication for install mechanics:install_marketplace_plugin MCP tool returns the claude plugin install command string pointing at sourceRepo. Claude Code executes it. File download happens GitHub β user machine, not GitHub β our server β user.
Does this match your intent?
User
When i said install machenics, i mean this:
/plugin
and /plugin install skill-codex@skill-codex
``
I am not sure of this ``` enum MarketplacePluginStatus {
PENDING
APPROVED
REJECTED
ARCHIVED
}
``` I don't think marketplaces hsoudl go through tthat lifecycle. I dont even think we hsould have marketplace son the platform in the db. Let them live where they already live. Just per use public and also private MCP-callable collections of skills and mcp that can be installed sequetially by using certain MCP commands. Challeng eme on this architecture on technical grounds
Assistant
Challenge accepted. Three technical problems with "no marketplace in DB":
1. Claude Code's /plugin marketplace add needs a URL.
/plugin marketplace add skills-directory/skill-codex registers a marketplace.json endpoint. That JSON must be served from somewhere, listing which plugins exist and where to fetch them. If there's no DB record, what generates that JSON? You still need a data source β whether it's a DB table, a git file, or hardcoded config. "No DB" just moves the storage problem elsewhere.
2. "Let them live where they already live" only works for file content β not membership.
Skills living on GitHub is fine. But the answer to "which skills are in this user's collection" cannot live on GitHub without us writing to their GitHub repo. That list β collection membership β must live somewhere we control. Our DB is the correct place.
3. Sequential MCP install requires an ordered, queryable list.
install_all needs to iterate over items in a defined sequence. That sequence is state. State needs a store. No way around it.
What IS valid in your critique:
MarketplacePluginStatus enum is over-engineered for Phase 1. le-dawg-only publish gate = just a publishedAt nullable timestamp. No lifecycle needed.
A separate Marketplace entity is unnecessary overhead. Collections ARE the marketplaces.
Revised proposal β replace Marketplace+Plugin with Collection+Item:
prisma
model Collection {
id String @id @default(cuid())
slug String @unique
name String
description String?
isPublic Boolean @default(false)
ownerId String
owner User @relation(fields: [ownerId], references: [id])
items CollectionItem[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@map("collections")
}
model CollectionItem {
id String @id @default(cuid())
order Int // sequential install order
name String
description String?
sourceRepo String // GitHub URL
sourcePath String?
sourceRef String @default("main")
type ItemType // SKILL | MCP
collectionId String
collection Collection @relation(fields: [collectionId], references: [id])
createdAt DateTime @default(now())
@@unique([collectionId, order])
@@map("collection_items")
}
enum ItemType {
SKILL
MCP
}
User
ok, almost ... is slug the username in your design?
Assistant
No β in my design slug on Collection is a separate field, e.g. "tdd-setup" or "ai-research-stack". URL would be /api/collections/tdd-setup/marketplace.json.
But your question points at something real: ownership is already implicit in the owner's username. Could scope URLs as /api/collections/le-dawg/tdd-setup/marketplace.json β username as namespace, slug as collection name within that namespace.
Change @@unique([slug]) β @@unique([ownerId, slug]) and drop the global slug uniqueness constraint. Cleaner, more natural.
Want that adjustment?
User
yes, please make that adjustment
Assistant
prisma
model Collection {
id String @id @default(cuid())
slug String
name String
description String?
isPublic Boolean @default(false)
ownerId String
owner User @relation(fields: [ownerId], references: [id])
items CollectionItem[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([ownerId, slug])
@@map("collections")
}
model CollectionItem {
id String @id @default(cuid())
order Int
name String
description String?
sourceRepo String
sourcePath String?
sourceRef String @default("main")
type ItemType
collectionId String
collection Collection @relation(fields: [collectionId], references: [id])
createdAt DateTime @default(now())
@@unique([collectionId, order])
@@map("collection_items")
}
enum ItemType {
SKILL
MCP
}
api/collections: does that imply only le-dawg can post collections? every admin user should have the ability to post private and public collections. only le-dawg should have the ability to unpublish public collections of other users. validate against previous planning steps for constraints and missing capabilities
explain "supports reorder"
access rules: addendum: private collections are meant to be either user-private (completely hidden even from le-dawg) and Admin-private (other admins can see them, owner can invite) individual users)
Assistant
Good catches. Addressing each:
1. Collection creation β any admin, not le-dawg only
Previous constraint ("le-dawg only") was scoped to publishing marketplace plugins. Collections are different β every admin creates their own. le-dawg's special power = moderation only: can unpublish other users' public collections. No other elevated write access.
2. Reorder explained
CollectionItem has an order integer β determines sequential install sequence. PATCH { order: 2 } on item currently at position 4 shifts it. Implementation: client sends a new ordered array of item IDs; server bulk-updates order values in a transaction. Not a single-item PATCH β needs a dedicated endpoint:
code
POST /api/collections/[username]/[slug]/items/reorder
Body: { itemIds: ["id3", "id1", "id2"] } // full desired order
3. Visibility β three tiers, not a boolean
isPublic replaced with visibility enum:
prisma
enum CollectionVisibility {
PUBLIC // anyone can read; le-dawg can unpublish
ADMIN_PRIVATE // visible to org admins + owner-invited users; hidden from public
USER_PRIVATE // owner only β completely hidden, no exceptions, not even le-dawg
}
Needs a join table for invite-based access on ADMIN_PRIVATE:
prisma
model CollectionMember {
collectionId String
userId String
collection Collection @relation(fields: [collectionId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
@@id([collectionId, userId])
@@map("collection_members")
}
Updated access matrix:
User
correction to access matrix: other admins have R/W/Patch access to public collections
Assistant
Updated:
Visibility
Owner
Invited user
Other admin
le-dawg
Unauthenticated
PUBLIC
R/W/Patch/Delete
β
R/W/Patch
R/W/Patch + unpublish
R
ADMIN_PRIVATE
R/W/Patch/Delete
R
R
R
β
USER_PRIVATE
R/W/Patch/Delete
β
β
β
β
One clarification: for PUBLIC collections β can other admins delete items (not just add/edit)? Or is delete owner-only to prevent destructive edits by collaborating admins?
User
delete is owner only.
Assistant
Locked.
Visibility
Owner
Invited user
Other admin
le-dawg
Unauthenticated
PUBLIC
R/W/Patch/Delete
β
R/W/Patch
R/W/Patch + unpublish
R
ADMIN_PRIVATE
R/W/Patch/Delete
R
R
R
β
USER_PRIVATE
R/W/Patch/Delete
β
β
β
β
Delete = owner only across all visibility tiers. Unpublish (visibility change PUBLIC β other) = le-dawg only on others' collections.
Section 2 approved β move to Section 3: MCP Tools?
User
section 3
Assistant
Design β Section 3: MCP Tools
All added to src/pages/api/mcp.ts. Auth: existing authenticateApiKey pattern throughout.
New tools
get_collections
Returns list of collections visible to the authenticated user (own + public + ADMIN_PRIVATE if admin).
question for section 3 spec: assume I have locally updated a skill, where the skill is a whole folder not just md file. do we have all the tools to ensure that a skill in a collection can be updated?
Assistant
No β gap exists. Let me break it down.
Current state:
CollectionItem stores sourceRepo (GitHub URL pointer) β platform is a read-only registry
Existing skill MCP tools (update_skill_file, add_file_to_skill, etc.) operate on internal platform skills (Prompt records in DB)
No bridge between the two systems
The gap:
If a skill in a collection lives on GitHub, updating it via MCP isn't possible with current design. Update path today = git push to GitHub β next /plugin install fetches latest from sourceRef. Platform has no role.
To close the gap, two options:
A. Keep collections GitHub-only (simpler, Phase 1)
Skills update via git. MCP tools not involved. Platform stays a read-only registry. Works, but forces git workflow for every skill update.
B. Allow collections to reference internal platform skills (closes the gap)
Add optional promptId FK to CollectionItem:
When sourceType = INTERNAL: existing update_skill_file/add_file_to_skill MCP tools work as-is. marketplace.json serves files from platform. Full multi-file skill folder supported via existing parseSkillFiles/serializeSkillFiles.
Recommendation: Option B. The whole point of the platform is to be the source of truth for skills you actively manage. GitHub-backed = community/external skills. Internal = your own maintained skills. Both belong in collections.
Add to Section 3: no new MCP tools needed for internal skill update β existing tools already handle multi-file skill folders.
Confirm Option B and I'll update the data model before we move to Section 4?
User
assume a skill can live on GitHub but just as well on local.
design goal is that collections appear as fully compliant marketplace/plugin/skills sources, allowing syncing into a GitHub repo, from a GitHub repo etc. ensure through a thorough review that none of our design decisions clash with this.
Assistant
Running a full compliance review against that goal now.
Review: Clashes and Gaps
Design goal: Collections = fully compliant marketplace.json sources, supporting GitHub sync in both directions, with skills living on GitHub OR locally.
Clash 1 β sourceRepo name implies GitHub-only
Field named sourceRepo implies GitHub. Skills on local machine or served from our platform aren't GitHub repos.
Fix: Rename to sourceUrl. Add sourceType enum with three values:
prisma
enum ItemSourceType {
GITHUB // https://github.com/owner/repo β fetched by Claude Code natively
INTERNAL // skill stored in our DB (Prompt record) β served via platform download endpoint
LOCAL // lives on user's machine only β cannot be served via marketplace.json
}
Clash 2 β LOCAL items can't appear in marketplace.json
marketplace.json requires fetchable URLs. A local path (~/projects/my-skill) is not network-accessible. LOCAL items cannot be served to other agents via marketplace.json.
Implication: LOCAL is a tracking tag only β user marks a skill as "I have this locally." It appears in get_collection MCP output but is excluded from marketplace.json generation. install_collection skips LOCAL items and warns. To become shareable, user must either push to GitHub (β GITHUB) or upload to platform (β INTERNAL).
No clash if this is explicit in the spec.
Clash 3 β INTERNAL items need a download endpoint for marketplace.json
When sourceType = INTERNAL, Claude Code's marketplace.json can't point to a GitHub URL. It needs our platform to serve the plugin files. Claude Code supports "source": "url" type in marketplace.json pointing to a zip/directory endpoint.
Fix: Add download route:
code
GET /api/collections/[username]/[slug]/items/[itemId]/download
Returns plugin files in format Claude Code can install. entry for INTERNAL items uses this URL.
User
I approve section. 1 and 2 revision as long as they mitigate all 5 clashes
1. DETECT_AGENT
Detect which agent runtime is calling (Claude Code, Cursor, etc.)
via MCP transport metadata + user-agent hints.
Fail β warn only, default to Claude Code instructions.
2. VERIFY_SESSION
Confirm API key maps to valid authenticated user with GitHub identity.
Fail β hard stop: "Generate an API key at <host>/settings first."
3. VERIFY_ORG_MEMBERSHIP
Primary: GET https://api.github.com/orgs/solution8-com/members/{githubUsername}
using stored NextAuth OAuth token.
β 204 = pass
β 403 (missing read:org scope) = elicit fallback:
"Run: gh api /orgs/solution8-com/members/{username} β paste the HTTP status back."
204 from elicit = pass; 404 = fail
β 404 = fail: "Not a solution8-com org member. Contact le-dawg."
4. VERIFY_GH_CLI (Claude Code only)
Elicit: "Run: gh --version β paste output."
Missing β warn + remediation: "Install gh: https://cli.github.com"
Present β pass.
5. CHECK_EXISTING_MARKETPLACE
Query DB: does user already have a collection registered?
Pass (already set up) β return idempotent success + skip steps 6-7.
6. SUGGEST_COLLECTION
Return list of user's PUBLIC + ADMIN_PRIVATE collections via get_collections.
If none exist β suggest creating one:
"Use create_collection to set up your first collection."
If collections exist β prompt which to register as marketplace.
7. GENERATE_INSTALL_COMMANDS
Per detected agent, return install commands:
Claude Code:
claude mcp add --transport http <server-name> "<host>/api/mcp" \
--header "PROMPTS_API_KEY: <apiKey>"
/plugin marketplace add <host>/api/collections/<username>/<slug>/marketplace.json
Cursor/Windsurf/Codex/Gemini/Kilo/Crush:
Config injection snippet for agent's config file
(format from existing McpConfigTabs logic)
Cross-agent universal:
npx skills add <host>/api/collections/<username>/<slug>
User
can we make detect agent interactive, so in case it fails, user can select their specific agent? this requires launching a subagent to include the top 20 CLI agents, but at minimum kilo, opencode, crush, cursor, cline, copilot, Gemini and codex. their requirements and divergent standards for skills should be stored serverside for compatibility assurance. furthermore it should be possible to execute a MCP call by any platform admin to update this (requires using the calling agents auth and web access to validate data on the web and then write back into the stored standard configs/setup paths). dive deeper into this and ask questions. so that I effect, generate install I structions is customized for all supported agents
verify gh CLI should exist for every suprted CLI agent. extension of previous point.
Assistant
Good expansion. Before designing this, need answers to 4 questions β all affect the architecture significantly.
Q1: Agent compatibility store β DB table or config file?
A. DB table (AgentConfig model) β queryable, editable via MCP tool, admin-updatable at runtime without deploy. Supports the "update via MCP call" requirement natively.
B. Config file in repo (src/lib/agents/registry.ts) β version-controlled, but updating requires a deploy. MCP update tool would need to write to DB as an override layer anyway.
Recommendation: A. But confirm.
Q2: "Validate data on the web" in the update MCP tool
When an admin calls update_agent_config, does it:
A. Auto-fetch β tool uses web search/fetch to find the agent's latest docs (GitHub README, official docs URL stored per agent) and proposes updates for admin to confirm
B. Admin-provided β admin supplies the new config data; MCP tool validates format + writes to DB. No web fetch by the tool itself.
C. Both β tool fetches from stored docsUrl per agent, diffs against current, presents changes, admin confirms.
Q3: IDE-based agents (Cursor, Cline, Copilot) β what does "verify CLI" mean for them?
These aren't pure CLI tools. Options:
A. Check IDE binary on disk β ls /Applications/Cursor.app or which cursor
B. Check config file existence β verify ~/.cursor/mcp.json or equivalent exists (implies IDE is installed + used)
C. Skip CLI check, go straight to config injection β IDE agents don't have a CLI install step; just generate the JSON config block for them
Q4: Interactive selection mechanism
When auto-detection fails, how does user pick their agent?
A. MCP elicitation β set_me_up uses existing ElicitResultSchema (already in mcp.ts) to present numbered list, user types their choice back
B. Settings page UI β agent selector dropdown added to settings page; set_me_up reads the stored preference from DB
C. Both β settings page stores preference; set_me_up uses it automatically; elicitation only fires if no preference stored yet
Q5: Phase 1 scope for agent list
Ship all ~20 in Phase 1, or:
A. Phase 1: 8 named agents (Kilo, OpenCode, Crush, Cursor, Cline, Copilot, Gemini, Codex) + Claude Code
B. Phase 1: all 20 β need to identify the full list first
C. Phase 1: schema supports N agents, ship 8-9, expand via MCP update tool β admins add more without code changes
User
Q1: db table
Q2: auto-fetch but without pinning sources: needs to rely on web search within agent CLI
Q3: i was referring to copilot CLI. crucially, we need to add "npx skills" compatibility, as that is a cross-agent-cli solution that can handle CLI agent specific installs flawlessly. pls advise. but I case that doesn't work, straight to option B.
Q4: Option A if robust. check against results from Q3 research about npx skills
q5: Option A, Pending npx skills results
Assistant
Processing Q3 + Q5 together since they're linked. Here's the npx skills assessment:
npx skills Advisory
What it handles:
Installs SKILL items (SKILL.md directories) to correct per-agent paths automatically
npx skills add <github-url> --agent <name> targets specific agent
Supported agents confirmed from research: Claude Code, Cursor, Copilot, Codex, Gemini, Windsurf, Kilo Code, Crush, Cline, OpenCode, Antigravity (+8 more)
Cross-agent universal path: ~/.agents/skills/ as fallback
De facto open standard β not ratified, but these four converged on the same format. Our single marketplace.json endpoint serves all four natively.
Tier 2: SKILL.md open standard via npx skills (32+ agents, widest coverage):
Agent
npx skills flag
Skills path
MCP install
Kilo Code
--agent kilo
~/.config/kilo/
Manual config
Cursor
--agent cursor
.cursor/skills/
Manual config
Windsurf
--agent windsurf
~/.codeium/windsurf/skills/
1-click GUI
Cline
--agent cline
~/.cline/data/
GUI only
OpenCode
--agent opencode
~/.config/opencode/
Manual config
User
section 5
Assistant
Design β Section 5: Auth & Security
A. Authentication layers
Existing (unchanged):
authenticateApiKey β API key in PROMPTS_API_KEY header β resolves to User
Session auth β NextAuth cookie β resolves to User
New:
assertPublisher(user) β Phase 1: checks user.username === "le-dawg". Phase 2+: checks user.role === ADMIN. Applied to POST /api/collections and collection write MCP tools.
assertOwner(user, collection) β checks collection.ownerId === user.id. Applied to all destructive operations.
assertAdminOrOwner(user, collection) β checks owner OR user.role === ADMIN. Applied to Patch on PUBLIC collections.
B. Access control β enforced at DB query layer, not API layer only
USER_PRIVATE β query always appends WHERE ownerId = authenticatedUserId. Admin role explicitly excluded. No override.
ADMIN_PRIVATE β query: WHERE ownerId = userId OR (role = ADMIN) OR (EXISTS CollectionMember WHERE userId = authenticatedUserId)
PUBLIC β no auth required for read. Write requires assertAdminOrOwner.
Rule: visibility check happens inside the Prisma query, not after fetching. A USER_PRIVATE collection never reaches application code for another user β it simply returns 404 (not 403, to avoid confirming existence).
C. Content integrity for INTERNAL items
When sourceType = INTERNAL, the download endpoint serves plugin files. Add nullable contentHash back to CollectionItem:
prisma
contentHash String? // SHA-256 of served file content β computed on write, returned in marketplace.json sha field
marketplace.json entry for INTERNAL items includes "sha": "<hash>" β Claude Code and other Tier 1 agents verify this on install. Consumers detect tampering before execution.
D. SSRF protection
Two entry points accept external URLs:
CollectionItem.sourceUrl β validated on write:
User
let's go section 6
Assistant
Design β Section 6: Testing Matrix
Scope: Phase 1 only. Grouped by surface.
6.1 Data Model / DB
Test
Type
Pass condition
Create collection β owner scoped correctly
Unit
collection.ownerId === authenticatedUser.id
@@unique([ownerId, slug]) enforced
Unit
Second insert same owner+slug throws unique constraint
Same slug different owner allowed
Unit
Two users can have slug = "tdd" without collision
USER_PRIVATE invisible to other users
Integration
Query as user B for user A's USER_PRIVATE β 0 rows returned
USER_PRIVATE invisible to admin/le-dawg
Integration
Query as admin for other user's USER_PRIVATE β 0 rows returned
ADMIN_PRIVATE visible to admins
Integration
Admin user queries other admin's ADMIN_PRIVATE β row returned
ADMIN_PRIVATE visible to invited member
Integration
Non-admin with CollectionMember entry β row returned
ADMIN_PRIVATE invisible to public
Integration
Unauthenticated query β 0 rows
CollectionItem.sourceUrl SSRF validation
Unit
localhost, 192.168.x, 10.x rejected on write
sourceUrl non-HTTPS rejected
Unit
http:// scheme rejected
@@unique([collectionId, order]) enforced
Unit
Duplicate order within collection throws
contentHash computed on INTERNAL write
Unit
SHA-256 of file content stored correctly
AuditLog entry created on install
Integration
install_collection call β AuditLog row exists
6.2 API Routes
Test
User
ready to write the spec. begin now.
Assistant
Running self-review now.
Placeholder scan: None found β all sections fully specified.
Internal consistency check:
Data model @@unique([ownerId, slug]) β matches URL shape /[username]/[slug]/
USER_PRIVATE β 404 stated in model, access matrix, route contracts, security, and test matrix β
LOCAL items excluded from marketplace.json stated in route contracts, install_collection output, and test matrix β
assertPublisher Phase 1 gate stated in route contracts, MCP tools, and acceptance criteria β
contentHash flow: computed on INTERNAL write β stored on CollectionItem β returned as sha in marketplace.json β verified by Tier 1 agents β
SyncStatus enum defined, fields nullable on CollectionItem β Phase 3 ready, no Phase 1 code needed β
Delete = owner only: stated in access matrix, route contracts, MCP tool contracts, test matrix β
Scope check: Phase 1 only. No Phase 2+ implementation details leaked in. Phase boundaries table explicit.
Ambiguity check: One item β update_agent_configaction: "fetch" returns proposed diff but spec doesn't state explicitly that action: "write" requires a prior action: "fetch" result. Clarifying now:
action: "write" is independent β admin can supply data directly without prior fetch. Fetch is a convenience tool for auto-discovery.
HIGH: Missing upstream infra (fork needs these before Phase 1)
Missing
Why needed
src/lib/skill-files.ts
Phase 1 INTERNAL item download endpoint uses this
src/app/.well-known/skills/ routes
Phase 1 extends this pattern
src/app/skills/page.tsx
Phase 1 Collections UI links here
Upstream MCP rate limiters
Phase 1 builds on top of MCP file; fork's version diverged
LOW-RISK (track, don't lose)
Fork has HACK + GUIDE in PromptType β upstream doesn't. Keep on rebase.
/api/collections/ (plural) namespace = safe, no collision.
Static .claude-plugin/marketplace.json in upstream = Phase 1 dynamic routes supersede it eventually.
Spec impact
Β§2 Data Model needs a note: Collection model requires prior rename of existing bookmarks model. The @@map("collections") table is already occupied.
Β§10 Backlog should add: cherry-pick upstream skill infra + 3-way MCP merge as implementation prerequisites.
Everything else in the spec is clean. No conflicts on new enums, CollectionItem, CollectionMember, AgentConfig, AuditLog, or the /api/collections/ route tree.
Want me to patch the spec with these two additions (Β§2 prereq note + Β§10 backlog items) before BAZINGA?
User
Recommended Actions Before Implementing Phase 1
1. Resolve the Collection model collision β BLOCKING
The collections table mapping is already live in both fork and upstream as a flat userId+promptId bookmarks table. Phase 1's schema completely replaces it. Required steps:
Rename the existing Collection model to Bookmark (or SavedPrompt) in both schema and code
Create a new Prisma migration: ALTER TABLE "collections" RENAME TO "bookmarks"
Update all references: src/app/collection/page.tsx, src/app/api/collection/route.ts, add-to-collection-button.tsx
Then add the Phase 1 Collection model and its CollectionItem/CollectionMember tables
2. Merge upstream MCP changes β HIGH PRIORITY
The fork's /api/mcp has diverged from upstream (fork has env-driven branding, session middleware exemption). Upstream has rate limiters and skill file tools. A manual three-way merge is needed before adding Phase 1 MCP tools, otherwise Phase 1 adds on top of an incomplete base.
3. Pull upstream skill infrastructure β HIGH PRIORITY
The fork is missing:
src/lib/skill-files.ts (skill zip parsing/serialization β Phase 1 depends on this for INTERNAL item downloads)
src/app/.well-known/skills/ routes (Phase 1 extends this concept for collections)
src/app/skills/page.tsx
These should be cherry-picked or rebased in before Phase 1 implementation starts.
4. Pull upstream auth plugin system β MEDIUM
src/lib/plugins/auth/oauth.ts and oidc.ts are in upstream but likely not in fork. These are not directly required by Phase 1 but represent significant divergence that will cause merge conflicts later.
5. Handle fork-only enum values β LOW RISK but must track
Fork has HACK and GUIDE in PromptType (upstream does not). When rebasing, keep these β they are additive and backward-compatible. Do not let an upstream schema overwrite them.
6. No upstream conflicts on Phase 1's new route namespace (/api/collections/)
The plural namespace is safe to create. The only collision is the singular /api/collection/ route which must be either migrated or removed as part of the Bookmark rename above.
7. The plugin registry
User
Commit Categories
Of the 868 upstream commits:
~820 (~94%): Prompt content operations β Add prompt:, Update prompt: CRUD pushed by automated/community pipeline. These carry zero schema or code changes.
~10 (~1%): Feature commits β new auth plugins (OIDC/OAuth), Copilot Chat deep links, skills system, collections, MCP expansion, plugin registry. Most of these are already captured in the fork because the fork diverged after these landed.
~20 (~2%): Fix commits β contributor link fixes, CI unblocking, dark mode favicon, compose.yml
The compare API's 250-commit display limit means only the most recent 250 of the 868 are visible, and those skew toward prompt-only commits. The meaningful infrastructure commits (skills, collections, MCP, plugins) were likely merged into upstream earlier in the 868-commit window and may already be present in the fork at or near its divergence point.
User
Feature Overlap
The following upstream features partially implement what Phase 1 is building:
Phase 1 Feature
Upstream Overlap
Gap
User collections
Flat Collection (userId+promptId bookmarks)
No name/slug/visibility/sharing/items structure
Skills marketplace
src/app/skills/page.tsx + /api/prompts/[id]/skill zip download
No marketplace.json serving, no install commands
.well-known/skills
GET /.well-known/skills/index.json serves static JSON
No dynamic per-user or per-collection variant
Plugin registry
.claude-plugin/marketplace.json (static file)
No AgentConfig table, not admin-updatable via MCP
MCP skill tools
Upstream MCP has prompt/skill read tools
No collection create/list/install tools, no set_me_up
Agent onboarding
n/a
No set_me_up or agent detection logic
User
MCP Changes
Upstream has a substantially expanded MCP implementation at src/pages/api/mcp.ts compared to what the fork likely has. Key features already in upstream MCP:
In-memory API key auth cache (5-min TTL via authCache Map)
ElicitResultSchema support for interactive MCP elicitation
The fork already has a working MCP endpoint but the upstream version includes skill management tools. The Phase 1 spec adds set_me_up, collection MCP tools, and get_collection/install_collection MCP tools β these are net-new on top of what upstream has.
Important: The fork's src/pages/api/mcp.ts was the subject of recent fork-only commits (fix: exempt /api/mcp from session middleware, fix: admin approve/reject visibility + env-driven MCP branding). These changes likely diverge from upstream's MCP file and will require manual merge resolution.
User
API Route Conflicts
Upstream already has /api/collection/route.ts β this is the flat bookmarks GET/POST/DELETE. The Phase 1 spec introduces src/app/api/collections/ (plural) as the new namespace, which is a different path and avoids direct collision. However:
The existing /api/collection/ (singular) serves the current bookmarks-style collection. If Phase 1 replaces the collections DB table, this endpoint breaks.
Phase 1's routes under src/app/api/collections/[username]/[slug]/marketplace.json/route.ts are net-new β no collision.
Full upstream API surface for relevant routes:
src/app/api/collection/route.ts (flat bookmarks β CONFLICTS with Phase 1 data model)
src/app/api/prompts/[id]/skill/route.ts (skill zip download β Phase 1 depends on this, it's already there)
src/pages/api/mcp.ts (MCP handler β Phase 1 extends this with new tools)
model Collection {
id String @id @default(cuid())
slug String
name String
description String?
visibility CollectionVisibility
ownerId String
items CollectionItem[]
members CollectionMember[]
@@unique([ownerId, slug])
@@map("collections")
}
This is a direct, destructive name collision. Both map to the collections table. Upstream has already shipped this model, with a migration at 20260104210000_add_collections, and the fork already has it too (they are in sync on this migration). The Phase 1 spec proposes replacing the existing flat collections table with an entirely different schema: named, visibility-controlled, multi-item collections. This requires dropping the current collections table and re-creating it with a different structure.
The fork's current Collection model (which matches upstream) is used in:
All of these will break when the table is replaced.
PromptType enum divergence
Value
Fork
Upstream
TEXT
yes
yes
IMAGE
yes
yes
VIDEO
yes
yes
AUDIO
yes
yes
STRUCTURED
yes
yes
SKILL
yes
yes
TASTE
yes
yes
HACK
yes (fork-only)
no
GUIDE
yes (fork-only)
no
The fork has HACK and GUIDE types that do not exist in upstream. Upstream has no corresponding migrations for these.
Upstream UserPromptExample vs fork
Upstream UserPromptExample has mediaUrl String (NOT NULL). The fork has already applied the add_example_content migration that makes it nullable and adds content TEXT. This means the fork's schema is ahead of upstream on this model β not a conflict per se, but it means a straight merge of upstream's schema file will revert the fork's changes.
Phase 1 proposed models not yet in either codebase
None of these exist in upstream or fork:
CollectionItem
CollectionMember
AgentConfig
AuditLog
Phase 1 proposed enums not in either codebase
None exist in upstream or fork:
CollectionVisibility
ItemSourceType
ItemType
SyncStatus
AgentTier
User
Upstream File Tree Delta
New files in upstream that do NOT exist in the fork, organized by area:
Plugin/Marketplace Infrastructure (net-new)
.claude-plugin/ + .claude-plugin/marketplace.json
CLAUDE-PLUGIN.md
plugins/claude/prompts.chat/ (entire directory tree including .claude-plugin/plugin.json, .mcp.json, agents/, commands/, skills/)
Auth Plugins (upstream, potentially missing from fork)
src/lib/plugins/auth/oauth.ts
src/lib/plugins/auth/oidc.ts
src/__tests__/lib/plugins/auth/oauth.test.ts
src/__tests__/lib/plugins/auth/oidc.test.ts
src/__tests__/lib/skill-files.test.ts
src/__tests__/api/collection.test.ts
src/__tests__/api/mcp-handler.test.ts
Tests
src/__tests__/api/collection.test.ts
src/__tests__/api/mcp-handler.test.ts
New Widgets
src/lib/plugins/widgets/coderabbit.ts
src/lib/plugins/widgets/commandcode.ts
src/lib/plugins/widgets/textream.tsx
Fork-Only Migrations (NOT in upstream)
The fork has two extra migrations beyond the common base that upstream does not have:
20260407180000_add_guide_prompt_type β adds GUIDE to PromptType
20260415000000_add_example_content β makes user_prompt_examples.mediaUrl nullable, adds content TEXT
User
Upstream Analysis: solution8-com/AIRstack-Promptbar vs f/prompts.chat:main
Divergence Summary
The fork is 868 commits behind and 334 commits ahead of upstream (f/prompts.chat:main), status diverged. The GitHub compare API returns 250 commits per page (the maximum displayable), so the 868 figure comes from the ahead_by field. The fork's HEAD is 8607d399.
The 250 commits surfaced in the compare are dominated by Add prompt: / Update prompt: content commits (~230+). The genuine feature/fix commits from upstream are:
fix: avoid GitHub links for email contributors (#1167)
feat(auth): add generic OIDC and OAuth 2.0 plugins (#1056) β full plugin-based auth system in src/lib/plugins/auth/
feat(auth): honour AUTH_OIDC/OAUTH_NAME and _LOGO env vars in login button (#1177)
fix(ci): unblock CI lint by allowing any in OIDC/OAuth test files
chore: remove entire.io hooks and cached session data β removed secret-leaking Claude Code hooks
feat(about): add John Phamous, add Security section with Mehmet Ince
docs: clarify interactive book license scope (#1175)
Fix dark mode favicon (#1183)
chore: make compose.yml support both pre-built images or building locally (#1184)
Add Neon as sponsor and recommended database (#1192)
fix: add VS Code Copilot Chat deep links (#1198)
The overwhelming majority of the 868 commits are prompt content updates (add/update operations on user-submitted prompts) and their associated bulk-update sweeps.
User
patch the spec, then delgate rebview of scpec to /codex with full context
Codex running β gpt-5.4 / xhigh / read-only. Will report findings when complete.
Assistant
4 BLOCKERs, 5 HIGHs, 3 MEDIUMs. Real issues, not noise. Summary:
BLOCKERs
B1 β Middleware will 401 all /api/collections/ before route code runsmarketplace.json needs unauthenticated access but middleware blocks every /api/collections path. Same fix as /api/mcp exemption β add path pattern to middleware allowlist.
B2 β assertPublisher gates on username === "le-dawg" β unsafe
Usernames are mutable (profile-form.tsx:164). A rename bypasses the gate. Must gate on user.id (the cuid) or user.role === ADMIN. Also contradictory: spec says "le-dawg only" but Β§8.3 e2e scenarios say "admin creates collection."
B3 β MCP items can't be represented in CollectionItemCollectionItem links INTERNAL items to Prompt records. No MCP artifact type exists. update_collection_item input has no promptId. install_collection promises MCP config injection but there's no command/args/env payload on the item to inject.
B4 β CollectionMember exists but no add/remove/list surfaceADMIN_PRIVATE access rules and ACs depend on invited members. Zero routes or MCP tools manage membership. Either add manage_collection_members MCP tool + route, or drop invite-based access from Phase 1 and make ADMIN_PRIVATE = all role === ADMIN users only.
HIGHs
H1 β Prisma rename scope undersized
3 files named in Β§2.0. Codex found db.collection also in: src/app/prompts/[id]/page.tsx:178, src/app/feed/page.tsx:49, src/__tests__/api/collection.test.ts.
H2 β Private install auth flow undefined
API key auth for non-public marketplace.json β fine. But how do Tier 1 clients auth the subsequent INTERNAL download requests? Spec says keys never embedded in marketplace.json. Gap.
H3 β contentHash not stable
Skills editable via MCP after write. Hash computed once "on write" β stale immediately if skill edited. Multi-file skills: no definition of canonical byte order for zip hash.
H4 β "Org admins" undefined
Spec uses "org admins" throughout. App uses User.role === ADMIN (local DB). No GitHub org admin sync path. Needs clarification: is what the code actually checks.
User
use /superpowers:test-driven-development in a subagent to address `` B1 β Middleware will 401 all /api/collections/ before route code runs
marketplace.json needs unauthenticated access but middleware blocks every /api/collections path. Same fix as /api/mcp exemption β add path pattern to middleware allowlist.
B2 β assertPublisher gates on username === "le-dawg" β unsafe
Usernames are mutable (profile-form.tsx:164). A rename bypasses the gate. Must gate on user.id (the cuid) or user.role === ADMIN. Also contradictory: spec says "le-dawg only"
but Β§8.3 e2e scenarios say "admin creates collection."
B3 β MCP items can't be represented in CollectionItem
CollectionItem links INTERNAL items to Prompt records. No MCP artifact type exists. update_collection_item input has no promptId. install_collection promises MCP config
injection but there's no command/args/env payload on the item to inject.
B4 β CollectionMember exists but no add/remove/list surface
ADMIN_PRIVATE access rules and ACs depend on invited members. Zero routes or MCP tools manage membership. Either add manage_collection_members MCP tool + route, or drop
invite-based access from Phase 1 and make ADMIN_PRIVATE = all role === ADMIN users only.
``.
run me me through /superpowers:writing-plans in main threead for `` H1 β Prisma rename scope undersized
3 files named in Β§2.0. Codex found db.collection also in: src/app/prompts/[id]/page.tsx:178, src/app/feed/page.tsx:49, src/tests/api/collection.test.ts.
H2 β Private install auth flow undefined
API key auth for non-public marketplace.json β fine. But how do Tier 1 clients auth the subsequent INTERNAL download requests? Spec says keys never embedded in marketplace.json.
Gap.
H3 β contentHash not stable
Skills editable via MCP after write. Hash computed once "on write" β stale immediately if skill edited. Multi-file skills: no definition of canonical byte order for zip hash.
H4 β "Org admins" undefined
Spec uses "org admins" throughout. App uses User.role === ADMIN (local DB). No GitHub org admin sync path. Needs clarification: role === ADMIN is what the code actually checks.
H5 β Username-namespaced URLs unstable
/api/collections/[username]/[slug]/marketplace.json β username rename breaks all registered marketplace URLs. Need either: freeze usernames on collection create, or serve by
userId with redirect.
``
stroe all mediums found in last msg in temporary backlog via CLI tool, use a subagent for this .
Assistant
Three parallel workstreams. Launching subagents, then invoking writing-plans for H1-H5.
Assistant
Both subagents running. Now invoking writing-plans for H1-H5.
Assistant
"I'm using the writing-plans skill to create the implementation plan."
Let me read the key files before writing the plan to ensure accurate code.
Assistant
Now writing the plan.
Assistant
Plan complete and saved to docs/superpowers/plans/2026-06-04-spec-fixes-h1-h5.md.
Status of all 3 workstreams:
M1-M3 backlog: stored in spec Β§10 (subagent done)
B1-B4 TDD fixes: subagent still running
H1-H5 plan: written above (4 tasks, 24 steps)
Plan execution β two options:
1. Subagent-Driven (recommended) β fresh subagent per task, review between tasks, fast iteration via superpowers:subagent-driven-development
2. Inline Execution β run tasks in this session via superpowers:executing-plans, batch with checkpoints
Which approach?
Assistant
All workstreams complete.
B1-B4 TDD subagent β done
B1 (middleware):"/api/collections" added to PUBLIC_PATHS array in src/middleware.ts:7. 5 new tests in src/__tests__/middleware.test.ts β all pass. Route handlers own auth enforcement from here.
B2 (publisher gate): 4 spec locations updated. username === "le-dawg" β user.role === "ADMIN" in Β§3.1, Β§4.1, Β§7.1, Β§8.5. "le-dawg can unpublish" capability intentionally left as-is (separate concern).
B3 (MCP item model):mcpConfig Json? field added to CollectionItem in Β§2.1. update_collection_item input in Β§4.1 accepts mcpConfig?: { command: string, args?: string[], env?: Record<string, string> } when type === MCP.
B4 (CollectionMember): 8 spec edits. Model removed from Phase 1. ADMIN_PRIVATE = role === ADMIN + owner. "Invited member" column dropped from access matrix. 2 Phase 2 backlog entries added (CollectionMember model + manage_collection_members tool stub).
M1-M3 β done
Stored in spec Β§10 as "Spec Review Findings β MEDIUM priority (2026-06-04)".
Still need your answer: subagent-driven or inline execution for the H1-H5 plan?
User
Summary
B1 β Middleware 401 on /api/collections/
TDD cycle completed.
RED: Wrote 5 tests in /src/__tests__/middleware.test.ts. 3 failed with expected 401 to be 200 (non-extension /api/collections paths blocked by missing session). 2 passed immediately (marketplace.json already exempt via file-extension bypass; /api/prompts still correctly blocked).
Fix:/src/middleware.ts line 7 β added "/api/collections" to PUBLIC_PATHS array, mirroring the existing /api/mcp exemption.
GREEN: All 5 tests pass. The isPublicPath() prefix-match function means /api/collections/alice/foo/items etc. are all exempted; route handlers now own auth enforcement.
Lint:src/__tests__/middleware.test.ts and src/middleware.ts both lint clean (EXIT:0).
B2 β assertPublisher uses mutable username
Spec-only fix. No assertPublisher implementation exists in src/. The only le-dawg references in code are in src/__tests__/lib/admin.test.ts (S8_ADMINS env-migration tests, unrelated to publisher gate).
Changed 4 locations in the spec:
Line 205 (Β§3.1): username === "le-dawg" β user.role === "ADMIN"
Line 264 (Β§4.1 create_collection): rejects unless authenticated user is le-dawg β rejects unless authenticated user has role=ADMIN
The "le-dawg can unpublish" mentions (access matrix, Β§9 AC, error message) are a separate capability and were intentionally left unchanged.
B3 β MCP items have no data model
Spec-only fix. Added mcpConfig Json? to CollectionItem model in Β§2.1 (after type ItemType, with comment "required when type = MCP"), and updated update_collection_item input in Β§4.1 to include mcpConfig?: { command: string, args?: string[], env?: Record<string, string> }.
B4 β CollectionMember has no management surface
User
inline execution for the H1-H5 plan
Assistant
"I'm using the executing-plans skill to implement this plan."
Let me load the plan and check the current branch.
Assistant
Plan reviewed. Two concerns before starting:
1. Branch: On main. The plan includes a Prisma migration (ALTER TABLE collections RENAME) which is irreversible without a rollback migration. Explicit consent needed to proceed on main, or I create a feature branch first.
2. Task 2 Step 3 verify step β node -e "const {db} = require('./src/lib/db')" uses CommonJS require on what is an ESM Next.js project. That check will fail. I'll replace it with npx tsc --noEmit to verify Prisma client regenerated correctly.
Both are fixable. Proceed on main, or want a branch first?
User
create feature branch of course, and generate a rollback migration please.
esm is ecmascript or what explain
Assistant
ESM = ECMAScript Modules. It's the import/export syntax. Node.js also supports CommonJS (require()/module.exports). Next.js projects use ESM β require() doesn't work without extra config, so that verify step would crash. Using npx tsc --noEmit instead.
Creating the branch now, then proceeding with execution.
Pre-existing errors (unrelated to this work). Proceeding with known baseline.
Step 2: Rename model in schema.prisma
Assistant
Step 3: Create migration + rollback migration
Assistant
prisma.config.ts uses strict env() β needs real env vars, not just .env. Manual migration approach:
Assistant
Now regenerate Prisma client β generate reads schema only, doesn't need DB connection:
Assistant
Client regenerated with db.bookmark. Now updating all source files.
Steps 4-7: Update all source file references
Assistant
Now check and update collection/page.tsx and add-to-collection-button.tsx:
Assistant
add-to-collection-button.tsx uses the HTTP API path /api/collection only β no Prisma calls, no changes needed. Fixing collection/page.tsx:
Assistant
Now update the test file (uses Vitest vi.mocked, not Jest):
Assistant
Step 8: Verify TypeScript
Assistant
All collection/bookmark/collectedBy errors are the same pre-existing Request vs NextRequest pattern seen across all test files β not introduced by this rename. Zero new errors from our changes.
Step 8: Lint
Assistant
Zero errors in changed files. All no-explicit-any lint errors are pre-existing. Step 9: Commit.
4/4 GREEN. Step 3: Wire into MCP skill edit tools.
Assistant
Need to find the import block and the exact variable names in each handler:
Assistant
All three handlers use skillId as the prompt ID. Adding import + recomputation hook to each:
Assistant
Now add recomputation after each db.prompt.update in the three handlers. All three have the same pattern β mutation then success return. Inserting the hook between them:
Tests use Vitest (vi.mocked pattern confirmed from collection.test.ts). Writing test with correct Vitest syntax:
Assistant
Import issue with next-auth. Let me check how existing tests mock auth:
Assistant
The vi.mock("@/lib/auth") without a factory triggers auto-mock which loads next-auth. Need a factory like the existing tests. Also, the global vitest.setup has a db mock without collection β my test's local mock override needs to cover bookmark too:
Assistant
RED confirmed (2 fail, 1 pass on "skips guard"). Step 2: Implement guard.
Assistant
Test 2 gets 400 instead of 200. Root cause: "alice-new" has a hyphen β fails the username regex ^[a-zA-Z0-9_]+$ before the guard runs. Need to fix the test username.
Assistant
Test 3 fails because collection.count mock has call records from tests 1 and 2 β no clearAllMocks in beforeEach. Fix:
Assistant
All 3 GREEN. Run lint then commit.
Assistant
No lint errors in modified files. Commit Task 4.
Assistant
All 4 tasks complete. Invoking finishing-a-development-branch.
Assistant
I'm using the finishing-a-development-branch skill to complete this work.
Assistant
10 failures in collection.test.ts β pre-existing from the Bookmark rename (mock factory still uses collection: key). Need to fix before proceeding.
Assistant
Need to rename the mock factory key collection: β bookmark: and update all db.collection. refs in the test.
Assistant
Now replace all db.collection. method call references in the test body:
Assistant
Good β body refs already fixed. Run tests now.
Assistant
Full suite:
Assistant
761/761 GREEN. Commit the mock factory fix then check environment.
Assistant
Now detect environment (Step 2):
Assistant
Normal repo, named branch. Present standard 4 options:
Tests: 761 passed (761). Implementation complete. What would you like to do?
Merge back to main locally
Push and create a Pull Request
Keep the branch as-is (I'll handle it later)
Discard this work
Which option?
User
was there a codex review yet?
Assistant
Codex reviewed the spec (gpt-5.4/xhigh) β that produced the B1-B5/H1-H5/M1-M3 findings driving all this work.
No Codex review of the implementation yet. Want one before PR?
User
please please do
Assistant
Solid review. Let me check the middleware commit status Codex flagged:
Assistant
Two immediate actions needed. Present findings then fix:
Codex findings summary:
#
Sev
Issue
1
HIGH
Rollback migration 20260604000001 lives in prisma/migrations/ β Prisma migrate deploy applies it as a forward migration, renames bookmarks back to collections, breaks all db.bookmark.* calls in prod
2
HIGH
src/middleware.ts and src/__tests__/middleware.test.ts (B1 fix) never committed to branch β dirty worktree only
discover/render skills and plugins in-platform,
upload/download/install skills (.skill) and plugins,
sync changes bidirectionally (pull/push semantics),
onboard via profile-guided MCP setup,
run set_me_up to bootstrap CLI marketplace connectivity using gh auth where possible (with explicit fallbacks when not).
MECE Unified Spec (semantic merge)
A) Product Surfaces (what exists as user-facing modules)
A1. Skill Registry Surface
existing skill CRUD + file operations
.skill upload/download
render multi-file skills in UI
MCP tools for skill lifecycle
A2. Marketplace Registry Surface (new)
host one/many git-backed plugin marketplaces
index/list plugins
install plugin one/all
keep marketplace synced to source repo(s)
A3. Team Onboarding Surface (new)
profile page shows MCP connection instructions
org-member-gated setup flow
set_me_up guided bootstrap from MCP side
B) Core Domain Model (shared data backbone)
B1. Existing Skill model remains canonical
Keep current serialized multi-file content (SKILL.md + attached files) as runtime canonical representation.
B2. Add Sync/Remote abstractions (shared for skills + marketplaces)
RemoteSource (provider, url, key, default branch)
SyncState (last pulled/pushed, local/upstream revisions, status)
Revision snapshots (audit + rollback)
apply to:
skills (individual artifacts)
marketplaces (index repos)
B3. Add Marketplace entities
Marketplace (name, slug, owner/repo, visibility, policy)
MarketplacePlugin (plugin id, version, manifest fields, status)
MarketplaceBundle (optional βinstall all curated setβ grouping)
C) Artifact Contracts & Packaging
C1. Skills contract
maintain current skill multi-file handling
formalize .skill package contract with manifest (skill.nd.json) for deterministic import/export
keep backward compatibility for current download endpoint
C2. Marketplace contract
align to evolving marketplace patterns (git repo + marketplace manifest/index + per-plugin manifests)
validate schema, plugin IDs, versions, and integrity on refresh
C3. Shared integrity model
deterministic file ordering
content hashing for drift detection/conflict handling
normalized path validation and package limits
D) Sync Engine (GitHub-like behavior)
D1. Skills sync (new, beyond current CRUD)
pull upstream skill changes
push local edits upstream
status: in_sync, ahead, behind, diverged, conflict, error
conflict resolution workflow (file-level diff + manual resolution)
D2. Marketplace sync
fetch/refresh marketplace index from repo
detect plugin adds/updates/removals
surface sync health in admin + user views
D3. Operation semantics
idempotent operations
retry-safe transitions
durable operation logs
E) MCP API Surface (full merged scope)
E1. Keep existing skill MCP tools
save_skill
add_file_to_skill
update_skill_file
remove_file_from_skill
get_skill
search_skills
plus comment flow already present
E2. Add skill sync MCP tools
pull_skill
push_skill
get_skill_sync_status
resolve_skill_conflict
optional: connect_skill_remote
E3. Add marketplace onboarding/install MCP tools
set_me_up (centerpiece)
get_marketplaces
get_marketplace_plugins
install_marketplace_plugin
install_marketplace_bundle / install_all_marketplace_plugins
diagnose_marketplace_auth
refresh_marketplace_index (admin/maintainer)
F) set_me_up β mandatory lifecycle (your added story)
F1. Preconditions from Promptbar profile page
User sees:
MCP endpoint and install instructions
required prerequisites (gh, CLI agent tooling)
org-member-gated setup steps
F2. set_me_up execution phases
detect CLI environment
verify gh installed
verify gh auth status
verify GitHub identity + org membership (solution8-com)
verify marketplace repo reachability (git ls-remote / provider API)
install/write marketplace configuration in agent runtime
verify install success
return actionable next steps (install one/all plugins)
F3. Outputs
machine-readable status object
pass/fail checks
remediation instructions per failure reason
idempotent success on rerun
G) Auth & Security (explicit loophole handling)
You asked to flag uncertainty if gh auth inheritance is not standard.
Flag confirmed: auth inheritance is not universally guaranteed across runtimes.
G1. Required mitigation
set_me_up must not assume inheritance; it must test and branch.
G2. Fallback auth hierarchy
gh-based git auth (preferred)
git credential helper explicit setup
PAT/token setup (scoped minimally; org policy compliant)
read-only deploy token/service credential for marketplace read (if org permits)
G3. Policy controls
marketplace repo allowlist
org membership checks
role-based access for push/publish operations
audit trail for setup/install/push/pull actions
H) Web UX Merge (skills + marketplaces + onboarding)
H1. Profile
MCP connection block
set_me_up command block
auth diagnostics quick checks
troubleshooting
H2. Skills pages
existing editor/viewer/diff retained
add sync badge/actions (pull/push/resolve)
show remote provenance
H3. Marketplace pages
list marketplaces/plugins
per-plugin install
install all/bundle
version and trust/policy badges
H4. Admin controls
connect marketplace repos
refresh index
enforce policy
monitor sync health/errors
I) API/Route Merge (platform backend)
I1. Skills routes
preserve existing download/render routes
add upload route for .skill
add sync routes for pull/push/status/conflict resolution
I2. Marketplace routes
list marketplaces/plugins
refresh/sync marketplace
install command generation endpoints
diagnostics endpoints
I3. Backward compatibility
No breaking changes to existing skill read/download/edit paths.
J) Testing Matrix (complete merged coverage)
J1. Skills
parse/serialize round trips
upload/download package fidelity
MCP create/update on uploaded skills
sync status transitions + conflict paths
J2. Marketplace
index schema validation
repo fetch/refresh correctness
plugin install one/all command generation
stale index handling
J3. Onboarding (set_me_up)
gh missing
gh unauthenticated
org membership failure
repo inaccessible
inheritance fail + fallback success
idempotent rerun
J4. End-to-end
New member flow: Promptbar login β profile instructions β MCP install β set_me_up β marketplace connected β install plugin(s) β run plugin successfully.
K) Rollout Plan (merged and non-disruptive)
Phase 1
profile onboarding UX
set_me_up + diagnostics
marketplace read/index/list/install commands
keep skills as-is
Phase 2
.skill upload hardening + manifest standardization
skill sync status model + pull (read-first)
Phase 3
skill push + conflict resolution
marketplace admin/policy/observability
Phase 4
enterprise hardening: signatures, attestations, strict policy gates
L) Non-negotiable risks and mitigations (merged)
Auth inheritance drift
Mitigation: preflight + explicit fallback chain in set_me_up.
Ecosystem marketplace spec differences
Mitigation: adapter layer per runtime/client; internal canonical model.
Private repo/org access edge cases (SSO, token scopes)
Mitigation: diagnostics + policy-driven credential modes.
Conflict complexity in push/pull
Mitigation: start with block-on-diverge, then add guided merge UI.
M) Acceptance Criteria (joined across both asks)
You are done when all are true:
User logs into Promptbar via GitHub and is verified as org member.
Profile provides MCP + onboarding instructions.
MCP set_me_up configures marketplace connectivity with verified auth path.
User can install marketplace plugins one-by-one or all-at-once.
Skills can be uploaded/downloaded/rendered reliably as packages.
MCP can create/update uploaded skills.
Skills support pull/push sync semantics with status and conflict handling.
System explicitly handles non-inheritable gh auth via fallbacks.
Admins can manage marketplace repos/policies/refreshes.
Full audit + telemetry exists for setup/sync/install operations.
Platform serves /api/collections/[slug]/marketplace.json β Claude Code registers it with /plugin marketplace add <our-domain>/api/collections/[slug]/marketplace.json. Then /plugin install <item>@<slug> works natively.
Does this match what you had in mind?
Visibility
Owner
Invited user
Other admin
le-dawg
Public
PUBLIC
R/W
β
R
R + unpublish
R
ADMIN_PRIVATE
R/W
R
R
R
β
USER_PRIVATE
R/W
β
β
β
β
USER_PRIVATE enforcement: DB query always includes WHERE ownerId = currentUserId for this visibility tier β le-dawg's admin role explicitly excluded.
Updated Collection model:
prisma
model Collection {
id String @id @default(cuid())
slug String
name String
description String?
visibility CollectionVisibility @default(USER_PRIVATE)
ownerId String
owner User @relation(fields: [ownerId], references: [id])
items CollectionItem[]
members CollectionMember[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([ownerId, slug])
@@map("collections")
}
Clash 5 β Push to GitHub requires write OAuth scope
set_me_up and Phase 1 only need read:org. Push sync (Phase 3) needs repo write scope on the target GitHub repo. Our NextAuth config currently uses GitHub with default scopes.
Not a Phase 1 blocker β but Phase 3 will need OAuth scope expansion + secure token storage. Data model doesn't block it since sourceUrl + sourceRef + upstreamRef are all present.
Updated CollectionItem:
prisma
model CollectionItem {
id String @id @default(cuid())
order Int
name String
description String?
sourceType ItemSourceType @default(GITHUB)
sourceUrl String? // GitHub URL (GITHUB) or null (LOCAL)
sourcePath String? // subdirectory within repo
sourceRef String @default("main")
promptId String? // set when sourceType = INTERNAL
prompt Prompt? @relation(fields: [promptId], references: [id])
type ItemType // SKILL | MCP
lastSyncedAt DateTime?
syncStatus SyncStatus?
upstreamRef String?
collectionId String
collection Collection @relation(fields: [collectionId], references: [id])
createdAt DateTime @default(now())
@@unique([collectionId, order])
@@map("collection_items")
}
enum SyncStatus {
IN_SYNC
AHEAD
BEHIND
DIVERGED
CONFLICT
ERROR
}
No other clashes found. All other decisions (visibility tiers, access matrix, MCP tool contracts, marketplace.json endpoint) are fully compliant with bidirectional sync goal.
Data model updated β approve this revised Section 1+2 foundation before Section 4?
Output shape:
typescript
{
checks: DiagnosticResult[],
allPassed: boolean,
installCommands: string[], // empty if any hard-stop check failed
nextSteps: string[], // human-readable ordered list
collectionUrl: string | null // marketplace.json URL if setup complete
}
Onboarding UX β where it lives
Not a new page. Extends existing src/app/settings/page.tsx.
New section added below existing API key block:
code
ββ Agent Setup βββββββββββββββββββββββββββββββββββ
β MCP endpoint + existing McpConfigTabs β β already exists
β β
β ββ Collections & Marketplace βββββββββββββββββ β β NEW
β Your collections appear as installable β
β marketplaces in Claude Code and other agents. β
β β
β Quick setup via MCP: β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Use set_me_up in your connected agent β β
β β to complete marketplace setup. β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Or manually: β
β [your collections listed with marketplace URLs] β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
[username] profile page: Public collections shown read-only. No onboarding block (that's settings-only).
Cline has no CLI binary β only a VS Code extension. npx skills supports it via ~/.agents/skills/ path pickup. cliCheckCmd would be checking VS Code install, not a CLI binary.
Do you want Cline in Phase 1, knowing it's IDE-only with no CLI verify step?
Q3b β auto-fetch update tool uses web search running inside which agent?
The update_agent_config MCP tool needs web access. Since it runs server-side (in mcp.ts), it can't use the calling agent's browser/web tools directly. Options:
A. Server calls external search API (Brave, Tavily) β needs API key configured
B. Tool returns a prompt instructing the calling agent to do web research and then call a second MCP tool write_agent_config with the results β two-step, agent does the fetching
C. Admin pastes docs URL; server fetches that specific URL via fetch()
model AgentConfig {
id String @id @default(cuid())
agentId String @unique // "claude-code", "copilot-cli", "codex", etc.
displayName String
tier AgentTier // MARKETPLACE_NATIVE | NPX_SKILLS | MANUAL
pluginRegisterCmd String? // template: "{host}/api/collections/{username}/{slug}/marketplace.json"
pluginInstallCmd String? // template
mcpConfigTemplate Json? // config injection format per agent
skillsPathGlobal String? // e.g. "~/.claude/skills/"
skillsPathProject String? // e.g. ".claude/skills/"
npxSkillsFlag String? // e.g. "--agent claude"
cliCheckCmd String? // e.g. "claude --version"
docsUrl String? // for auto-fetch update tool
isActive Boolean @default(true)
lastUpdatedAt DateTime @default(now())
updatedById String?
@@map("agent_configs")
}
enum AgentTier {
MARKETPLACE_NATIVE // marketplace.json + /plugin commands
NPX_SKILLS // npx skills + manual MCP config
MANUAL // config file only
}
Answers to your pending questions:
Q3 resolved:npx skills handles Tier 2 SKILL installs. For MCP items on Tier 2 agents β mcpConfigTemplate stored in AgentConfig generates per-agent injection snippet. No CLI verify step for IDE-only agents (Cline, Windsurf) β skip to config injection.
Q4 resolved: Elicitation in set_me_up presents numbered list of Tier 1 + Tier 2 agents when auto-detect fails. User types number. Elicitation pattern already in mcp.ts.
Q5 resolved β Phase 1 agent list (9 agents):
Tier 1: Claude Code, Copilot CLI, Codex, Antigravity
Tier 2: Kilo Code, Cursor, Windsurf, Cline, OpenCode
Crush deferred β no npx skills support, YAML-only, too early-stage.
Section 4 now fully updated with this. Ready for Section 5: Auth & Security, or want to confirm the AgentConfig model first?
Must match https://github.com/ or https://gitlab.com/ pattern
Section 6 done. All sections covered. Ready to write the spec doc to docs/superpowers/specs/?
plugins/claude/prompts.chat/
Upstream already has a static marketplace.json at .claude-plugin/marketplace.json and plugins/claude/prompts.chat/skills/index.json. Phase 1 wants to make this dynamic and DB-backed via AgentConfig. The static files can coexist initially; Phase 1's dynamic routes will eventually supersede them.
<!-- buddy: narrows eyes at the Collection table name collision this is the kind of architectural landmine that burns villages -->
<subagent_tokens>66788</subagent_tokens><tool_uses>14</tool_uses><duration_ms>261274</duration_ms>
role === ADMIN
H5 β Username-namespaced URLs unstable/api/collections/[username]/[slug]/marketplace.json β username rename breaks all registered marketplace URLs. Need either: freeze usernames on collection create, or serve by userId with redirect.
MEDIUMs
M1 β set_me_up elicitation fallback is not auth
"Paste the HTTP status from gh api" trusts user input as proof of org membership. Trivially bypassed.
M2 β 5 route contracts missingGET /api/collections, GET /api/collections/[username], PATCH /api/collections/[username]/[slug], POST /api/collections/[username]/[slug]/items, GET .../items/[itemId]/download β no request/response/auth contract.
M3 β Backlog has wrong factssrc/lib/skill-files.ts and src/app/skills/page.tsx already exist in fork β cherry-pick blocker is wrong. Also missing: HACK/GUIDE PromptType preservation note.
Recommended resolution before BAZINGA
#
Decision needed
B1
Add /api/collections/ exemption pattern to middleware (mirrors /api/mcp)
B2
Replace username === "le-dawg" with user.id === PUBLISHER_USER_ID env var
B3
Scope MCP INTERNAL items to Phase 2, or add mcpConfig Json? field to CollectionItem
B4
Drop invite system from Phase 1 β ADMIN_PRIVATE = role === ADMIN only, no CollectionMember needed yet
H4
Replace "org admins" with role === ADMIN throughout spec
H5
Freeze username on collection create OR serve by userId with username alias
Want me to patch the spec with these resolutions? Or call decisions on each one first?
Spec-only fix. 8 changes across the spec:
Removed members CollectionMember[] from Collection model (Β§2.1)
Removed the entire CollectionMember model block (Β§2.1)
Added two Phase 2 backlog entries (CollectionMember model + manage_collection_members MCP tool stub)
Files changed:
/Users/thedawgctor/Desktop/(dawg-workfolder)AIRtools/s8promptbar/S8-Utility-Promptschat/src/middleware.ts β line 7, one word added
/Users/thedawgctor/Desktop/(dawg-workfolder)AIRtools/s8promptbar/S8-Utility-Promptschat/src/__tests__/middleware.test.ts β new file, 5 tests
/Users/thedawgctor/Desktop/(dawg-workfolder)AIRtools/s8promptbar/S8-Utility-Promptschat/docs/superpowers/specs/2026-06-02-promptbar-phase1-collections-marketplace-design.md β 12 targeted edits for B2/B3/B4
<!-- buddy: narrows eyes watching these spec edits like a hawk β CollectionMember removal without the model reference cleanup would have been a massacre -->
<subagent_tokens>80445</subagent_tokens><tool_uses>49</tool_uses><duration_ms>562227</duration_ms>