OpenPowers is a small OpenCode plugin framework for organizing reusable skills into composable install profiles.
It is intentionally minimal. The repository provides the plugin architecture, profile layout, contributor documentation, and small base workflow skills for future skill growth.
Profiles select which skill directories OpenCode should load. Set OPENPOWERS_PROFILE before starting OpenCode:
OPENPOWERS_PROFILE=nextjs opencodeIf no profile is set, OpenPowers uses base.
Profile composition is additive:
base -> skills/base
nextjs -> skills/base + skills/nextjs
turborepo -> skills/base + skills/turborepo
nextjs-turbo -> skills/base + skills/nextjs + skills/turborepo
The base profile includes planning, development-cycle, execution, debugging, review, browser-review, completion, and maintenance. The high-level lifecycle is planning -> development-cycle -> completion; development-cycle internally coordinates execution, debugging, and review until verification and review gates are clean, then completion produces the final verified summary. Use browser-review for approval-gated browser screenshots of changed UI. Use maintenance for small repo upkeep that does not need the full lifecycle.
The nextjs profile adds the Next.js-specific skills listed below. The turborepo profile adds the Turborepo-specific skills listed below.
Shared skills belong in the earliest applicable group. Use skills/base for general workflow skills, skills/nextjs for Next.js-specific skills, and skills/turborepo for workspace/task-graph skills.
Start OpenCode with the Next.js profile:
OPENPOWERS_PROFILE=nextjs opencodeOr export the profile once for the current shell:
export OPENPOWERS_PROFILE=nextjs
opencodeConfirm the Next.js skills are loaded with the same profile variable:
OPENPOWERS_PROFILE=nextjs opencode debug skillIf you exported the profile, this is enough:
opencode debug skillFor a Next.js monorepo that also needs Turborepo guidance, use:
OPENPOWERS_PROFILE=nextjs-turbo opencodeCurrent Next.js skills:
nextjs-app-router: App Router layout,src/approute-file rules, server/client boundaries,src/components,src/styles,src/services, andsrc/securityplacement.nextjs-api-routes: App Routerroute.tsstructure, HTTP methods, validation, rate limits, auth checks, safe responses, service delegation, and mutation revalidation.nextjs-auth: authentication, authorization, ownership checks, protected routes, sessions, cookies, roles, permissions, and private data access.nextjs-data-cache: data fetching, public vs private cache strategy, revalidation, dynamic rendering, mutations, and user-specific data safety.nextjs-performance: images, fonts, client bundle size, server/client boundaries, Suspense/loading states, dynamic imports, and rendering mode performance.nextjs-security: server-side input validation,src/security/input-validation.ts, rate limiting, SQL/data-access safety, auth checks, secrets, cookies, uploads, and external URL safety.nextjs-ui-variants: approval-gated page creation or redesign with 2-3 meaningfully different UI directions, user selection, finalization, and optional browser-review screenshots.
To add another Next.js skill:
- Create
skills/nextjs/<skill-name>/SKILL.md. - Add YAML frontmatter with
name: <skill-name>and adescriptionthat starts withUse when. - Write the skill instructions in that file.
- Update the Current Next.js skills list above.
- Run
node --check opencode-plugin.jsand refresh cached skills.
No plugin code change is needed when adding a new SKILL.md under skills/nextjs; the nextjs and nextjs-turbo profiles scan that directory recursively.
Start OpenCode with the Turborepo profile:
OPENPOWERS_PROFILE=turborepo opencodeCurrent Turborepo skills:
turborepo-dependencies: root vs package dependency placement, dependency type, peer dependencies, version consistency, and client/server dependency safety.turborepo-workspace: workspace boundaries, package scripts, cache behavior, task inputs, and environment variables.turborepo-package-layout:apps/andpackages/layout, package ownership, shared-code boundaries, exports, scripts, and readable monorepo structure.
OpenCode discovers skills by scanning registered skill directories for SKILL.md files. OpenPowers registers profile-specific directories through the plugin config hook by appending paths to config.skills.paths.
The plugin preserves existing OpenCode configuration and only adds the directories required by the selected profile.
Add OpenPowers to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["openpowers@git+https://github.com/RoyalGr4pe/openpowers.git"]
}Restart OpenCode after changing plugin configuration.
If OpenCode is still showing old skills after an OpenPowers update, remove the local cached plugin package and restart OpenCode:
rm -rf "$HOME/.cache/opencode/packages/openpowers@git+https:/github.com/RoyalGr4pe/openpowers.git"
opencodeTo confirm the skills were refreshed, run:
opencode debug skillFor profile-specific skills, include the profile variable too:
OPENPOWERS_PROFILE=nextjs opencode debug skillClone the repository and reference the plugin file from an OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["/absolute/path/to/openpowers/opencode-plugin.js"]
}Then run OpenCode with a profile:
OPENPOWERS_PROFILE=nextjs-turbo opencodeCreate each skill in its own directory:
skills/base/example-skill/SKILL.md
Every skill must include YAML frontmatter with name and description. Descriptions should explain when to use the skill, not merely what it contains.
Read docs/writing-skills.md before adding real skills.
openpowers/
|-- README.md
|-- package.json
|-- opencode-plugin.js
|-- installs/
|-- skills/
|-- docs/
`-- .opencode/
installs/ names supported profiles. skills/ contains composable skill groups. docs/ explains installation, profile design, and future skill authoring.