شعار Posd Code Review

Posd Code Review

المجتمع
mzbac
posd-code-review

Review a codebase, directory, or PR diff using John Ousterhout’s “A Philosophy of Software Design” principles. Use when the user wants design/maintainability feedback: complexity (dependencies/obscurity), deep modules, information hiding/leakage, interface design (common case), layering, error-handling strategy, comments and naming/obviousness. Do NOT use for formatting-only or lint-only requests, or when the user is explicitly asking for performance benchmarking, a pure security audit, or purely stylistic rewrites.

نظرة عامة

الناشرmzbac
المستودعskills
اسم المهارةposd-code-review
النجوم
27
التفريعات
1
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها mzbac على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Posd Code Review في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/mzbac/skills/tree/main/skills/posd-code-review
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mzbac/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/posd-code-review .claude/skills/posd-code-review
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Posd Code Review في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Posd Code Review تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Posd Code Review بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

POSD Code Review Skill

Goal

Produce a review that reduces software complexity by:

  • Identifying dependencies and obscurity.
  • Mapping findings to symptoms: change amplification, cognitive load, and unknown unknowns.
  • Proposing refactors that create deep modules, strengthen information hiding, and make interfaces simpler for the most common use cases.
  • Offering practical, incremental improvements (“small investments”), not a wholesale rewrite.

Inputs (infer if missing)

  • Scope: PR diff / commit range / paths / whole repo.
  • Constraints: backwards compatibility, “no behavior change”, deadlines, style guides, API stability.
  • Audience: maintainers vs new contributors (affects how much explanation to include).

If scope is ambiguous, default to: review the touched area + immediate neighbors (callers/callees).

Operating mode

  • Default to read-only review: do not edit files unless asked.
  • Use evidence: cite file paths, symbols, and concrete examples.
  • Prefer small, staged refactors that can be landed safely.

Workflow

Step 0 — Build a quick mental model

  1. Identify the system’s main responsibilities and “shape”:
    • Key entrypoints, main services/packages, public APIs, domain layer, IO boundaries.
  2. Identify the primary modules/components and their interfaces:
    • What does each module promise?
    • What does the caller have to know (including “informal” constraints)?

Step 1 — Find complexity hotspots (evidence-driven)

Pick 3–10 candidate hotspots based on:

  • High churn / frequently changed files
  • High fan-in (many callers) or fan-out (many dependencies)
  • Lots of conditionals/special cases
  • Repeated logic across modules
  • High “setup tax” to use an API (many parameters, flags, ordering rules)

Suggested commands (optional, adapt to repo/tooling):

  • git status, git diff, git log --stat
  • rg -n "TODO|FIXME|HACK|workaround"
  • rg -n "throws | catch | Exception | Result<|Either<|panic!|unwrap\\("
  • Language-specific: eslint, ruff, golangci-lint, mvn test, etc. (only if requested/appropriate)

Step 2 — Review using POSD lenses (checklists below)

For each hotspot/module, analyze:

  • What complexity does it remove for callers?
  • What complexity does it push outward?
  • Where is knowledge duplicated across modules?

Step 3 — “Design it twice” for top issues

For the top 2–3 most impactful findings:

  • Provide two alternative designs.
  • Pick one and justify why it reduces overall complexity.

Step 4 — Produce an actionable report

Use the output template below. Prioritize issues that:

  • Reduce change amplification across multiple files
  • Reduce cognitive load for common tasks
  • Eliminate unknown unknowns by improving interfaces/docs
  • Shrink exception surface area

POSD Review Checklists

A) Complexity (dependencies + obscurity)

Look for:

  • Call chains that require reading multiple files to understand one change.
  • Implicit ordering constraints (“call A before B”).
  • Hidden invariants (only “known” by tribal knowledge).
  • Names that don’t reveal intent; missing “why” documentation.

Fix strategies:

  • Pull related knowledge into one module.
  • Make invariants explicit in interfaces and comments.
  • Replace “temporal coupling” with data-driven or capability-based APIs.

B) Deep modules vs shallow modules

Shallow module signals:

  • Big/complex interface for little functionality.
  • Wrappers that mostly forward calls (“pass-through” methods).
  • Many tiny classes that add interfaces without hiding complexity.

Deep module goals:

  • Small, stable interface; substantial internal work hidden behind it.
  • Callers can use the module without understanding its internals.

Fix strategies:

  • Merge overly-fragmented modules when they share knowledge.
  • Replace multiple special-purpose methods with one general-purpose method + simple parameters.
  • Move complexity into the module if it simplifies the caller.

C) Information hiding & information leakage

Leakage signals:

  • Same file format / protocol / validation rules implemented in multiple modules.
  • Duplicated constants, field names, parsing rules.
  • Two modules that must be changed together for one “design decision”.

Fix strategies:

  • Consolidate the “knowledge” into one module.
  • Introduce a focused module that owns the leaking decision.
  • Remove getters that expose internal structures; offer intention-revealing methods instead.

D) Interfaces designed for the common case

Look for:

  • APIs that require rare options to be understood to do common tasks (“overexposure”).
  • Too many parameters / flags / configuration knobs.
  • Interfaces that “punt” hard cases to the caller.

Fix strategies:

  • Provide good defaults.
  • Replace flag soups with a smaller number of cohesive operations.
  • Make common-case code short and obvious; move uncommon complexity behind optional APIs.

E) Layering: different layers, different abstractions

Look for:

  • Upper layers duplicating lower-layer APIs.
  • Pass-through methods/variables across multiple layers.
  • Decorator stacks that multiply shallow interfaces.

Fix strategies:

  • Collapse layers that don’t add a distinct abstraction.
  • Reassign responsibilities so each layer adds real value.
  • Expose lower-level APIs directly when the upper layer adds no abstraction.

F) Error handling: reduce exception surface area

Look for:

  • Defensive “throw everywhere” patterns.
  • Exceptions that callers can’t realistically handle.
  • Many special-case checks scattered across the codebase.
  • Exception-handling branches that are untested/unreachable.

Fix strategies:

  • Define errors out of existence by changing semantics so the “error” cannot occur (or becomes normal behavior).
  • Mask/collapse related failures into fewer handling sites.
  • If an error is unrecoverable, prefer a clear “panic/fail fast” boundary rather than half-handling everywhere.
  • Before introducing a new error/exception: describe exactly how the caller will handle it.

G) Comments & documentation (abstraction + non-obvious info)

Look for:

  • Public methods without an interface/contract comment.
  • Comments that restate code (noise).
  • Missing “why” on non-obvious algorithms, invariants, or tricky edge cases.
  • Implementation details leaking into interface docs (wrong abstraction level).

Fix strategies:

  • Add header/interface comments that define the contract.
  • Add “why” comments for non-obvious design decisions.
  • Remove comments that merely repeat code and refactor code to be more obvious.

H) Naming, consistency, obviousness

Look for:

  • Vague names; “hard to name” entities that likely hide an unclear abstraction.
  • Local inconsistencies (same concept named differently across files).
  • Non-obvious code where the reader must simulate mentally to understand.

Fix strategies:

  • Rename to encode intent and invariants.
  • Align naming and patterns within a subsystem.
  • Rewrite small sections for clarity; prefer readability over cleverness.

Output template (required)

Executive summary

  • 3–7 bullets: biggest complexity drivers, where they show up, what to do next.

Scorecard (0–5)

Rate each area briefly with 1–2 sentences:

  • Deep modules
  • Information hiding/leakage
  • Interface common-case usability
  • Layering/abstraction boundaries
  • Error handling strategy
  • Comments/contracts
  • Naming/consistency/obviousness

Findings (prioritized)

For each finding:

  1. Title (short)
  2. Principle violated (e.g., information leakage, shallow module, overexposure)
  3. Evidence (files/symbols; concrete snippet description)
  4. Impact
    • Change amplification? Cognitive load? Unknown unknowns?
  5. Recommendation
    • Smallest safe change first
  6. Design-it-twice alternatives (required for top 2–3 findings)
  7. Risk & test plan
    • What to verify; what tests to add/run

Suggested investment plan

  • Quick wins (small refactors/docs)
  • Medium refactors (module/interface reshaping)
  • Long-term (architecture boundary shifts)

Quality bar

  • Prefer fewer, deeper findings over a long list of nits.
  • Every recommendation must reduce overall complexity for future changes.
  • If you claim something is “complex”, explain what it forces readers/callers to know.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Posd Code Review؟

Review a codebase, directory, or PR diff using John Ousterhout’s “A Philosophy of Software Design” principles. Use when the user wants design/maintainability feedback: complexity (dependencies/obscurity), deep modules, information hiding/leakage, interface design (common case), layering, error-handling strategy, comments and naming/obviousness. Do NOT use for formatting-only or lint-only requests, or when the user is explicitly asking for performance benchmarking, a pure security audit, or purely stylistic rewrites.

لماذا تستخدم Posd Code Review على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Posd Code Review عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Posd Code Review في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/mzbac/skills/tree/main/skills/posd-code-review. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Posd Code Review؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Posd Code Review؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Posd Code Review معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Posd Code Review مجانية؟

نشرها mzbac على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇