一键导入
first-principles-design
First-principles approach to plugin design. Use when designing new plugins, evaluating features, or simplifying existing implementations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
First-principles approach to plugin design. Use when designing new plugins, evaluating features, or simplifying existing implementations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Team progress management with development planning, risk control, and progress tracking. Use when managing multi-person projects, tracking task ownership, or coordinating branch workflows.
First-principles project management - from idea to execution with maximum efficiency. Use when starting projects, evaluating requirements, or managing development workflow.
| name | first-principles-design |
| description | First-principles approach to plugin design. Use when designing new plugins, evaluating features, or simplifying existing implementations. |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash, TodoWrite, AskUserQuestion |
Design plugins with maximum value and minimum complexity.
"What is the simplest thing that could possibly work?"
A plugin should do one thing well. Every tool, parameter, and configuration must earn its place.
Before designing anything, validate the requirement:
┌─ What problem are we solving?
│ └─ Can we state it in one sentence?
│
├─ Who has this problem?
│ └─ Real users or hypothetical?
│
├─ What's the current workaround?
│ └─ How painful is it really?
│
├─ Does a solution already exist?
│ └─ Official plugin? Third-party? Manual process?
│
└─ What's the minimum viable solution?
└─ What's the 20% that delivers 80% value?
Output: Problem statement + validated need (or decision to not proceed)
Ruthlessly cut features before you build:
Feature triage:
├─ P0 (Must have): Without this, plugin is useless
├─ P1 (Should have): Important but can ship without
├─ P2 (Nice to have): Delete from v1.0
└─ P3 (Future): Delete from planning entirely
Rules:
Output: Minimal tool list (P0 only)
For each remaining tool:
Tool simplification:
├─ Parameters
│ ├─ Required: Minimum needed to function
│ ├─ Optional: Challenge each one - delete if possible
│ └─ Derived: Can we compute from other params?
│
├─ Output
│ ├─ Return raw API response when possible
│ ├─ Don't transform data unnecessarily
│ └─ JSON > formatted text (let workflow handle display)
│
└─ Error handling
├─ Fail fast with clear messages
├─ Don't retry automatically (let user decide)
└─ Don't catch errors you can't handle meaningfully
Output: Simple tool specifications
Build fast by reusing:
Reuse checklist:
├─ Copy from official plugins (don't reinvent)
├─ Use standard patterns (tool → API → response)
├─ Skip abstraction layers (direct implementation)
├─ One file per tool (no shared utilities unless proven needed)
└─ Test with real API, not mocks
Output: Working implementation
After plugin works:
Automation candidates:
├─ Package build script (if releasing multiple times)
├─ Credential validation (if complex)
├─ Integration tests (if critical path)
└─ Nothing else until proven necessary
my_plugin/
├── manifest.yaml # Metadata
├── main.py # Entry point (3 lines)
├── provider/
│ ├── provider.yaml # Credentials (keep simple)
│ └── provider.py # Validation (optional)
├── tools/
│ ├── tool_one.yaml # Tool definition
│ └── tool_one.py # Tool implementation
└── _assets/
└── icon.svg
tool_design:
name: verb_noun # e.g., get_transactions, create_payment
parameters:
required: # What's the minimum to make an API call?
- name: essential_param
why: "Cannot function without this"
optional: # Challenge each one
- name: optional_param
why: "Proven user need, not speculation"
default: sensible_value
deleted: # Document what you didn't include
- name: removed_param
why: "Can be derived / rarely used / adds complexity"
output:
format: json # Prefer JSON over text
transform: minimal # Pass through API response when possible
errors:
strategy: fail_fast # Clear message, no retry logic
| Anti-Pattern | Example | Better Approach |
|---|---|---|
| Kitchen sink | 15 tools in one plugin | 3-5 focused tools |
| Over-parameterization | 10 optional params | 1-2 optional max |
| Data transformation | Format dates, rename fields | Return raw, let workflow handle |
| Smart error handling | Auto-retry, fallbacks | Fail fast, clear message |
| Premature abstraction | BaseAPIClient class | Direct httpx calls |
| Both auth methods | API key AND OAuth | Pick one for v1 |
Feature request arrives
│
▼
┌─ Can the plugin work without it? ─┐
│ │
▼ YES ▼ NO
DELETE IT ┌─ Is it P0 for MVP? ─┐
│ │
▼ YES ▼ NO
INCLUDE IT DEFER TO v2
parameters:
- account_id (required)
- start_date (optional)
- end_date (optional)
- status_filter (optional)
- category_filter (optional)
- min_amount (optional)
- max_amount (optional)
- search_query (optional)
- sort_order (optional)
- page_size (optional)
- page_number (optional)
- include_pending (optional)
- format_output (optional)
parameters:
- account_id (required) # Must have
- limit (optional, default: 50) # Pagination
# Everything else: use API defaults or let user filter in workflow
┌─────────────────────────────────────────────────────┐
│ FIRST-PRINCIPLES PLUGIN DESIGN │
├─────────────────────────────────────────────────────┤
│ 1. QUESTION → Is this plugin needed at all? │
│ 2. DELETE → Cut to 1-3 tools, minimal params │
│ 3. SIMPLIFY → Raw responses, fail fast │
│ 4. ACCELERATE → Copy patterns, skip abstraction │
│ 5. AUTOMATE → Only after proven need │
├─────────────────────────────────────────────────────┤
│ ✓ One plugin = one API service │
│ ✓ One tool = one operation │
│ ✓ Return JSON, let workflow transform │
│ ✓ Fail fast with clear errors │
└─────────────────────────────────────────────────────┘