मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग15k · #10982

principle-model-the-domain

यह क्या करती है

यह स्किल असिस्टेंट को स्टेटफ़ुल लॉजिक को डोमेन से मेल खाने वाली संरचनाओं में मॉडल करने का नियम देती है। यह उन इंजीनियरों के लिए है जिनके कोड में फ़्लैग और नेस्टेड शर्तें भरी हैं।

कब इस्तेमाल करें

  • ✓जब आप लाइफ़साइकल या चरणों वाला स्टेटफ़ुल लॉजिक लिख रहे हैं।
  • ✓जब कोड में भारी ब्रांचिंग हो या फ़ाइलों में एक जैसी आकार वाली मान्यताएँ दोहराई जाती हों।
  • ✓जब अमान्य स्टेट बार-बार सिस्टम में घुस रही हों।

Skill का लिंक

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-model-the-domain/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-model-the-domain/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारा ऑर्डर फ़्लो स्टेटस दिखाने के लिए booleans के ढेर का इस्तेमाल करता है। इसे ठीक से मॉडल कीजिए, ताकि असंभव स्टेट बन ही न सकें।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

असिस्टेंट असली स्टेट और नियम पहचानता है, फिर उन्हें उपयुक्त संरचना में कोड करता है, जैसे state machine, टाइप किया हुआ मॉडल या lookup table। इससे कई ब्रांच हट जाती हैं और अमान्य स्टेट लिखना कठिन हो जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Model the Domain

Encode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.

Reach for:

  • A state machine instead of scattered booleans, phases, or lifecycle checks.
  • A typed model instead of loose parameters or repeated shape assumptions.
  • A map, registry, lookup table, or discriminated union instead of branching spread across files.
  • A reducer or command/event model instead of ad hoc state mutations.
  • A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.
  • A small module boundary that gathers repeated behavior, ownership, or invariants.
  • A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.
  • Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.

Do not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.

The sign that you skipped this is a new feature that grows an existing if/else chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.

अक्सर पूछे जाने वाले सवाल

क्या हर समस्या को नई संरचना चाहिए?

नहीं। स्किल कहती है कि जब मौजूदा आकार साफ़ हो और उसके बढ़ने की संभावना कम हो, तो सादा कोड पसंद करें।

एक आम उदाहरण क्या है?

बिखरे booleans की जगह एक state machine रखना जो केवल मान्य ट्रांज़िशन की अनुमति दे।

संरचना जल्दी क्यों चुनें?

लिखते समय यह सस्ता है, जबकि बाद में सही संरचना खोजना अक्सर टलता है और ज़्यादा महँगा पड़ता है।

जानकारी

लेखक का मूल विवरण

Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.

repo: cursor/plugins

लोकप्रियता

GitHub स्टार
15k
रैंकिंग में स्थान
#10982
लाइसेंस
—
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

advisor

15k

अगर आप इसे चालू करते हैं, तो आपका एजेंट बड़े फ़ैसले से पहले या किसी त्रुटि में अटकने पर एक ज़्यादा शक्तिशाली दूसरे मॉडल से सलाह ले सकता है।

AI और एजेंटएजेंट

check-agent-compatibility

15k

जाँचती है कि AI कोडिंग एजेंट किसी रिपॉज़िटरी को शुरू, सत्यापित और दस्तावेज़ित कर सकते हैं या नहीं, और एक अनुकूलता स्कोर के साथ मुख्य समस्याएँ लौटाती है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

cli-for-agents

15k

आपके एजेंट को कमांड-लाइन टूल ऐसे डिज़ाइन या जाँचना सिखाती है कि AI एजेंट उन्हें बिना प्रॉम्प्ट चला सकें, साफ़ help टेक्स्ट और उदाहरणों के साथ।

कोडिंगAPI और सर्वर (backend)

continual-learning

15k

पिछली चैट की समीक्षा का काम एक समर्पित मेमोरी अपडेटर को सौंपकर आपकी AGENTS.md नोट्स को अद्यतन रखती है।

AI और एजेंटएजेंट

मिलती-जुलती skills