mirror of
https://github.com/LeoYeAI/openclaw-master-skills.git
synced 2026-08-14 00:48:08 +00:00
54 lines
1.6 KiB
JavaScript
54 lines
1.6 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* AI Prompt Generator - AI 提示词生成器
|
|
* Price: ¥3
|
|
*/
|
|
|
|
async function main() {
|
|
const args = process.argv.slice(2);
|
|
|
|
const params = {};
|
|
for (let i = 0; i < args.length; i++) {
|
|
if (args[i].startsWith('--')) {
|
|
const key = args[i].slice(2);
|
|
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
|
|
params[key] = value;
|
|
}
|
|
}
|
|
|
|
console.log('🎯 AI 提示词生成器已启动');
|
|
console.log('━━━━━━━━━━━━━━━━━━━━');
|
|
|
|
const { task, model, style, template, action } = params;
|
|
|
|
if (!task && !template && !action) {
|
|
console.log('用法:/ai-prompt-generator --task <任务> [选项]');
|
|
console.log('模板:cot, role, few-shot, chain');
|
|
console.log('模型:gpt-4, claude, gemini, qwen');
|
|
return;
|
|
}
|
|
|
|
console.log(`\n📋 任务:${task || '使用模板'}`);
|
|
console.log(`🤖 目标模型:${model || 'auto'}`);
|
|
console.log(`🎨 风格:${style || 'balanced'}`);
|
|
console.log(`📐 模板:${template || 'custom'}`);
|
|
|
|
console.log('\n⏳ 正在生成提示词...');
|
|
|
|
// 提示词框架示例
|
|
const frameworks = {
|
|
cot: '思维链 (Chain of Thought)',
|
|
role: '角色扮演 (Role Play)',
|
|
fewshot: '少样本学习 (Few-Shot)',
|
|
chain: '任务链 (Task Chain)'
|
|
};
|
|
|
|
console.log('\n✅ 提示词生成完成!');
|
|
console.log(`📐 使用框架:${frameworks[template] || '自定义'}`);
|
|
console.log('━━━━━━━━━━━━━━━━━━━━');
|
|
console.log('💰 本次消费:¥3');
|
|
}
|
|
|
|
main().catch(console.error);
|