本文へスキップ
Skillpedia
一般的なプログラミング40k · #7113

comment-code-generate-a-tutorial

できること

Pythonのスクリプトを、誰にでもわかりやすいプロジェクトに変換するツールです。コードを整理し、一歩ずつの説明を加えて、誰でも使い方を学べる完全なテキストガイドを作成します。

使う場面

  • ✓Pythonのコードがわかりにくいとき。
  • ✓誰かにスクリプトの使い方を教えたいとき。
  • ✓シンプルなコードを、説明の整った完全なプロジェクトにしたいとき。

スキルのリンク

https://github.com/github/awesome-copilot/blob/main/skills/comment-code-generate-a-tutorial/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/github/awesome-copilot/blob/main/skills/comment-code-generate-a-tutorial/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このPythonコードを、説明とガイド付きの初心者向けプロジェクトに変えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIはまずベストプラクティスに従ってコードを改善します。次に、各部分に説明用のコメントを追加します。最後に、プロジェクトの完全なガイドを含むテキストファイル(Markdown)を生成します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial.

  1. Refactor the code

    • Apply standard Python best practices
    • Ensure code follows the PEP 8 style guide
    • Rename unclear variables and functions if needed for clarity
  2. Add comments throughout the code

    • Use a beginner-friendly, instructional tone
    • Explain what each part of the code is doing and why it's important
    • Focus on the logic and reasoning, not just syntax
    • Avoid redundant or superficial comments
  3. Generate a tutorial as a README.md file
    Include the following sections:

    • Project Overview: What the script does and why it's useful
    • Setup Instructions: Prerequisites, dependencies, and how to run the script
    • How It Works: A breakdown of the code logic based on the comments
    • Example Usage: A code snippet showing how to use it
    • Sample Output: (Optional) Include if the script returns visible results
    • Use clear, readable Markdown formatting
よくある質問

「コードをリファクタリングする」とはどういう意味ですか?

動作は変えずに、既存のコードを整理して改善し、よりすっきりと読みやすくすることです。

なぜコメントを追加するのですか?

コメントはコード内のメモで、各部分が何をするのかを説明し、読む人が処理の流れを理解しやすくします。

Markdownのチュートリアルとは何ですか?

シンプルなテキスト形式で書かれたガイドのことです。簡単にWebページや整った文書に変換でき、プロジェクトのREADMEなどに使われます。

詳細

作者による元の説明

Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial.

repo: github/awesome-copilot

人気

GitHubのスター
40k
ランキング
#7113
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル