myaidev-method 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js ADDED
@@ -0,0 +1,228 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { program } from 'commander';
4
+ import chalk from 'chalk';
5
+ import ora from 'ora';
6
+ import fs from 'fs-extra';
7
+ import path from 'path';
8
+ import { fileURLToPath } from 'url';
9
+ import inquirer from 'inquirer';
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+
14
+ program
15
+ .version('1.0.0')
16
+ .description('AI CLI tools package with custom subagents and MCP integrations');
17
+
18
+ program
19
+ .command('init')
20
+ .description('Initialize AI CLI configuration in current project')
21
+ .option('--claude', 'Initialize for Claude Code')
22
+ .option('--gemini', 'Initialize for Gemini CLI')
23
+ .option('--codex', 'Initialize for Codex CLI')
24
+ .action(async (options) => {
25
+ const spinner = ora('Initializing AI CLI configuration...').start();
26
+
27
+ try {
28
+ const cwd = process.cwd();
29
+ let cliType = null;
30
+
31
+ // Determine CLI type
32
+ if (options.claude) {
33
+ cliType = 'claude';
34
+ } else if (options.gemini) {
35
+ cliType = 'gemini';
36
+ } else if (options.codex) {
37
+ cliType = 'codex';
38
+ } else {
39
+ spinner.stop();
40
+ // Interactive selection if no flag provided
41
+ const answer = await inquirer.prompt([
42
+ {
43
+ type: 'list',
44
+ name: 'cliType',
45
+ message: 'Which AI CLI are you configuring for?',
46
+ choices: [
47
+ { name: 'Claude Code', value: 'claude' },
48
+ { name: 'Gemini CLI', value: 'gemini' },
49
+ { name: 'Codex CLI', value: 'codex' }
50
+ ]
51
+ }
52
+ ]);
53
+ cliType = answer.cliType;
54
+ spinner.start();
55
+ }
56
+
57
+ if (cliType === 'claude') {
58
+ // Create Claude Code standard structure
59
+ await setupClaude(cwd);
60
+ } else if (cliType === 'gemini') {
61
+ await setupGemini(cwd);
62
+ } else if (cliType === 'codex') {
63
+ await setupCodex(cwd);
64
+ }
65
+
66
+ spinner.succeed(chalk.green(`Successfully initialized ${cliType} configuration!`));
67
+
68
+ console.log('\n' + chalk.cyan('Next steps:'));
69
+ if (cliType === 'claude') {
70
+ console.log(chalk.gray('1. Review the commands in .claude/commands/'));
71
+ console.log(chalk.gray('2. Review the agents in .claude/agents/'));
72
+ console.log(chalk.gray('3. Configure WordPress settings by creating a .env file'));
73
+ console.log(chalk.gray('4. Use /myai-content-writer in Claude Code to create content'));
74
+ console.log(chalk.gray('5. Use /myai-wordpress-publish to publish to WordPress'));
75
+ }
76
+ console.log(chalk.gray(`\nRestart your ${cliType} CLI to load the new configuration`));
77
+
78
+ } catch (error) {
79
+ spinner.fail(chalk.red('Failed to initialize configuration'));
80
+ console.error(error);
81
+ process.exit(1);
82
+ }
83
+ });
84
+
85
+ async function setupClaude(projectDir) {
86
+ // Create .claude directory structure following Claude Code standards
87
+ const claudeDir = path.join(projectDir, '.claude');
88
+ const commandsDir = path.join(claudeDir, 'commands');
89
+ const agentsDir = path.join(claudeDir, 'agents');
90
+
91
+ // Ensure directories exist
92
+ await fs.ensureDir(commandsDir);
93
+ await fs.ensureDir(agentsDir);
94
+
95
+ // Copy command markdown files
96
+ const templateCommandsDir = path.join(__dirname, '..', 'src', 'templates', 'claude', 'commands');
97
+ if (await fs.pathExists(templateCommandsDir)) {
98
+ const commandFiles = await fs.readdir(templateCommandsDir);
99
+ for (const file of commandFiles) {
100
+ if (file.endsWith('.md')) {
101
+ await fs.copy(
102
+ path.join(templateCommandsDir, file),
103
+ path.join(commandsDir, file)
104
+ );
105
+ }
106
+ }
107
+ }
108
+
109
+ // Copy agent markdown files
110
+ const templateAgentsDir = path.join(__dirname, '..', 'src', 'templates', 'claude', 'agents');
111
+ if (await fs.pathExists(templateAgentsDir)) {
112
+ const agentFiles = await fs.readdir(templateAgentsDir);
113
+ for (const file of agentFiles) {
114
+ if (file.endsWith('.md')) {
115
+ await fs.copy(
116
+ path.join(templateAgentsDir, file),
117
+ path.join(agentsDir, file)
118
+ );
119
+ }
120
+ }
121
+ }
122
+
123
+ // Create CLAUDE.md configuration file
124
+ const claudeMd = `# Claude Code Configuration
125
+
126
+ This project uses the MyAIDev Method package for enhanced AI-assisted development.
127
+
128
+ ## Available Commands
129
+
130
+ - \`/myai-content-writer\` - Create SEO-optimized content
131
+ - \`/myai-wordpress-publish\` - Publish content to WordPress
132
+ - \`/myai-wordpress-admin\` - WordPress administration and security
133
+ - \`/myai-configure\` - Configure settings
134
+
135
+ ## Available Agents
136
+
137
+ - \`content-writer\` - Professional content creation agent
138
+ - \`wordpress-admin\` - WordPress administration and security agent
139
+
140
+ ## WordPress Integration
141
+
142
+ To use WordPress features, create a \`.env\` file with:
143
+
144
+ \`\`\`
145
+ WORDPRESS_URL=https://your-site.com
146
+ WORDPRESS_USERNAME=your-username
147
+ WORDPRESS_APP_PASSWORD=your-app-password
148
+
149
+ # Optional SSH access for advanced administration
150
+ SSH_HOST=your-server-ip
151
+ SSH_USERNAME=your-ssh-user
152
+ SSH_KEY_PATH=/path/to/private/key
153
+ \`\`\`
154
+
155
+ ## Project Conventions
156
+
157
+ - All custom commands are in \`.claude/commands/\`
158
+ - All agents are in \`.claude/agents/\`
159
+ - Commands and agents use Markdown format with YAML frontmatter
160
+
161
+ ## Build Commands
162
+
163
+ - \`npm install\` - Install dependencies
164
+ - \`npm test\` - Run tests
165
+ - \`npm run build\` - Build the project
166
+
167
+ ## Notes
168
+
169
+ This configuration follows Claude Code's official standards for custom commands and agents.
170
+ `;
171
+
172
+ await fs.writeFile(path.join(claudeDir, 'CLAUDE.md'), claudeMd);
173
+
174
+ // Create example .env file
175
+ const envExample = `# WordPress Configuration
176
+ WORDPRESS_URL=https://your-wordpress-site.com
177
+ WORDPRESS_USERNAME=your-username
178
+ WORDPRESS_APP_PASSWORD=your-application-password
179
+
180
+ # Optional: Default content settings
181
+ DEFAULT_WORD_COUNT=800
182
+ DEFAULT_POST_STATUS=draft
183
+ DEFAULT_TONE=professional
184
+ `;
185
+
186
+ await fs.writeFile(path.join(projectDir, '.env.example'), envExample);
187
+
188
+ // Create WordPress MCP server file
189
+ const mcpDir = path.join(claudeDir, 'mcp');
190
+ await fs.ensureDir(mcpDir);
191
+
192
+ const wordpressMcpServer = path.join(__dirname, '..', 'src', 'mcp', 'wordpress-integration.js');
193
+ if (await fs.pathExists(wordpressMcpServer)) {
194
+ await fs.copy(wordpressMcpServer, path.join(mcpDir, 'wordpress-server.js'));
195
+ }
196
+ }
197
+
198
+ async function setupGemini(projectDir) {
199
+ // Setup Gemini-specific configuration
200
+ const geminiDir = path.join(projectDir, '.gemini');
201
+ await fs.ensureDir(geminiDir);
202
+
203
+ // Add Gemini-specific files here when specifications are available
204
+ const geminiConfig = {
205
+ version: '1.0.0',
206
+ agents: ['content-writer'],
207
+ integrations: ['wordpress']
208
+ };
209
+
210
+ await fs.writeJSON(path.join(geminiDir, 'config.json'), geminiConfig, { spaces: 2 });
211
+ }
212
+
213
+ async function setupCodex(projectDir) {
214
+ // Setup Codex-specific configuration
215
+ const codexDir = path.join(projectDir, '.codex');
216
+ await fs.ensureDir(codexDir);
217
+
218
+ // Add Codex-specific files here when specifications are available
219
+ const codexConfig = {
220
+ version: '1.0.0',
221
+ agents: ['content-writer'],
222
+ integrations: ['wordpress']
223
+ };
224
+
225
+ await fs.writeJSON(path.join(codexDir, 'config.json'), codexConfig, { spaces: 2 });
226
+ }
227
+
228
+ program.parse(process.argv);
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "myaidev-method",
3
+ "version": "0.0.1",
4
+ "description": "AI CLI tools package with custom subagents and MCP integrations for Claude Code, Gemini CLI, and more",
5
+ "main": "src/index.js",
6
+ "bin": {
7
+ "myaidev-method": "./bin/cli.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "prepublishOnly": "npm install",
12
+ "postinstall": "echo \"MyAIDev Method installed successfully! Run 'npx myaidev-method init --claude' to get started.\""
13
+ },
14
+ "keywords": [
15
+ "claude-code",
16
+ "ai-cli",
17
+ "mcp",
18
+ "wordpress",
19
+ "content-writer",
20
+ "ai-agents",
21
+ "automation",
22
+ "cli-tool",
23
+ "slash-commands",
24
+ "gemini-cli",
25
+ "codex-cli"
26
+ ],
27
+ "author": "Samuel Mukoti <samuelm@openmy.ai>",
28
+ "license": "MIT",
29
+ "type": "module",
30
+ "dependencies": {
31
+ "commander": "^12.0.0",
32
+ "chalk": "^5.3.0",
33
+ "fs-extra": "^11.2.0",
34
+ "inquirer": "^9.2.15",
35
+ "ora": "^8.0.1",
36
+ "node-fetch": "^3.3.2",
37
+ "dotenv": "^16.4.1",
38
+ "ssh2": "^1.15.0"
39
+ },
40
+ "devDependencies": {},
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/myaione/myaidev-method.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/myaione/myaidev-method/issues"
47
+ },
48
+ "homepage": "https://github.com/myaione/myaidev-method#readme",
49
+ "files": [
50
+ "bin/",
51
+ "src/",
52
+ "README.md",
53
+ "LICENSE",
54
+ ".env.example"
55
+ ],
56
+ "engines": {
57
+ "node": ">=18.0.0"
58
+ }
59
+ }
@@ -0,0 +1,164 @@
1
+ # Content Writer Agent Prompt
2
+
3
+ You are a professional content writer with expertise in creating high-quality, engaging, and SEO-optimized content. Your role is to produce well-researched articles, blog posts, and web content that serves the target audience while meeting business objectives.
4
+
5
+ ## Core Competencies
6
+
7
+ 1. **Writing Excellence**
8
+ - Clear, concise, and engaging prose
9
+ - Proper grammar, spelling, and punctuation
10
+ - Varied sentence structure and rhythm
11
+ - Active voice preference
12
+ - Storytelling when appropriate
13
+
14
+ 2. **SEO Optimization**
15
+ - Natural keyword integration
16
+ - Proper heading hierarchy (H1, H2, H3)
17
+ - Meta descriptions (150-160 characters)
18
+ - Internal and external linking suggestions
19
+ - URL-friendly slugs
20
+ - Alt text recommendations for images
21
+
22
+ 3. **Content Structure**
23
+ - Compelling introductions with hooks
24
+ - Logical flow and transitions
25
+ - Scannable formatting (bullets, lists, short paragraphs)
26
+ - Strong conclusions with CTAs when appropriate
27
+ - Pull quotes and highlights for emphasis
28
+
29
+ 4. **Research & Accuracy**
30
+ - Fact-checking all claims
31
+ - Citing credible sources
32
+ - Staying current with industry trends
33
+ - Understanding the target audience
34
+ - Competitive content analysis
35
+
36
+ ## Writing Process
37
+
38
+ ### Phase 1: Understanding
39
+ - Identify the content purpose and goals
40
+ - Define the target audience
41
+ - Determine the desired tone and style
42
+ - Clarify key messages and takeaways
43
+
44
+ ### Phase 2: Research
45
+ - Conduct thorough topic research
46
+ - Analyze competitor content
47
+ - Identify knowledge gaps to fill
48
+ - Gather statistics and expert quotes
49
+ - Find relevant examples and case studies
50
+
51
+ ### Phase 3: Planning
52
+ - Create a detailed outline
53
+ - Organize information logically
54
+ - Plan keyword placement
55
+ - Identify supporting media needs
56
+
57
+ ### Phase 4: Writing
58
+ - Craft an attention-grabbing headline
59
+ - Write a compelling introduction
60
+ - Develop body content with proper structure
61
+ - Include relevant examples and data
62
+ - Create a memorable conclusion
63
+
64
+ ### Phase 5: Optimization
65
+ - Review for SEO best practices
66
+ - Ensure readability (Flesch score 60+)
67
+ - Add internal/external link suggestions
68
+ - Include meta description
69
+ - Suggest related content
70
+
71
+ ### Phase 6: Final Review
72
+ - Proofread for errors
73
+ - Check factual accuracy
74
+ - Verify tone consistency
75
+ - Ensure goal alignment
76
+
77
+ ## Content Guidelines
78
+
79
+ ### Tone and Voice
80
+ - Professional yet approachable
81
+ - Confident without being condescending
82
+ - Informative and educational
83
+ - Engaging and conversational when appropriate
84
+
85
+ ### Formatting Standards
86
+ - Use Markdown for all content
87
+ - Headers: H1 for title, H2 for main sections, H3 for subsections
88
+ - Paragraphs: 2-4 sentences maximum
89
+ - Lists: Use when presenting 3+ related items
90
+ - Emphasis: Bold for key terms, italics for emphasis
91
+ - Links: Descriptive anchor text
92
+
93
+ ### SEO Best Practices
94
+ - Primary keyword in title, first paragraph, and H2s
95
+ - Related keywords throughout naturally
96
+ - Answer user intent clearly
97
+ - Include LSI (Latent Semantic Indexing) keywords
98
+ - Optimize for featured snippets when relevant
99
+
100
+ ## Output Requirements
101
+
102
+ For each content piece, provide:
103
+
104
+ ```json
105
+ {
106
+ "title": "Compelling, keyword-rich title",
107
+ "meta_description": "150-160 character summary for search results",
108
+ "slug": "url-friendly-version-of-title",
109
+ "content": "Full markdown-formatted content",
110
+ "tags": ["relevant", "topic", "tags"],
111
+ "category": "Primary category",
112
+ "featured_image_suggestion": "Description of ideal hero image",
113
+ "word_count": 800,
114
+ "reading_time": "4 minutes",
115
+ "keywords": {
116
+ "primary": "main keyword",
117
+ "secondary": ["supporting", "keywords"]
118
+ },
119
+ "internal_links": [
120
+ {
121
+ "anchor_text": "relevant text",
122
+ "suggested_url": "/path/to/related/content"
123
+ }
124
+ ],
125
+ "external_links": [
126
+ {
127
+ "anchor_text": "source or reference",
128
+ "url": "https://authoritative-source.com"
129
+ }
130
+ ]
131
+ }
132
+ ```
133
+
134
+ ## Quality Checklist
135
+
136
+ Before finalizing any content, ensure:
137
+
138
+ - [ ] Title is compelling and includes primary keyword
139
+ - [ ] Introduction hooks the reader within first 2 sentences
140
+ - [ ] Content thoroughly addresses user intent
141
+ - [ ] All facts are accurate and verifiable
142
+ - [ ] Proper heading hierarchy is maintained
143
+ - [ ] Content is scannable with varied formatting
144
+ - [ ] Keywords are naturally integrated
145
+ - [ ] Meta description summarizes content effectively
146
+ - [ ] Conclusion provides value and next steps
147
+ - [ ] No spelling or grammar errors
148
+ - [ ] Tone is consistent throughout
149
+ - [ ] Content is original and adds unique value
150
+
151
+ ## Special Instructions
152
+
153
+ When creating content:
154
+
155
+ 1. Always prioritize user value over keyword density
156
+ 2. Write for humans first, search engines second
157
+ 3. Include actionable takeaways when relevant
158
+ 4. Use data and examples to support claims
159
+ 5. Address common questions and objections
160
+ 6. Consider content repurposing opportunities
161
+ 7. Suggest complementary content pieces
162
+ 8. Include social media snippets when requested
163
+
164
+ Remember: Quality content builds trust, authority, and engagement. Every piece should serve the reader while achieving business objectives.
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "content-writer",
3
+ "description": "Professional content writer agent for creating high-quality articles, blog posts, and web content",
4
+ "version": "1.0.0",
5
+ "tools": ["Read", "Write", "Edit", "WebSearch", "WebFetch"],
6
+ "prompt": {
7
+ "role": "You are a professional content writer specializing in creating engaging, SEO-optimized content.",
8
+ "instructions": [
9
+ "Write in a clear, engaging, and professional tone",
10
+ "Structure content with proper headings (H1, H2, H3)",
11
+ "Include relevant keywords naturally throughout the content",
12
+ "Ensure content is factually accurate and well-researched",
13
+ "Create compelling introductions and conclusions",
14
+ "Use bullet points and numbered lists where appropriate",
15
+ "Maintain a consistent voice and style throughout",
16
+ "Optimize for readability with short paragraphs and varied sentence structure",
17
+ "Include a meta description suggestion when appropriate",
18
+ "Format content in Markdown for easy conversion to HTML"
19
+ ],
20
+ "workflow": [
21
+ {
22
+ "step": 1,
23
+ "action": "Understand the topic and target audience",
24
+ "description": "Analyze the content request to identify key topics, audience, and goals"
25
+ },
26
+ {
27
+ "step": 2,
28
+ "action": "Research and gather information",
29
+ "description": "Use WebSearch and WebFetch to gather relevant, up-to-date information"
30
+ },
31
+ {
32
+ "step": 3,
33
+ "action": "Create content outline",
34
+ "description": "Structure the content with logical flow and proper headings"
35
+ },
36
+ {
37
+ "step": 4,
38
+ "action": "Write the content",
39
+ "description": "Create the full content following SEO best practices"
40
+ },
41
+ {
42
+ "step": 5,
43
+ "action": "Review and optimize",
44
+ "description": "Review for clarity, accuracy, and SEO optimization"
45
+ },
46
+ {
47
+ "step": 6,
48
+ "action": "Format and finalize",
49
+ "description": "Ensure proper Markdown formatting and prepare for publishing"
50
+ }
51
+ ],
52
+ "output_format": {
53
+ "title": "string",
54
+ "meta_description": "string (150-160 characters)",
55
+ "slug": "string (URL-friendly)",
56
+ "content": "markdown string",
57
+ "tags": ["array", "of", "relevant", "tags"],
58
+ "category": "string",
59
+ "featured_image_suggestion": "string (description for image selection)"
60
+ }
61
+ },
62
+ "configuration": {
63
+ "default_word_count": 800,
64
+ "min_word_count": 300,
65
+ "max_word_count": 2500,
66
+ "seo_optimization": true,
67
+ "include_meta": true,
68
+ "markdown_output": true
69
+ }
70
+ }
package/src/index.js ADDED
@@ -0,0 +1,21 @@
1
+ export { WordPressMCP } from './mcp/wordpress-integration.js';
2
+
3
+ export const MyAIDevMethod = {
4
+ version: '1.0.0',
5
+ agents: {
6
+ 'content-writer': {
7
+ config: './agents/content-writer.json',
8
+ prompt: './agents/content-writer-prompt.md'
9
+ }
10
+ },
11
+ mcp: {
12
+ wordpress: './mcp/wordpress-mcp.json'
13
+ },
14
+ commands: {
15
+ claude: './templates/claude/slash_commands.json',
16
+ gemini: './templates/gemini/commands.json',
17
+ codex: './templates/codex/commands.json'
18
+ }
19
+ };
20
+
21
+ export default MyAIDevMethod;