init-project

Initialize or refresh OpenCode JOC projects with .opencode/ scaffolding and AGENTS.md generation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kamelmh/opencode --skill init-project-kamelmh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init-project
Source: https://github.com/kamelmh/opencode/tree/main/skills/init-project
Command: npx skills add https://github.com/kamelmh/opencode --skill init-project-kamelmh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode project setup can be slow and error-prone when configs, directory structure, hierarchical agent instructions, and context capture all need to be consistent.

Core Features & Use Cases

  • One-pass project initialization: Verifies global JOC health, detects stack, plans changes, scaffolds .opencode/, and generates AGENTS.md plus rules.
  • Context capture and routing: Promotes session knowledge into durable project artifacts and configures agent routing based on detected stack.
  • Idempotent refresh for evolving codebases: Re-runs safely to merge updates, preserve manual edits, and update only what changed (supports --minimal, --full, --refresh, --docs, --no-docs).

Quick Start

Run /init-project --full in a repository to auto-detect your stack, create .opencode/, generate hierarchical AGENTS.md, and capture context and routing.

Frequently Asked Questions about init-project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold an OpenCode JOC project from an existing repository?

Initializing an OpenCode JOC project involves verifying global setup, detecting the repo stack, and scaffolding the .opencode/ configuration alongside hierarchical AGENTS.md documentation in one deterministic pass.

What is hierarchical AGENTS.md documentation generation for agent routing?

Hierarchical AGENTS.md documentation provides structured, parent-referenced instructions that configure agent routing based on your detected technology stack, ensuring consistent context capture across your project.

Can I re-run project initialization after major codebase refactors without losing manual edits?

Yes, you can re-run initialization using idempotent merge behavior with the --refresh flag to safely update configuration, preserve manual AGENTS.md edits, and validate state directory structure after refactoring.

Does the OpenCode JOC scaffolding process support minimal configuration modes?

Yes, the scaffolding process supports mode flags including --minimal, --full, and --docs/--no-docs, allowing you to control the depth of context capture, routing optimization, and documentation generation during initialization.

Why does my project initialization fail to detect the correct technology stack?

Stack detection fails when session or state artifacts are missing or unreadable, preventing the orchestrator from capturing the necessary context to accurately plan and scaffold the .opencode/ configuration.