Install
openclaw skills install decision-expertA decision support skill that helps users analyze options, weigh trade-offs, and apply decision frameworks (SWOT, decision matrix, pros/cons, etc.) across va...
openclaw skills install decision-expertA comprehensive decision support system that helps users make better choices by providing structured analysis, decision frameworks, and objective evaluation of options.
Use this skill when the user:
Common trigger phrases:
The skill provides a CLI command decision with the following structure:
# Get help and list available frameworks
decision help
# Analyze a decision with automatic framework selection
decision analyze "买什么手机" --options "iPhone 15, Samsung Galaxy S24, Google Pixel 8"
# Create a pros/cons list
decision pros-cons "换工作到上海" --pros "高薪, 发展机会" --cons "高房价, 离家远"
# Use a specific decision framework
decision swot "开咖啡店" --strengths "热爱咖啡, 有经验" --weaknesses "资金有限" --opportunities "社区需求" --threats "竞争激烈"
# Create a decision matrix
decision matrix "买车" --criteria "价格, 油耗, 安全性, 空间" --options "SUV, 轿车, 电动车" --weights "30, 20, 25, 25"
# Compare multiple options
decision compare "度假地点" --options "巴厘岛, 日本, 欧洲" --factors "预算, 时间, 兴趣, 便利性"
# Start an interactive decision-making session
decision interactive
# Guided decision workflow
decision guide "职业选择"
# Shopping decisions
decision shopping "笔记本电脑" --budget 8000 --needs "编程, 设计, 便携"
# Career decisions
decision career "offer选择" --offers "公司A: 高薪但忙, 公司B: 平衡但薪低"
# Investment decisions
decision investment "买房 vs 租房" --timeframe "5年" --risk "中等"
# Daily life decisions
decision daily "早上锻炼还是晚上锻炼" --factors "精力水平, 时间安排, 坚持难度"
# Export decision analysis to different formats
decision analyze "买手机" --format markdown --output decision.md
decision analyze "买手机" --format json --output decision.json
decision analyze "买手机" --format table --display
The skill implements several proven decision-making frameworks:
decision-expert/
├── cli/ # Command-line interface
│ ├── index.js # Main CLI entry point
│ ├── commands/ # Individual command implementations
│ └── utils/ # CLI utilities
├── lib/ # Core decision logic
│ ├── frameworks/ # Decision framework implementations
│ ├── models/ # Data models (Decision, Option, Criterion, etc.)
│ ├── analysis/ # Analysis algorithms
│ └── visualization/ # Output formatting and display
├── scenarios/ # Scenario-specific logic
│ ├── shopping.js
│ ├── career.js
│ ├── investment.js
│ └── daily.js
├── storage/ # Decision history and templates
│ ├── history/
│ ├── templates/
│ └── exports/
└── interactive/ # Interactive session manager
├── prompts.js
├── workflows.js
└── ui.js
{
"dependencies": {
"commander": "^11.0.0", // CLI framework
"inquirer": "^9.2.0", // Interactive prompts
"chalk": "^5.3.0", // Terminal styling
"cli-table3": "^0.6.3", // Table displays
"lodash": "^4.17.21", // Utility functions
"yaml": "^2.3.0", // YAML parsing for templates
"json2csv": "^6.0.0", // CSV export
"markdown-table": "^3.0.3" // Markdown table generation
},
"devDependencies": {
"jest": "^29.7.0", // Testing
"eslint": "^8.50.0" // Code quality
}
}
// Core decision API
const decisionEngine = {
createDecision(description, options, criteria),
applyFramework(decision, framework, params),
calculateScores(decision, weights),
generateRecommendation(decision),
exportDecision(decision, format)
};
// Framework implementations
const frameworks = {
prosCons: { analyze(options, pros, cons) },
swot: { analyze(strengths, weaknesses, opportunities, threats) },
decisionMatrix: { analyze(options, criteria, weights, scores) },
costBenefit: { analyze(costs, benefits, timeframe, discountRate) }
};
~/.openclaw/workspace/skills/decision-expert/
├── SKILL.md # This file
├── README.md # User documentation
├── package.json # Node.js package definition
├── cli.js # Main CLI entry point
├── lib/
│ ├── index.js # Main library export
│ ├── decision-engine.js # Core decision logic
│ ├── frameworks/ # Framework implementations
│ │ ├── pros-cons.js
│ │ ├── swot.js
│ │ ├── decision-matrix.js
│ │ └── index.js
│ └── utils/
│ ├── formatters.js # Output formatting
│ └── validators.js # Input validation
├── templates/ # Decision templates
│ ├── shopping/
│ ├── career/
│ └── investment/
├── examples/ # Example usage
│ ├── phone-decision.md
│ ├── job-offer-decision.json
│ └── investment-analysis.csv
└── scripts/ # Utility scripts
├── setup.sh # Installation script
└── test-decision.sh # Test script
~/.openclaw/workspace/skills/decision-expert/
├── .github/ # GitHub workflows
│ └── workflows/
│ └── test.yml
├── bin/ # Executable scripts
│ └── decision
├── src/ # TypeScript source
│ ├── cli/
│ ├── lib/
│ ├── types/
│ └── utils/
├── tests/ # Comprehensive test suite
│ ├── unit/
│ ├── integration/
│ └── fixtures/
├── docs/ # Detailed documentation
│ ├── frameworks/
│ ├── scenarios/
│ └── api/
├── config/ # Configuration files
│ ├── default-config.yaml
│ └── scenario-config.yaml
├── data/ # Sample data and templates
│ ├── templates/
│ ├── examples/
│ └── benchmarks/
├── public/ # Web assets (if any)
│ ├── css/
│ └── js/
└── dist/ # Compiled output (for TypeScript)
The decision assistant skill can integrate with OpenClaw in several ways:
decision commands directly// Pearl agent can use the decision assistant like this:
const { analyzeDecision } = require('decision-expert');
async function helpWithDecision(userQuery, options) {
const analysis = await analyzeDecision(userQuery, options);
return `Based on my analysis: ${analysis.recommendation}\n\n${analysis.summary}`;
}
# Install the skill
npx skills add <owner/repo>@decision-expert
# Or install locally for development
cd ~/.openclaw/workspace/skills/decision-expert
npm install
npm link # Makes 'decision' command available globally
# Test with a simple decision
decision help
decision analyze "晚饭吃什么" --options "中餐, 西餐, 日料"
# Clone and setup
git clone <repository> ~/.openclaw/workspace/skills/decision-expert
cd ~/.openclaw/workspace/skills/decision-expert
npm install
# Run tests
npm test
# Build (if TypeScript)
npm run build
# Run in development mode
node cli.js help
This skill welcomes contributions! Areas needing improvement:
[MIT License] - Open for use and modification within the OpenClaw ecosystem.
"Good decisions come from experience, and experience comes from bad decisions." - This skill helps you get more experience without the bad decisions.