# Comment code generate a tutorial

> Comment code generate a tutorial is an open-source agent skill for developer tools. Turns a Python script into a beginner-friendly project with comments and a README tutorial. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/github/awesome-copilot/tree/main/skills/comment-code-generate-a-tutorial
- **Repository:** https://github.com/github/awesome-copilot
- **GitHub stars:** 41,707
- **License:** MIT
- **Skill name:** comment-code-generate-a-tutorial
- **Collection:** https://github.com/github/awesome-copilot
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-30

## About

This skill asks the agent to take an existing Python script and make it easier for newcomers to read and run. The agent refactors the code toward standard Python practices and PEP 8 style, renames unclear variables and functions where needed, and adds explanatory comments that focus on the reasoning behind each part rather than restating syntax.

Alongside the code changes, the agent writes a README.md tutorial. The guide is organized into sections covering a project overview, setup instructions with prerequisites and dependencies, a walkthrough of the code logic drawn from the comments, example usage, and an optional sample output section when the script produces visible results.

The skill is a single SKILL.md with no bundled scripts or reference files. It expects a Python script to be supplied in the conversation or workspace for the agent to work on.

## When your agent uses it

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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/github/awesome-copilot/tree/HEAD/skills/comment-code-generate-a-tutorial)
- [License: MIT](https://github.com/github/awesome-copilot/tree/HEAD/skills/comment-code-generate-a-tutorial)

## Features

- **Code refactoring:** Restructures a Python script following common best practices and PEP 8 style guidance.
- **Instructional comments:** Adds beginner-oriented comments that explain the logic and purpose of each section.
- **Variable renaming:** Renames unclear variables and functions so the code reads more naturally.
- **Markdown tutorial:** Generates a README.md guide covering overview, setup, logic and example usage.
- **Setup documentation:** Describes prerequisites, dependencies and how to run the script.
- **Sample output section:** Optionally includes example output when the script returns visible results.

## Good for

- Make a messy Python script readable for beginners
- Add explanatory comments to an existing Python file
- Write a README tutorial for a small Python project
- Document how to set up and run a Python script
- Refactor a Python script to follow PEP 8

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/comment-code-generate-a-tutorial` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/comment-code-generate-a-tutorial &&
cp -R "$tmp/skills/comment-code-generate-a-tutorial" ~/.claude/skills/comment-code-generate-a-tutorial &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/comment-code-generate-a-tutorial` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/comment-code-generate-a-tutorial` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/comment-code-generate-a-tutorial &&
cp -R "$tmp/skills/comment-code-generate-a-tutorial" ~/.agents/skills/comment-code-generate-a-tutorial &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/comment-code-generate-a-tutorial` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/comment-code-generate-a-tutorial` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/comment-code-generate-a-tutorial &&
cp -R "$tmp/skills/comment-code-generate-a-tutorial" ~/.cursor/skills/comment-code-generate-a-tutorial &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/comment-code-generate-a-tutorial` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/github/awesome-copilot.git --path skills/comment-code-generate-a-tutorial
```

Or copy the folder to `~/.gemini/skills/comment-code-generate-a-tutorial` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/comment-code-generate-a-tutorial`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/comment-code-generate-a-tutorial &&
cp -R "$tmp/skills/comment-code-generate-a-tutorial" ~/.copilot/skills/comment-code-generate-a-tutorial &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/comment-code-generate-a-tutorial` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/github/awesome-copilot.git
```

Then copy `awesome-copilot/skills/comment-code-generate-a-tutorial` into your agent's skills folder as `comment-code-generate-a-tutorial`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Comment code generate a tutorial need as input?

It is written to work on a Python script, which the user supplies for the agent to transform.

### What files does Comment code generate a tutorial add to a project?

The instructions ask the agent to produce a README.md tutorial alongside the refactored and commented code.

### Does Comment code generate a tutorial include scripts or tools of its own?

No. The folder contains only the SKILL.md instructions with no bundled scripts.

### How do I install Comment code generate a tutorial in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/comment-code-generate-a-tutorial to use it in all your projects, or to .claude/skills/comment-code-generate-a-tutorial in one project.

### Does Comment code generate a tutorial run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Comment code generate a tutorial?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Comment code generate a tutorial?

The closest alternatives to Comment code generate a tutorial are Add educational comments, Code review, Lean comments, Code simplifier and Create readme.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Add educational comments](https://ai-powered.com/skills/add-educational-comments): Add educational comments is an open-source agent skill for developer tools.
- [Code review](https://ai-powered.com/skills/code-review-flutter): Code review is an open-source agent skill for developer tools.
- [Lean comments](https://ai-powered.com/skills/lean-comments): Lean comments is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Create readme](https://ai-powered.com/skills/create-readme): Create readme is an open-source agent skill for developer tools.
- [Review and refactor](https://ai-powered.com/skills/review-and-refactor): Review and refactor is an open-source agent skill for developer tools.
- [Mentoring juniors](https://ai-powered.com/skills/mentoring-juniors): Mentoring juniors is an open-source agent skill for developer tools.
- [Refactor](https://ai-powered.com/skills/refactor): Refactor is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/comment-code-generate-a-tutorial
