Get the FREE Ultimate OpenClaw Setup Guide →

initializing-projects

Scanned
npx machina-cli add skill wayne930242/Reflexive-Claude-Code/initializing-projects --openclaw
Files (1)
SKILL.md
6.7 KB

Initializing Projects

Overview

Initializing projects IS bootstrapping with modern best practices AND agent system.

Don't just create files—set up the full development environment including Claude Code integration.

Core principle: Research current best practices. Don't assume—verify with official docs.

Violating the letter of the rules is violating the spirit of the rules.

Task Initialization (MANDATORY)

Before ANY action, create task list using TaskCreate:

TaskCreate for EACH task below:
- Subject: "[initializing-projects] Task N: <action>"
- ActiveForm: "<doing action>"

Tasks:

  1. Gather requirements
  2. Research best practices
  3. Write blueprint
  4. Get user confirmation
  5. Bootstrap project
  6. Setup agent system
  7. Final validation

Announce: "Created 7 tasks. Starting execution..."

Execution rules:

  1. TaskUpdate status="in_progress" BEFORE starting each task
  2. TaskUpdate status="completed" ONLY after verification passes
  3. If task fails → stay in_progress, diagnose, retry
  4. NEVER skip to next task until current is completed
  5. At end, TaskList to confirm all completed

Task 1: Gather Requirements

Goal: Understand what project to create.

First, ask Project Type:

Project TypeFollow-up Questions
Frontend SPALanguage, Framework, UI Library, Styling, State, Testing
Full-stack AppAbove + ORM, Database, API Style, Auth
API ServiceLanguage, Framework, ORM, Validation, Auth
CLI ToolLanguage, Package Manager, Testing
LibraryLanguage, Build Tool, Testing, Docs

Ask iteratively. Skip already-answered or N/A questions.

Verification: Have answers to all relevant questions for project type.

Task 2: Research Best Practices

Goal: Find current best practices for the chosen stack.

Use WebSearch to find:

  • Latest stable version of framework
  • Official CLI/init command
  • Recommended project structure
  • Current best practices (2025/2026)

CRITICAL: Don't assume. Official docs change frequently.

Verification: Have official init command and current version numbers.

Task 3: Write Blueprint

Goal: Create a blueprint document for user review.

Write to: /docs/blueprint.md

Blueprint Format

# Project Blueprint

## Stack
- Language: [name] [version]
- Framework: [name] [version]
- Package manager: [choice]

## Initialization Command
\`\`\`bash
[official CLI command]
\`\`\`

## Project Structure
[Expected directory layout after init]

## Key Dependencies
[Core packages to add]

## Agent System Plan
- CLAUDE.md: [key laws]
- Rules: [planned rules]
- Hooks: [planned quality gates]

Verification: Blueprint is written and covers all sections.

Task 4: Get User Confirmation

Goal: Have user approve the blueprint before execution.

CRITICAL: Do not proceed without explicit user confirmation.

Present:

  • Summary of planned stack
  • Init command to run
  • Agent system components

Ask: "Does this blueprint look correct? Should I proceed?"

Verification: User has explicitly approved the blueprint.

Task 5: Bootstrap Project

Goal: Run the official CLI to create the project.

Process:

  1. Run the official init command from blueprint
  2. Install additional dependencies if needed
  3. Apply any post-init configurations
  4. Verify project builds/runs

Example:

npx create-next-app@latest my-app --typescript --tailwind --eslint
cd my-app && npm run dev

Verification: Project builds and runs without errors.

Task 6: Setup Agent System

Goal: Configure Claude Code for the new project.

CRITICAL: Invoke the migrating-agent-systems skill.

This handles:

  • Create CLAUDE.md with project-specific laws
  • Setup rules for code conventions
  • Configure hooks for linting/formatting
  • Create useful skills if needed

Verification: Agent system is configured and working.

Task 7: Final Validation

Goal: Verify everything works together.

Checklist:

  • Project builds without errors
  • Project runs without errors
  • CLAUDE.md exists with <law> block
  • Hooks run on file changes (if configured)
  • README documents the setup

Verification: All checklist items pass.

Project Type Quick Reference

Frontend SPA

npx create-next-app@latest --typescript --tailwind
# or
npm create vite@latest -- --template react-ts

Full-stack App

npx create-next-app@latest --typescript
# Add: prisma, next-auth, zod

API Service

npm init -y && npm install express typescript
# or
cargo new --name api

CLI Tool

npm init -y && npm install commander
# or
cargo new --name cli

Red Flags - STOP

These thoughts mean you're rationalizing. STOP and reconsider:

  • "I know the current version"
  • "Skip research, I've done this before"
  • "Don't need user confirmation"
  • "Agent system can wait"
  • "Skip validation, it's a fresh project"

All of these mean: You're about to create a weak foundation. Follow the process.

Common Rationalizations

ExcuseReality
"I know the version"Versions change monthly. Verify.
"Skip research"Best practices evolve. Check official docs.
"Skip confirmation"Blueprint approval prevents wasted effort.
"Agent system later"Set it up now while context is fresh.
"Fresh = working"Fresh projects can have config issues. Validate.

Flowchart: Project Initialization

digraph init_project {
    rankdir=TB;

    start [label="New project", shape=doublecircle];
    gather [label="Task 1: Gather\nrequirements", shape=box];
    research [label="Task 2: Research\nbest practices", shape=box];
    blueprint [label="Task 3: Write\nblueprint", shape=box];
    confirm [label="Task 4: User\nconfirmation", shape=box];
    confirmed [label="Approved?", shape=diamond];
    bootstrap [label="Task 5: Bootstrap\nproject", shape=box];
    agent [label="Task 6: Setup\nagent system", shape=box];
    validate [label="Task 7: Final\nvalidation", shape=box];
    valid [label="All\npasses?", shape=diamond];
    done [label="Project ready", shape=doublecircle];

    start -> gather;
    gather -> research;
    research -> blueprint;
    blueprint -> confirm;
    confirm -> confirmed;
    confirmed -> bootstrap [label="yes"];
    confirmed -> blueprint [label="no\nrevise"];
    bootstrap -> agent;
    agent -> validate;
    validate -> valid;
    valid -> done [label="yes"];
    valid -> bootstrap [label="no\nfix"];
}

Source

git clone https://github.com/wayne930242/Reflexive-Claude-Code/blob/main/plugins/rcc/skills/initializing-projects/SKILL.mdView on GitHub

Overview

Initializes a new project from scratch using modern best practices and an integrated agent system. It bootstraps the full development environment, including Claude Code integration, and validates setup against official docs rather than assuming defaults.

How This Skill Works

Generates a mandatory sequence of seven tasks with TaskCreate, announcing 'Created 7 tasks. Starting execution...'. It then enforces sequential execution: update each task to in_progress before starting, then mark completed only after verification passes. If a task fails, it remains in progress while diagnosing and retrying until success; at the end it runs a TaskList to confirm all tasks are completed. Task 6 configures Claude Code via the migrating-agent-systems skill to set up the agent system for the project.

When to Use It

  • Bootstrapping a new Frontend SPA and needing a blueprint-driven init with official docs
  • Starting a Full-stack App requiring architecture decisions, ORM choices, and API style
  • Creating an API Service that requires consistent init commands and validations
  • Launching a CLI Tool that needs packaging, testing, and docs scaffolding
  • Bootstrapping a Library with build tool, tests, and docs

Quick Start

  1. Step 1: Gather requirements and determine the Project Type (Frontend SPA, Full-stack App, API Service, CLI Tool, or Library)
  2. Step 2: Research best practices, fetch official init commands, and write the blueprint to /docs/blueprint.md
  3. Step 3: Obtain user confirmation, bootstrap the project, and set up the agent system using migrating-agent-systems

Best Practices

  • Define a 7-task plan with TaskCreate before acting to ensure scope and sequence are clear
  • Research and verify against official docs for the chosen stack; don't assume defaults
  • Write a blueprint in /docs/blueprint.md covering stack, init command, structure, dependencies, and agent plan
  • Require explicit user confirmation before proceeding to bootstrap
  • Configure Claude Code agent system (via migrating-agent-systems) and document CLAUDE.md, rules, and hooks

Example Use Cases

  • Bootstrapping a Next.js SPA with TypeScript, Tailwind, and ESLint, plus Claude Code integration
  • Initializing a FastAPI service with PostgreSQL, JWT auth, and an official CLI scaffold
  • Creating a Node.js CLI tool with yargs, testing, and documentation
  • Starting a React library with Rollup, Babel, and comprehensive docs
  • Spinning up a Django REST API with a frontend SPA and a vetted project blueprint

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers