Repository: mastra-ai/mastra
File: packages/cli/src/commands/init/utils.ts (TypeScript)

Code before:
## Development Tips

- Use TypeScript for better type safety and autocomplete
- Test your agents and workflows before deployment
- Check the \`.env\` file for required environment variables
`;

  return content;
}

/**
 * Generate content for CLAUDE.md file
 */
export function generateClaudeMarkdown({ mcpServer }: { mcpServer?: Editor }): string {
  return `# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

This is a Mastra project - an AI framework for building agents, workflows, and tools. The project structure follows Mastra conventions with agents, tools, and workflows organized in the \`src/mastra/\` directory.

For complete setup and usage instructions, see [AGENTS.md](./AGENTS.md), which includes:
- Quick start commands
- Project structure details
- Mastra skills usage${mcpServer ? '\n- MCP Docs Server configuration' : ''}
- Development guidelines
- Core concepts and resources
`;
}

/**
 * Write AGENTS.md file to project root
 */
export async function writeAgentsMarkdown(options: { skills?: string[]; mcpServer?: Editor }): Promise<void> {
  const content = generateAgentsMarkdown(options);
  const formattedContent = await prettier.format(content, {
    parser: 'markdown',
    singleQuote: true,
  });
  const filePath = path.join(process.cwd(), 'AGENTS.md');
  await fs.writeFile(filePath, formattedContent);
}

/**
 * Write CLAUDE.md file to project root
 */
export async function writeClaudeMarkdown(options: { skills?: string[]; mcpServer?: Editor }): Promise<void> {
  const content = generateClaudeMarkdown(options);
  const formattedContent = await prettier.format(content, {
    parser: 'markdown',
    singleQuote: true,
  });

Review comment (suggestion):
```suggestion
- Links to relevant documentation
```

Code after:

1. The server was automatically configured during project creation
2. Restart your editor to load the MCP server
3. Use the Mastra docs tools in your editor to access:
   - API references
   - Code examples
   - Integration guides

Learn more in the [MCP Documentation](https://mastra.ai/docs/mcp/overview).

`;
  }

  // Add resources section
  content += `## Resources

- [Mastra Documentation](https://mastra.ai/llms.txt)
- [Mastra .well-known skills discovery](https://mastra.ai/.well-known/skills/index.json)
`;

  return content;
}

/**
 * Generate content for CLAUDE.md file
 */
export function generateClaudeMarkdown({ mcpServer }: { mcpServer?: Editor }): string {
  return `# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

This is a Mastra project - an AI framework for building agents, workflows, and tools. The project structure follows Mastra conventions with agents, tools, and workflows organized in the \`src/mastra/\` directory.

For complete setup and usage instructions, see [AGENTS.md](./AGENTS.md), which includes:
- Quick start commands
- Project structure details
- Mastra skills usage${mcpServer ? '\n- MCP Docs Server configuration' : ''}
- Links to relevant documentation
`;
}

/**
 * Write AGENTS.md file to project root
 */
export async function writeAgentsMarkdown(options: { skills?: string[]; mcpServer?: Editor }): Promise<void> {
  const content = generateAgentsMarkdown(options);
  const formattedContent = await prettier.format(content, {
    parser: 'markdown',
    singleQuote: true,
  });
  const filePath = path.join(process.cwd(), 'AGENTS.md');