.claude/skills/flow-init/SKILL.md
Initialize project with AGENTS.md and rules, handling both Greenfield (new) and Brownfield (existing) projects.
npx skillsauth add korchasa/ai-skel-ts flow-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze the project, conduct an interview (for Greenfield projects), and
generate 3 AGENTS.md files (root, documents/, scripts/), a CLAUDE.md symlink
(for Claude Code compatibility), rules, and scaffolding.
The agent uses template files from assets/ as reference and writes files directly.
File Structure: flow-init produces 3 AGENTS.md files:
./AGENTS.md — core agent rules, project metadata, planning rules, TDD flow./documents/AGENTS.md — documentation system rules (SRS/SDS/GODS formats, compressed style)./scripts/AGENTS.md — development commands (standard interface, detected commands)
</context>
<step_by_step>
Initialize
Analyze Project
deno run --allow-read scripts/generate_agents.ts .
{ "ok": bool, "result": {...} }. The result field contains: project metadata (is_new, stack, file_tree, readme_content), component inventory, and verification checks.Greenfield Workflow (Interview)
interviewer subagent (or conduct Q&A inline if subagent unavailable).
Prompt: "You are helping initialize a new (Greenfield) project. Conduct a brief interview to gather:
Return a SINGLE JSON object: { "project_name": "...", "vision_statement": "...", "target_audience": "...", "problem_statement": "...", "solution_differentiators": "...", "risks_assumptions": "...", "stack": ["..."], "architecture": "...", "key_decisions": "...", "preferences": ["tdd", "strict-mode", ...], "use_deno_tooling": boolean, "use_devcontainer": boolean }"
Brownfield Workflow (Discovery & Extraction)
package.json, deno.json, README.md, etc.)../AGENTS.md (if it exists):
./documents/AGENTS.md../scripts/AGENTS.md../AGENTS.md.Component Inventory
inventory section from the analysis output (step 2) to check which components exist.Generate AGENTS.md Files
Read template files from assets/ directory:
AGENTS.template.md — reference for ./AGENTS.mdAGENTS.documents.template.md — fallback for ./documents/AGENTS.mdAGENTS.scripts.template.md — fallback for ./scripts/AGENTS.mdFor Greenfield: Fill templates with interview data. Replace {{PLACEHOLDERS}} with actual values.
For Brownfield:
./AGENTS.md: Use the template structure. Fill with data inferred from the project. Preserve user's custom project rules (content between --- and the next ## heading). Remove any sections that were extracted for documents/ or scripts/../documents/AGENTS.md: Use extracted documentation sections from the existing ./AGENTS.md. If no documentation sections were found, use AGENTS.documents.template.md as fallback../scripts/AGENTS.md: Use extracted script/command sections from the existing ./AGENTS.md. If no command sections were found, use AGENTS.scripts.template.md as fallback, filling {{DEVELOPMENT_COMMANDS}} from detected stack and {{COMMAND_SCRIPTS}} from project config.For each file:
Claude Code Compatibility (CLAUDE.md Symlinks)
CLAUDE.md -> AGENTS.md in every directory that has an AGENTS.md:
./CLAUDE.md -> ./AGENTS.md./documents/CLAUDE.md -> ./AGENTS.md./scripts/CLAUDE.md -> ./AGENTS.mdCLAUDE.md does not exist: create the symlink, report to user.CLAUDE.md exists and is already a correct symlink to AGENTS.md: skip silently.CLAUDE.md exists as a regular file or wrong symlink: warn the user, show the current content/target, and ask for confirmation before replacing with the symlink.OpenCode Compatibility Check
inventory section from the analysis output (step 2) includes opencode_json.exists and opencode_json.has_subdirectory_globs.opencode_json.exists is true and has_subdirectory_globs is false: warn user and propose adding documents/AGENTS.md and scripts/AGENTS.md to the instructions array in opencode.json.Generate Documentation
documents/:
documents/requirements.md (SRS): Fill based on interview data (Greenfield) or inferred context (Brownfield). Skip if file exists and has more than 50 lines.documents/design.md (SDS): Create initial structure. Skip if file exists and has more than 50 lines.documents/whiteboard.md:
Configure Development Commands
use_deno_tooling: true, FORCE usage of flow-skill-configure-deno-commands.Deno -> flow-skill-configure-deno-commands).SKILL.md.check, test, dev, prod) in scripts/.package.json) to reference these scripts.scripts/ already exists with standard commands and user chose "create missing" -> skip.check command to ensure it works.use_devcontainer from interview data.flow-skill-setup-ai-ide-devcontainer skill. Read and follow its SKILL.md.project_info.json, interview_data.json (if created).deno run --allow-read scripts/generate_agents.ts .
verification section. If passed is false (exit code 1), fix the issues before proceeding.check command runs successfully../AGENTS.md and their respective subdirectory files.</step_by_step>
tools
Scaffold a complete AI agent application skeleton with LLM integration, tool calling, observability, cost tracking, session management, and content fetching using @korchasa/ai-skel-ts. Use when the user asks to create an AI agent, add LLM integration, scaffold an AI application, or mentions "ai-skel", "agent skeleton", or "AI scaffold". Works with any programming language.
testing
Create structured specification for large features using phased decomposition. Produces documents/spec-{name}.md with dependency-ordered phases, atomic tasks, explicit boundaries, and per-phase status tracking.
documentation
Guidelines for writing comprehensive Product Requirements Documents (PRD)
development
How to write in informational style