跳到主要内容

jupyter-notebook 精选

استخدمه عندما يطلب المستخدم إنشاء أو تهيئة أو تعديل دفاتر Jupyter (`.ipynb`)

在 GitHub 打开

安装方式

cp -r translations/ar/.agents/skills/jupyter-notebook ~/.claude/skills/jupyter-notebook-2

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/microsoft/ai-agents-for-beginners.git

依赖与权限

  • 无需 API Key
  • 需要联网访问外部服务
  • 依赖外部命令:python pip uv
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 microsoft/ai-agents-for-beginners@4c9a275 · 许可 MIT · 内容未修改

مهارة Jupyter Notebook

أنشئ دفاتر Jupyter نظيفة وقابلة للتكرار لوضعين أساسيين:

  • التجارب والتحليل الاستكشافي
  • الدروس والشروحات التعليمية

فضل استخدام القوالب المضمنة والبرنامج النصي المساعد للحصول على هيكل متسق وتقليل أخطاء JSON.

متى تُستخدم

  • أنشئ دفترًا جديدًا .ipynb من الصفر.
  • حوّل ملاحظات أولية أو سكربتات إلى دفتر منظم.
  • أعد هيكلة دفتر موجود ليصبح أكثر قابلية للتكرار وسهولة التصفح.
  • بِناء تجارب أو دورات سيتم قراءتها أو إعادة تشغيلها من قبل أشخاص آخرين.

شجرة القرار

  • إذا كان الطلب استكشافيًا أو تحليليًا أو قائمًا على فرضية، اختر experiment.
  • إذا كان الطلب تعليميًا أو خطوة بخطوة أو مخصصًا لجمهور معين، اختر tutorial.
  • عند تحرير دفتر قائم، اعتبر ذلك إعادة هيكلة: حافظ على الهدف وحسّن البنية.

مسار المهارة (يُضبط مرة واحدة)

export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export JUPYTER_NOTEBOOK_CLI="$CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py"

يتم تثبيت المهارات على مستوى المستخدم تحت $CODEX_HOME/skills (الافتراضي: ~/.codex/skills).

سير العمل

  1. ثبت النية.

Identify the notebook kind: experiment or tutorial.

سجّل الهدف والجمهور وما الذي يبدو عليه "الانتهاء".

  1. Scaffold from the template.

Use the helper script to avoid hand-authoring raw notebook JSON.

uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind experiment \
  --title "Compare prompt variants" \
  --out output/jupyter-notebook/compare-prompt-variants.ipynb
uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind tutorial \
  --title "Intro to embeddings" \
  --out output/jupyter-notebook/intro-to-embeddings.ipynb
  1. املأ الدفتر بخطوات صغيرة قابلة للتشغيل.

حافظ على تركيز كل خلية كود على خطوة واحدة.

أضف خلايا Markdown قصيرة تشرح الهدف والنتيجة المتوقعة.

تجنب المخرجات الكبيرة والمزعجة عندما يكفي ملخص قصير.

  1. طبق النمط المناسب.

بالنسبة للتجارب، اتبع references/experiment-patterns.md.

بالنسبة للدروس، اتبع references/tutorial-patterns.md.

  1. حرّر بأمان عند العمل على دفاتر موجودة.

حافظ على بنية الدفتر؛ تجنّب إعادة ترتيب الخلايا إلا إذا حسّنت السرد من الأعلى إلى الأسفل.

فضل التعديلات المستهدفة على إعادة الكتابة الكاملة.

إذا اضطررت لتحرير JSON الخام، راجع references/notebook-structure.md أولاً.

  1. تحقق من النتيجة.

شغل الدفتر من الأعلى إلى الأسفل عندما تسمح البيئة بذلك.

إذا لم يكن التنفيذ ممكنًا، اذكر ذلك صراحة ووضّح كيفية التحقق محليًا.

استخدم قائمة التحقق النهائية في references/quality-checklist.md.

القوالب والبرنامج النصي المساعد

  • تُخزَّن القوالب في assets/experiment-template.ipynb و assets/tutorial-template.ipynb.
  • يقوم البرنامج النصي المساعد بتحميل قالب، وتحديث خلية العنوان، وكتابة دفتر ملاحظات.

مسار البرنامج النصي:

  • $JUPYTER_NOTEBOOK_CLI (المثبت افتراضيًا: $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py)

اتفاقيات الملفات المؤقتة والمخرجات

  • استخدم tmp/jupyter-notebook/ للملفات الوسيطة؛ احذفها عند الانتهاء.
  • اكتب المنتج النهائي تحت output/jupyter-notebook/ عند العمل في هذا المستودع.
  • استخدم أسماء ملفات ثابتة ووصفية (على سبيل المثال، ablation-temperature.ipynb).

التبعيات (ثبتها فقط عند الحاجة)

فضل استخدام uv لإدارة التبعيات.

حزم Python الاختيارية لتشغيل الدفتر محليًا:

uv pip install jupyterlab ipykernel

يستخدم البرنامج النصي المضمّن لبناء القالب مكتبة Python القياسية فقط ولا يتطلب تبعيات إضافية.

البيئة

لا توجد متغيرات بيئة مطلوبة.

خريطة المراجع

  • references/experiment-patterns.md: بنية التجربة والقواعد الإرشادية.
  • references/tutorial-patterns.md: بنية الدرس وتدفق التدريس.
  • references/notebook-structure.md: شكل JSON لدفتر الملاحظات وقواعد التحرير الآمن.
  • references/quality-checklist.md: قائمة التحقق النهائية.

<!-- CO-OP TRANSLATOR DISCLAIMER START -->

إخلاء المسؤولية:

تمت ترجمة هذا المستند باستخدام خدمة الترجمة الآلية Co-op Translator (https://github.com/Azure/co-op-translator). بينما نسعى إلى الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر المرجعي المعتمد. للمعلومات الحرجة أو المهمة، يُنصح بالاستعانة بترجمة بشرية ومحترفة. نحن غير مسؤولين عن أي سوء فهم أو تأويل ينشأ عن استخدام هذه الترجمة.

<!-- CO-OP TRANSLATOR DISCLAIMER END -->

质量与来源

所属仓库
microsoft/ai-agents-for-beginners
仓库星标
7.7 万
最近更新
今天
采集时间
今天
commit
4c9a27595226
内容指纹
sha256:e773d9882259e90
文件路径
translations/ar/.agents/skills/jupyter-notebook/SKILL.md

同仓库其它 Skill

查看全部 24 个
azure-openai-to-responses
Migrate Python apps from Azure OpenAI Chat Completions to the Responses API. Covers AzureOpenAI/AsyncAzureOpenAI client migration to the v1 endpoint, streaming, tools, structured output, multi-turn, EntraID auth, and model compatibility checks. Python-focused, Azure OpenAI-specific. USE FOR: migrate to responses API, switch from chat completions, openai responses, upgrade openai SDK, responses API migration, move from completions to responses, gpt-5 migration, azure openai python migration, chat completions to responses, AzureOpenAI to OpenAI client, python azure openai upgrade. DO NOT USE FOR: building new apps from scratch (start with responses directly), Node/TypeScript/C#/Java/Go migrations (this skill is Python-only), Azure infrastructure setup (use azure-prepare), deploying models (use microsoft-foundry).
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端
deploying-scalable-agents
Take a working agent prototype to a scalable, observable production deployment on Microsoft Foundry. Covers deployment patterns (client-hosted, hosted agents, agent workflows), the agent lifecycle, model routing, response caching, evaluation gates, human-in-the-loop approval, observability with OpenTelemetry, cost optimisation, and smoke-testing deployed agents with the AI Smoke Test action. Based on Lesson 16 of AI Agents for Beginners. USE FOR: deploy an agent to production, scale an agent, Microsoft Foundry hosted agent, Foundry Agent Service, model routing, response caching, evaluation gate, release gate, human approval workflow, agent observability, agent tracing, agent cost optimisation, smoke test a hosted agent, production customer support agent. DO NOT USE FOR: building your first agent (start with Lesson 01), running agents locally on-device (use local-ai-agents / Lesson 17), Azure infrastructure provisioning unrelated to agents, non-Foundry deployment targets.
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端
jupyter-notebook
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the privacy/cost/offline trade-offs. Based on Lesson 17 of AI Agents for Beginners. USE FOR: run an agent locally, offline agent, on-device agent, Foundry Local, Qwen function calling, local tool calling, local RAG, Chroma vector database, local MCP server, privacy-preserving agent, hybrid local and cloud agent, small language model agent, engineering assistant on my machine. DO NOT USE FOR: deploying agents to the cloud at scale (use deploying-scalable-agents / Lesson 16), building your first agent concept (Lesson 01), Foundry (cloud) hosted agents, GPU cluster / server-side inference provisioning.
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端
microsoft-docs
Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more. Uses Microsoft Learn MCP as the default, with Context7 and Aspire MCP for content that lives outside learn.microsoft.com.
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端
testing-course-samples
Use when asked to validate, test, smoke-test, or run the course's notebook and code samples against a live Microsoft Foundry / Azure OpenAI configuration. Covers environment setup (.env, az login, packages), the scripts/validate-notebooks.ps1 runner, interpreting PASS/FAIL results, and which lessons need extra resources (Azure AI Search, GitHub MCP, Foundry Local, Playwright).
精选 microsoft/ai-agents-for-beginners 7.7 万 原文
Codex CLIMCP 客户端

相似 Skill

更多「编码」
access
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the iMessage channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端