design-an-interface
Skill5 starsChanged 4 months agoMITView on GitHub
สร้าง interface design หลายแบบที่ต่างกันสุดขั้วสำหรับ module หนึ่ง โดยใช้ sub-agent แบบ parallel ใช้เมื่อ user อยากออกแบบ API, สำรวจตัวเลือกของ interface, เปรียบเทียบรูปทรงของ module หรือพูดถึง "design it twice
59 other projects use a version of this, 55 of them edited.
Adopted by
Most recently taken up by
- chrislacey89/skillsedited, first seen Nov 4, 2026
- kishan-ict/skillsedited, first seen Nov 1, 2026
- aveproject/avetheir own version, first seen Oct 31, 2026
- hmjBill/skillstheir own version, first seen Oct 29, 2026
- piotr-oles/skillsedited, first seen Oct 25, 2026
- popsiclelmlm/skills-cnedited, first seen Oct 20, 2026
Used with
Projects with it also use decision-mapping, batch-grill-me and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
FabienDehopreSkilldecision-mapping
Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
Also in 5 projects that use this
boyingliu01Skillbatch-grill-me
A relentless interview that asks every frontier question at once, round by round. Thin alias of `grilling` (#540) — upstream mattpocock/skills absorbed this protocol into grilling; XP-Gate keeps this name as the sprint-flow Phase 2 entry point so orchestration docs stay stable.
Also in 5 projects that use this
HK-hubSkillprd-to-plan
Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
Also in 6 projects that use this
ShopifySkilltriage-issue
Triage a GitHub issue — classify priority (P0/P1/P2), search for duplicates, and apply labels.
Also in 11 projects that use this
GoogleSkillto-prd
Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 24 projects that use this
Other versions59 projects use a version of this.
Word for word · 0
None found.
Edited · 55
- wannabespace/conar★ 1.5k23% same
- amazingloft999-droid/mattpocock-skills★ 42220% same
- Tiberriver256/mcp-server-azure-devops★ 39920% same
- InditexTech/weavejs★ 26620% same
- loulanyue/skills★ 23120% same
- jagrat7/linux-wallpaper-engine★ 22720% same
- aurorasoft2/Matt_Pocock_Skills★ 13320% same
- VisualxIntelligence/mattpocok-skills★ 5520% same
- metrogg/AgentHub★ 1920% same
- chinkan/RustFox★ 1120% same
45 more not listed
Wrote their own version · 4
- aveproject/ave★ 24same name
- allemaar/open-skills★ 15same name
- Sturla22/skills★ 1same name
- hmjBill/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- qaSkill
- request-refactor-planSkill
- ubiquitous-languageSkill
- ask-mattSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- grill-with-docsSkill
- implementSkill
- improve-codebase-architectureSkill
- prototypeSkill
- researchSkill
- resolving-merge-conflictsSkill
- setup-matt-pocock-skillsSkill
- tddSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wayfinderSkill
- claude-handoffSkill
- loop-meSkill
- setup-ts-deep-modulesSkill
- wizardSkill
- writing-beatsSkill
- writing-fragmentsSkill
- writing-shapeSkill
- git-guardrails-claude-codeSkill
- migrate-to-shoehornSkill
- scaffold-exercisesSkill
- setup-pre-commitSkill
- edit-articleSkill
- obsidian-vaultSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- teachSkill
- writing-great-skillsSkill
The file
Files
Design an Interface
อิงจากแนวคิด "Design It Twice" ในหนังสือ "A Philosophy of Software Design": ไอเดียแรกของคุณแทบไม่เคยเป็นไอเดียที่ดีที่สุด สร้าง design หลายแบบที่ต่างกันสุดขั้ว แล้วค่อยเปรียบเทียบ
Workflow
1. เก็บ Requirements
ก่อนออกแบบ ต้องเข้าใจก่อนว่า:
- module นี้แก้ปัญหาอะไร?
- ใครคือ caller? (module อื่น, ผู้ใช้ภายนอก, test)
- operation หลักคืออะไรบ้าง?
- มี constraint อะไรไหม? (performance, compatibility, pattern ที่มีอยู่แล้ว)
- อะไรควรซ่อนไว้ข้างใน อะไรควร expose ออกมา?
ถามว่า: "module นี้ต้องทำอะไรได้บ้าง? ใครจะเป็นคนใช้?"
2. สร้าง Design (Sub-Agent แบบ Parallel)
spawn sub-agent 3 ตัวขึ้นไปพร้อมกันด้วย Task tool แต่ละตัวต้อง produce แนวทางที่ต่างกันสุดขั้ว
Prompt template for each sub-agent:
Design an interface for: [module description]
Requirements: [gathered requirements]
Constraints for this design: [assign a different constraint to each agent]
- Agent 1: "Minimize method count - aim for 1-3 methods max"
- Agent 2: "Maximize flexibility - support many use cases"
- Agent 3: "Optimize for the most common case"
- Agent 4: "Take inspiration from [specific paradigm/library]"
Output format:
1. Interface signature (types/methods)
2. Usage example (how caller uses it)
3. What this design hides internally
4. Trade-offs of this approach3. นำเสนอ Design
โชว์แต่ละ design พร้อม:
- Interface signature - types, methods, params
- ตัวอย่างการใช้งาน - caller ใช้มันจริง ๆ ยังไงในทางปฏิบัติ
- มันซ่อนอะไรไว้ - ความซับซ้อนที่เก็บไว้ข้างใน
นำเสนอทีละ design เพื่อให้ user ซึมซับแต่ละแนวทางได้ก่อนถึงขั้นเปรียบเทียบ
4. เปรียบเทียบ Design
หลังโชว์ครบทุก design แล้ว เปรียบเทียบกันในแง่:
- ความเรียบง่ายของ interface: method น้อยกว่า, params เรียบง่ายกว่า
- General-purpose vs specialized: ความยืดหยุ่น vs ความโฟกัส
- ประสิทธิภาพของ implementation: รูปทรงนี้เปิดทางให้ internals ทำงานได้มีประสิทธิภาพไหม?
- ความลึก (depth): interface เล็กที่ซ่อนความซับซ้อนไว้เยอะ (ดี) vs interface ใหญ่แต่ implementation บาง (แย่)
- ใช้ให้ถูกได้ง่าย vs ใช้ผิดได้ง่าย
อภิปราย trade-off เป็นร้อยแก้ว ไม่ใช่ตาราง เน้นจุดที่ design แตกต่างกันมากที่สุด
5. สังเคราะห์
บ่อยครั้ง design ที่ดีที่สุดเกิดจากการรวม insight จากหลายตัวเลือกเข้าด้วยกัน ถามว่า:
- "design ไหนเข้ากับ use case หลักของคุณที่สุด?"
- "มีชิ้นส่วนจาก design อื่นที่ควรหยิบมาผสมไหม?"
เกณฑ์การประเมิน
จากหนังสือ "A Philosophy of Software Design":
ความเรียบง่ายของ interface: method น้อยกว่า params เรียบง่ายกว่า = เรียนรู้ง่ายและใช้ถูกต้องได้ง่ายกว่า
General-purpose: รองรับ use case ในอนาคตได้โดยไม่ต้องแก้ แต่ระวังการ generalize เกินจำเป็น
ประสิทธิภาพของ implementation: รูปทรงของ interface เปิดทางให้ implement ได้มีประสิทธิภาพไหม? หรือบังคับให้ internals ต้องเขียนแบบฝืน ๆ?
ความลึก (depth): interface เล็กที่ซ่อนความซับซ้อนไว้เยอะ = deep module (ดี) interface ใหญ่แต่ implementation บาง = shallow module (เลี่ยง)
Anti-Patterns
- อย่าปล่อยให้ sub-agent produce design ที่คล้ายกัน - ต้องบังคับให้ต่างกันสุดขั้ว
- อย่าข้ามขั้นเปรียบเทียบ - คุณค่าอยู่ที่ contrast
- อย่าลงมือ implement - นี่เป็นเรื่องรูปทรงของ interface ล้วน ๆ
- อย่าประเมินจากความยาก-ง่ายของการ implement
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

