create-project
Links
Project Description
create-project is a CLI that scaffolds an OpenCode-first project. You run it, answer three questions, and it sets up the operating system your coding agent works inside: structured context files, automatic memory between sessions, and a vendored set of skills.
It doesn't pick a framework, install dependencies, or write boilerplate code. It handles the stuff that makes working with an agent consistent across sessions, so you don't have to be the one holding all the state in your head.
Why
The usual failure mode with coding agents isn't bad code in a single turn. It's drift. A decision gets forgotten, the UI starts going in all directions, architecture gets re-litigated, and every session begins with a paragraph of re-explaining.
Fixing that isn't about a better prompt. It's about the boring infrastructure: memory, context, review discipline, git, and a session protocol. That's what this automates.
Credit
This is a more refined and focused take on the system JS Mastery lays out in How Senior Engineers Actually Build with AI in 2026. Most of the skills are forked from his skills repo and edited to fit this workflow, plus a few originals (ui-ux-frontend, debug, test, document).
What Gets Created
AGENTS.md: read by the agent first, every sessionopencode.json: instructions, permissions, and the read-only reviewer subagentcontext/*.md: project overview, architecture, build plan, progress tracker, code standards, library docs, plus UI files if it's a UI projectmemory.mdandmemory-log.md: current session state, and a rolling log of past sessions.opencode/plugin/memory-hook.js: restores memory automatically at session start.opencode/skills/: context-gather, architect, remember, review, debug, test, document, imprint, ui-ux-frontend, distill
Everything under context/ starts as a stub, and nothing gets built on stub content.
How a Session Goes
On the first session, the agent notices the context files are placeholders and runs an interview, one question at a time, pushing back on vague answers until every file has real content. That's the context gate.
After that:
1. The memory hook restores the last session's state before your message even lands, and the agent summarizes what it restored.
2. You say what you want built.
3. /architect plans it and waits for your approval. No code before that.
4. The agent builds.
5. /test and /review: review runs in a fresh subagent with a clean context window and no write access. It reports issues, it never fixes them. The session that wrote the code is the worst judge of whether it's right.
6. You test it and report back.
7. Close-out: commit the work, run /imprint if UI was built, /remember save, and propose a distill if something from the session is worth turning into a skill.
The human owns four gates: approving the plan, confirming the build works, confirming close-out, and approving any distill proposal. Everything else the agent reaches for on its own when the work calls for it.
Built With It
The best way to see what this produces is CredVault, a local-first password manager I shipped through it. Every session ran the full loop: restore memory, plan with /architect, build, review, close out. The context files and invariants held up from the first commit to the v0.1.1 release.
Options
Three prompts at scaffold time:
- UI: adds design tokens, UI rules, a component registry, and the imprint + ui-ux-frontend skills
- Context7: adds the Context7 MCP server for indexed library docs
- git: initializes the repo and makes the first commit
Running It
npm install
npm link
create-project my-app
cd my-app && opencode
Then just start talking to the agent. There's no separate setup step.