Skip to content

Conversation

spoons-and-mirrors
Copy link
Contributor

Summary

This pull request introduces OpenModes, an open-source, community-driven platform for sharing and discovering AI agent modes for OpenCode. Inspired by models.dev, OpenModes provides a centralized, browsable repository for developers to contribute, discover, and download diverse modes to power their AI agents.

This is the foundational step toward building a rich ecosystem around agent personalities and capabilities.

Key Features

  • Community-Driven Mode Library: A collection of AI agent modes, each with its own prompts, tools, and configurations. The initial version includes the archie mode as a working example.
  • Simple UI: A basic web interface for browsing, searching, and sorting modes by name, author, or votes.
  • Rudimentary Voting and Download Tracking: Users can upvote their favorite modes and see download counts, highlighting popular and useful modes.
  • Access to Mode Details: A modal view provides a deep dive into each mode, showing its description, author, enabled/disabled tools, and the full text of its system prompts and instructions with a copy to clipboard functionality for prompts.
  • Built-in API: The application exposes a simple JSON API to fetch all modes or individual modes by ID, enabling programmatic access.

How to Contribute a Mode

Contributing a new mode is designed to be straightforward:

  1. Create a new directory under modes/your-mode-name/.
  2. Inside, add the following files:
    • metadata.json: Contains the author, description, and date.
    • opencode.json: Defines the mode's configuration, including enabled/disabled tools and MCPs.
    • your-mode.mode.md: The main system prompt for the agent.
    • additional.instructions.md or some.prompt.md.
  3. Submit a pull request.

Future Vision: Seamless CLI Integration

The included API paves the way for powerful integrations. The most exciting possibility is a direct integration with the opencode CLI. I envision a command like this:

# Install a mode directly from the registry
opencode mode install archie

This would fetch the mode from OpenModes and set it up locally, making it incredibly easy for users to discover and experiment with new agent behaviors. This PR lays the essential groundwork for that future, but is probably not there in the current state. I defer to the community expertise to make that happen.

Notes

This is my rough first shot at openmodes. I tried to keep it in line with the models.dev stack, but honestly, I can't stand writing CSS unless it's Tailwind—so yeah, the styles (and the rest of the app) are pretty spaghetti. You have been warned.

Screenshots

image image

- Enhanced table layout and styling for modes display (CSS and JSX)
- Refactored vote/download count update logic for clarity and reusability
- Updated Archie mode description for improved clarity and detail
spoons-and-mirrors and others added 6 commits July 21, 2025 15:42
…ility

- Overhauled header and modal layout using CSS Grid and explicit width constraints
- Unified table column class names for easier targeting and styling
- Streamlined vote/download count update logic for consistency
- Enhanced modal, table, and code block styles for clarity and responsiveness
- Improved universal box-sizing, reset, and media queries

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
- Added new /mode/index endpoint for lightweight mode listing (id, author, description, votes, downloads, updated_at, version, pr_number)
- Updated README and help modal to document new endpoint and metadata fields
- Cleaned up Mode structure: removed unused fields, sourced version from metadata.json, supported optional pr_number
- Updated archie mode metadata.json for new fields
- Improved JSON field ordering and date fallback logic

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
- Eliminate tools_enabled/tools_disabled from API responses and frontend
- Use opencode_config for tool configuration and display
- Remove outdated extraction logic for tools
- Update documentation and API to reflect new structure
- Improve maintainability and consistency across codebase

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
- Adds content negotiation for /mode/* endpoints: browsers get styled HTML, API clients get JSON... why not?
- Slight restyle of the help modal
- No breaking changes for programmatic access (curl, fetch, etc.)

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
@spoons-and-mirrors spoons-and-mirrors force-pushed the openmodes branch 4 times, most recently from 60e6ed3 to 67c0c77 Compare July 24, 2025 14:18
@fwang
Copy link
Contributor

fwang commented Jul 29, 2025

Super interesting! We've been wanting to build something like this for a while. Let me give it some thought on how best to structure and present it.

@spoons-and-mirrors
Copy link
Contributor Author

spoons-and-mirrors commented Jul 29, 2025

Hey @fwang, my last commit on this has created a hell of a mess - I've realised that some parts couldn't work given a typical vercel serverless deployment, so I've been reworking this from the small "ground up" that it is into a convex app (for votes and downloads tracking, moderator approval of modes (cuz yes, people could put some malicious stuff in there), editing of submitted modes, and not going through the PR route to submit a mode.

I moved this over to my own profile for now and am working there, but can transfer it to SST whenever.
Gimme a few more days to polish some stuff then we can totally have some back and forth regarding the things.

There is one friction point I already have spotted; to solve it I would ask : can we have an mcp object and instructions array into a mode config object - this way, modes are a self contained "plugin" with prompt, tools, instructions, and MCPs and can neatly be added/removed with a cli opencode mode install {modeId} and even add a --agent flag so the "mode" can be installed as an agent. I've touched on this with @thdxr and I believe he agrees this is the way, although idk how much of a priority this is.

Anywho, thanks for the reply, talk soon!

@spoons-and-mirrors
Copy link
Contributor Author

Hey @fwang
I've been working on this since we last spoke, and has now evolved in something usable - it clearly needs some more iterations, but I believe is a good starting point. The app lives at https://github.com/spoons-and-mirrors/openmodes.dev

There's also a CLI tool for easy mode install: npx openmodes install [mode-name] (cf. cli folder in openmodes.dev repo)

You can access the app at https://openmodes.dev

Feel free to drop your thoughts, I've reached out on discord if you prefer the avenue for discussions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants