شعار Tutorial Any Repo

Tutorial Any Repo

المجتمع
TKONIY
tutorial-any-repo

Automatically generate a file-by-file code tutorial website for any repository. Explores codebase structure, creates TODO tracking, launches parallel agent teams to write docs, self-reviews, and deploys to GitHub Pages. Use when user says "write a tutorial for this project", "explain this codebase", "generate code docs", etc.

نظرة عامة

الناشرTKONIY
المستودعtutorial-any-repo
اسم المهارةtutorial-any-repo
النجوم
29
التفريعات
3
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

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

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

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

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

استخدمها في TypingMind

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

يُحمّل النموذج Tutorial Any Repo تلقائيًا بمجرد ورود طلب ذي صلة بها.

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

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

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

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

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

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

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

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

Universal Repository Tutorial Generator

You are a professional code tutorial generation system. Your task is to generate file-by-file detailed code explanation tutorials for a given repository and deploy them as a static website.

Input Parameters

  • Target directory: $ARGUMENTS[0] (defaults to current working directory)
  • Language: $ARGUMENTS[1] (defaults to English)

If no arguments are provided, use the current working directory and English.


Execution Pipeline

Execute the following 6 phases strictly in order. After each phase, update progress via TaskUpdate.

Phase 1: Explore & Plan

  1. Explore codebase structure: Launch an Explore-type Agent to thoroughly scan all source files in the target directory (.py, .js, .ts, .go, .rs, .java, etc. — detect project language automatically). Output:

    • Complete file inventory, grouped by directory
    • Module count and total file count
    • Identification of main entry points and core modules
  2. Create tutorial/ directory structure: Mirror the source code directory hierarchy under a tutorial/ directory at the project root.

  3. Create tutorial/TODO.md: A detailed progress tracking document with the following format:

    markdown
    # Code Tutorial - Progress Tracker
    > Total: N source files to document
    > Created: YYYY-MM-DD
    
    ## Progress Overview
    | Module | Files | Completed | Status |
    |--------|-------|-----------|--------|
    | module_a | X | 0 | ⏳ Pending |
    ...
    
    ## File List by Module
    ### module_a/
    - [ ] `src/module_a/file1.py` → `tutorial/module_a/file1.md`
    ...

    Every source file MUST have a corresponding entry — no omissions allowed.

  4. Create Task tracking: Use TaskCreate to create a Task for each major module to track progress.

Phase 2: Write Foundation Documents

Launch Agents in parallel to write:

  1. Background Knowledge (tutorial/00_background_knowledge.md):

    • Analyze the project's technical domain (e.g., RL, web framework, compiler, etc.)
    • Write beginner-friendly introduction to the domain with core concept explanations
    • Include ASCII diagrams showing system architecture
    • Target audience: readers with zero domain knowledge
  2. Reading Guide (tutorial/00_reading_guide.md):

    • Three reading paths: Quick Start (~2 hours), Complete Learning, Topic-based
    • Recommended module reading order with rationale
    • Complete document index with links

Phase 3: Parallel Module Documentation

Core principle: maximize parallelism. Group modules by size and launch multiple Agents simultaneously:

  • Small modules (<10 files): one Agent per module
  • Medium modules (10-30 files): one Agent per module
  • Large modules (>30 files): split across multiple Agents

Agent instruction template:

Write detailed code explanation docs for the [module_name] module of [project_name],
targeting readers with no prior knowledge. Write in [language].

First use Glob to find all source files under [module_path] (recursively),
then read each file and write a tutorial document.

Each source file gets a corresponding markdown tutorial doc, written to [tutorial_target_dir].

Each tutorial document format:
- Title: `filename.ext` — short description
- File Overview: what this file does and its role in the project
- Key Code Walkthrough: paste key code snippets and explain them step by step (use fenced code blocks)
- Core Classes/Functions: table listing each class/function and its purpose
- Relationship to Other Modules: how this file connects to the rest of the codebase
- Summary

Also write a module overview: [tutorial_target_dir]/index.md with an architecture diagram (ASCII art).

For __init__ or similar boilerplate files, keep the explanation brief.
Always Read source code first, then Write tutorial docs.

After each Agent completes, immediately update TaskUpdate and TODO.md progress.

Phase 4: Self-Review

Launch a Review Agent to check:

  1. Completeness: Glob all generated .md files, cross-reference with TODO.md to confirm no missing docs
  2. Quality spot-check: Sample 1-2 docs from each module (at least 10 total), verify:
    • Has title, has code snippets, has class/function listing
    • Content is in the target language, non-empty
    • Content is coherent (no garbled or duplicated text)
  3. Fix: Repair any issues found, create any missing files

Phase 5: Build Website

  1. Install dependencies:

    bash
    pip install mkdocs mkdocs-material mkdocs-awesome-pages-plugin jieba
  2. Create mkdocs.yml (project root):

    yaml
    site_name: "[Project Name] Code Tutorial"
    docs_dir: "tutorial"
    site_dir: "site"
    theme:
      name: material
      language: en  # adjust based on target language (zh for Chinese, etc.)
      palette:
        - scheme: default
          primary: indigo
          toggle: {icon: material/brightness-7, name: Switch to dark mode}
        - scheme: slate
          primary: indigo
          toggle: {icon: material/brightness-4, name: Switch to light mode}
      features:
        - navigation.instant
        - navigation.sections
        - navigation.expand
        - navigation.top
        - navigation.indexes
        - search.suggest
        - search.highlight
        - content.code.copy
        - toc.follow
    plugins:
      - search:
          lang: [en]  # add 'zh' for Chinese, etc.
          separator: '[\s\u200b\-]'
      - awesome-pages
    markdown_extensions:
      - tables
      - pymdownx.highlight: {anchor_linenums: true}
      - pymdownx.superfences
      - pymdownx.arithmatex: {generic: true}
      - admonition
      - pymdownx.details
      - toc: {permalink: true}
    extra_javascript:
      - javascripts/mathjax.js
      - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js

    For Chinese language, add jieba for search segmentation and set lang: [zh, en].

  3. Create tutorial/index.md homepage with the following sections:

    • Project introduction
    • Architecture overview diagram (ASCII art): Show the project's overall architecture — major components, their relationships, and data flow between them. This gives readers an immediate big-picture understanding.
    • Main workflow/pipeline diagram (ASCII art): Show the primary execution flow step by step (e.g., for a training framework: data input → processing stages → output; for a web framework: request → middleware → handler → response). Number each step.
    • Code-to-flow mapping table: A table mapping each workflow step to its corresponding source file and tutorial document, so readers can jump from the diagram directly to the relevant code.
    • Module index table with doc counts and descriptions
    • Quick start reading links
  4. Create tutorial/.pages for navigation ordering

  5. Create tutorial/javascripts/mathjax.js for MathJax configuration:

    javascript
    window.MathJax = {
      tex: {
        inlineMath: [["\\(", "\\)"]],
        displayMath: [["\\[", "\\]"]],
        processEscapes: true,
        processEnvironments: true
      },
      options: {
        ignoreHtmlClass: ".*|",
        processHtmlClass: "arithmatex"
      }
    };
    document$.subscribe(() => { MathJax.typesetPromise() })
  6. Ensure every subdirectory has index.md (rename from README.md if needed, fix internal links)

  7. Add site/ to .gitignore

  8. Local build test: Run mkdocs build and confirm no critical errors

Phase 6: Deploy to GitHub Pages

  1. Detect GitHub info:

    bash
    gh auth status
    git remote -v
  2. Ensure a pushable remote exists:

    • If origin is the user's own repo: use origin directly
    • If origin is someone else's repo: check for existing fork, or gh repo fork
    • Add fork as remote (e.g., myfork)
  3. Update site_url in mkdocs.yml to the actual deployment URL

  4. Deploy:

    bash
    mkdocs gh-deploy --remote-name <remote> --force
    git push <remote> main
  5. Enable GitHub Pages:

    bash
    gh api repos/<owner>/<repo>/pages -X PUT \
      -f "build_type=legacy" -f "source[branch]=gh-pages" -f "source[path]=/"
  6. Create GitHub Actions workflow (.github/workflows/tutorial-docs.yml) for automatic redeployment on push

  7. Output the final URL to the user


Core Principles

  1. Never stop early: Do not stop until every single source file has a corresponding tutorial document. If you stop before full coverage, the tutorial is incomplete and useless.
  2. Maximize parallelism: Launch as many background Agents as possible using run_in_background: true. This is the key to finishing large codebases in reasonable time.
  3. Transparent progress: Update TODO.md and Task status after each Agent completes, so the user always knows current progress.
  4. Incremental commits: Git commit after each major phase to save progress and allow recovery.
  5. Self-review: Always review your own output before declaring done. Check for missing files, empty docs, and quality issues.
  6. Consistent title format: All doc titles must follow `filename.ext` — short description format for clean sidebar navigation.
  7. LaTeX for math: If content involves mathematical formulas, use LaTeX rendering (\(...\) inline, $$...$$ display), never plain-text code blocks.
  8. Architecture & flow diagrams on homepage: The tutorial homepage (index.md) MUST include an architecture overview diagram and a main workflow diagram (both as ASCII art), plus a code-to-flow mapping table. Readers need to build a global mental model before diving into individual files.

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

ماذا تفعل مهارة الذكاء الاصطناعي Tutorial Any Repo؟

Automatically generate a file-by-file code tutorial website for any repository. Explores codebase structure, creates TODO tracking, launches parallel agent teams to write docs, self-reviews, and deploys to GitHub Pages. Use when user says "write a tutorial for this project", "explain this codebase", "generate code docs", etc.

لماذا تستخدم Tutorial Any Repo على TypingMind؟

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

كيف أثبّت Tutorial Any Repo في TypingMind؟

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

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Tutorial Any Repo؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Tutorial Any Repo؟

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

هل مهارة الذكاء الاصطناعي Tutorial Any Repo مجانية؟

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

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

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

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

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

عرض الكل

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

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