Structured decision-making patterns for common engineering choices — library selection, architecture, build vs buy, prioritization, reversibility analysis, and ADRs. Use when choosing between tools, architectures, or approaches, or when documenting technical decisions.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install decision-frameworks或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install decision-frameworks⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/decision-frameworks/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: decision-frameworks model: reasoning description: Structured decision-making patterns for common engineering choices — library selection, architecture, build vs buy, prioritization, reversibility analysis, and ADRs. Use when choosing between tools, architectures, or approaches, or when documenting technical decisions. ---
Structured approaches for making engineering decisions with confidence and traceability.
npx clawhub@latest install decision-frameworks
---
---
Use a weighted scoring matrix when comparing 3+ options across measurable criteria.
| Criteria | Weight | Option A | Option B | Option C | |----------------------|--------|----------|----------|----------| | Performance | 5 | 4 (20) | 3 (15) | 5 (25) | | Developer Experience | 4 | 5 (20) | 4 (16) | 3 (12) | | Community Support | 3 | 5 (15) | 3 (9) | 2 (6) | | Learning Curve | 3 | 3 (9) | 4 (12) | 2 (6) | | Cost | 2 | 5 (10) | 3 (6) | 4 (8) | | Total | | 74 | 58 | 57 |
How to use:
---
Follow this decision tree:
Is it a core differentiator for your product?
├── YES → Build it (own the competitive advantage)
└── NO
├── Does a mature, well-maintained solution exist?
│ ├── YES → Buy / adopt it
│ └── NO → Build, but keep it minimal
└── Is the integration cost higher than building?
├── YES → Build
└── NO → Buy / adopt
Factor comparison:
| Factor | Build | Buy / Adopt | |----------------------|--------------------------------|---------------------------------| | Maintenance cost | Ongoing — your team owns it | Vendor/community maintains it | | Customization | Unlimited flexibility | Limited to extension points | | Time to market | Slower — development required | Faster — ready-made | | Team expertise | Must have or acquire skills | Abstracted away | | Long-term cost | Scales with internal capacity | License/subscription fees | | Vendor lock-in risk | None | Medium to high | | Security control | Full audit capability | Dependent on vendor transparency |
---
Evaluate candidate libraries against these criteria before adopting:
| Criterion | What to Check | Red Flag | |--------------------------|----------------------------------------------------|------------------------------------| | Maintenance activity | Commits in last 90 days, open issues trend | No commits in 6+ months | | Community size | GitHub stars, npm weekly downloads, Discord/forum | < 1k weekly downloads for critical lib | | Bundle size | Bundlephobia, tree-shaking support | > 50 KB gzipped for a utility lib | | TypeScript support | Built-in types vs DefinitelyTyped, type quality | No types or outdated @types | | Breaking change history | Changelog, semver adherence, migration guides | Frequent majors without guides | | License | OSI-approved, compatible with your project | AGPL in a SaaS product, no license | | Security audit | Snyk/Socket score, CVE history, dependency depth | Known unpatched CVEs | | Documentation quality | Getting started guide, API reference, examples | README-only, no examples |
Quick heuristic: If you cannot replace the library within one sprint, treat the decision as a one-way door (see Reversibility Check below).
---
Use these tradeoff tables when choosing between architectural approaches.
| Factor | Monolith | Microservices | |---------------------|----------------------------------|--------------------------------------| | Complexity | Low at start, grows over time | High from day one | | Deployment | Single artifact | Independent per service | | Team scaling | Harder beyond 10-15 engineers | Enables autonomous teams | | Data consistency | ACID transactions | Eventual consistency, sagas | | Debugging | Single process, easy tracing | Distributed tracing required | | Best when | Early-stage, small team, MVP | Proven domain boundaries, scale needs |
| Factor | SQL (Relational) | NoSQL (Document/Key-Value) | |---------------------|----------------------------------|--------------------------------------| | Schema | Strict, enforced | Flexible, schema-on-read | | Relationships | Native joins, foreign keys | Denormalized, application-level joins | | Scaling | Vertical (read replicas help) | Horizontal by design | | Consistency | Strong (ACID) | Tunable (eventual to strong) | | Query flexibility | Ad-hoc queries, aggregations | Limited to access patterns | | Best when | Complex relations, reporting | High write volume, flexible schema |
| Factor | REST | GraphQL | |---------------------|----------------------------------|--------------------------------------| | Simplicity | Simple, well-understood | Schema definition required | | Over/under-fetching | Common — multiple endpoints | Clients request exact fields | | Caching | HTTP caching built-in | Requires custom caching layer | | Tooling | Mature ecosystem | Growing — Apollo, Relay, urql | | Versioning | URL or header versioning | Schema evolution, deprecation | | Best when | CRUD APIs, public APIs | Complex UIs, mobile + web clients |
| Factor | SSR | CSR | SSG | |---------------------|------------------------|------------------------|-----------------------------| | Initial load | Fast (HTML from server) | Slow (JS bundle parse) | Fastest (pre-built HTML) | | SEO | Excellent | Poor without hydration | Excellent | | Best when | Personalized pages | Dashboards, SPAs | Blogs, docs, marketing |
| Factor | Monorepo | Polyrepo | |---------------------|----------------------------------|--------------------------------------| | Code sharing | Trivial — same repo | Requires published packages | | CI/CD complexity | Needs smart filtering (Turborepo) | Simple per-repo pipelines | | Best when | Shared libs, aligned releases | Independent teams, different stacks |
---
Score and rank features/tasks:
RICE Score = (Reach x Impact x Confidence) / Effort
| Factor | Scale | |------------|--------------------------------------------------------| | Reach | Number of users/events affected per quarter | | Impact | 3 = massive, 2 = high, 1 = medium, 0.5 = low, 0.25 = minimal | | Confidence | 100% = high, 80% = medium, 50% = low | | Effort | Person-weeks (or person-sprints) |
| Category | Meaning | Budget Target | |--------------|------------------------------------------------|----------------| | Must | Non-negotiable for this release | ~60% of effort | | Should | Important but not critical | ~20% of effort | | Could | Desirable if time permits | ~15% of effort | | Won't | Explicitly out of scope (this time) | ~5% (planning) |
---
Classify every significant decision as a one-way or two-way door.
...
安装 Decision Frameworks 后,可以对 AI 说这些话来触发它
Help me get started with Decision Frameworks
Explains what Decision Frameworks does, walks through the setup, and runs a quick demo based on your current project
Use Decision Frameworks to structured decision-making patterns for common engineering choices ...
Invokes Decision Frameworks with the right parameters and returns the result directly in the conversation
What can I do with Decision Frameworks in my developer & devops workflow?
Lists the top use cases for Decision Frameworks, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/decision-frameworks/ 目录(个人级,所有项目可用),或 .claude/skills/decision-frameworks/(项目级)。重启 AI 客户端后,用 /decision-frameworks 主动调用,或让 AI 根据上下文自动发现并使用。
Decision Frameworks 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Decision Frameworks 可免费安装使用。请查阅仓库了解许可证信息。
Structured decision-making patterns for common engineering choices — library selection, architecture, build vs buy, prioritization, reversibility analysis, and ADRs. Use when choosing between tools, architectures, or approaches, or when documenting technical decisions.
Decision Frameworks 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Decision Frameworks
Identifies repetitive steps in your workflow and sets up Decision Frameworks to handle them automatically