| Duration | ~50 min in the lesson + ~25 min homework |
| Prerequisites | Lesson 0.2 without the Claude Code install and sign-in (terminal, Git, Node.js, code editor and the four accounts are still needed); lesson 0.4 — the project folder is a Git repository on GitHub; a paid model provider for Qwen Code: an Alibaba Cloud Coding Plan, or an API key from a provider Qwen Code supports (for example OpenRouter) with billing. |
| Checkpoint | none (the lesson ends with a commit and push, no tag) |
What you will have
Qwen Code is installed and connected to a model provider, runs in the course project in a mode where it asks before every edit, and reads the project rules through the same AGENTS.md that points to CLAUDE.md. The student has made one change with Qwen Code, reviewed it and committed it, and knows the Qwen Code command for each Claude Code feature the course uses, so lessons 9.2 and 9.3 apply to Qwen Code as well as to Codex.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 5 — Project memory: the same file for every agent
I want to check that you know this project's rules before we work. Without me naming any file: tell me which file holds the rules for this project, and quote the rules in it. Done means I can compare your answer with the file. Do not change anything.
Part 6 — First change, review, commit
I want visitors to see when they can reach us. In about-me.html, add one line to the Contact section, under the email line: "Opening hours: Monday to Friday, 8:00–18:00". Done means the new line shows in the Contact section and looks like the email line. Constraints: edit only about-me.html, keep everything else as it is, and do not commit. I will review the change first.
I have reviewed the change and I accept it. Commit about-me.html, AGENTS.md, CLAUDE.md and .qwen/settings.json with the message "Bonus 9.4: Qwen Code set up", then push. Done means git status shows nothing left to commit and the push succeeded. Commit only those files.
Do along
Do these steps on your own project, pausing the video where a step says so.
- Pause after Part 2. Install Qwen Code with the command for your system, open a new terminal, and run
qwen --version. - Pause after Part 3. Choose a provider and get its key.
cdinto your project, runqwen, type/authand connect it. - Pause after Part 4. Accept the trust question. Type
/approval-modeand choose default. Create.qwen/settings.jsonwith the approval setting from Part 4. - Pause after Part 5. If
AGENTS.mddoes not exist, create it with the five lines from Part 5. If there is noCLAUDE.md, create the starter from lesson 9.1. - Type
/quit, startqwenagain, and send the rules question from Part 5. - Pause after Part 6. Send the change prompt from Part 6. Adapt: a one-line change that is true for your business. Read the approval prompt, then approve once.
- Review with
/diff, and withgit statusandgit diffin a plain terminal. Reload the page in the browser. - Send the commit prompt from Part 6. Read the command before approving.
- Save the command sheet below where you can see it during the course.
Command sheet
| In the lesson (Claude Code) | Codex | Qwen Code |
|---|---|---|
claude | codex | qwen |
| Sign in | Sign in with ChatGPT | /auth, then a provider |
CLAUDE.md | AGENTS.md pointing to CLAUDE.md | the same AGENTS.md |
/init | skip | skip (it writes QWEN.md) |
| Manual mode | /permissions → Read Only | /approval-mode → default |
| Plan mode | /plan | /plan |
/diff | /diff | /diff, plus git diff |
| — | /review | /review |
/rewind | none, use Git | /restore, and Git |
claude --continue | codex resume --last | qwen --continue |
Skills in .claude/skills/ | .agents/skills/ | .qwen/skills/, called with /name |
claude mcp add | codex mcp add playwright -- npx -y @playwright/mcp@latest | qwen mcp add playwright npx -y @playwright/mcp@latest |
| Subagents | Subagents | /agents |
Check your work
- Run
qwen --version. Expected: a version number. - Start
qwenin the project and type/approval-mode. Expected: default is the current mode. - In a new session, ask the rules question. Expected: Qwen Code names
CLAUDE.mdand quotes a rule from it, without you naming the file. - Run
git log --oneline -1. Expected: the commit "Bonus 9.4: Qwen Code set up". - Open the repository on GitHub. Expected:
AGENTS.md,CLAUDE.md,.qwen/settings.jsonand that commit.
Common problems
qwenis not found after installing. → The terminal was open during the install. → Open a new window. If it is still missing, install with npm:npm install -g @qwen-code/qwen-code@latest.- Every request fails after sign-in. → No working provider: an expired key, no billing, or the old free sign-in, which no longer works. → Run
/authagain and connect a paid provider. - Qwen Code edited a file without asking. → The session is in Auto or Auto-edit. → Type
/approval-mode, choose default, check that.qwen/settings.jsonis in the top folder, and review the change withgit diff. - Qwen Code does not know the rules. →
AGENTS.mdis misnamed, not in the top folder, or was created after the session started. → Fix the name and place, then start a new session. - Qwen Code reads
AGENTS.mdbut notCLAUDE.md. → It did not follow the pointer. → Start the session with "Read CLAUDE.md first." Or add"context": { "fileName": ["QWEN.md", "AGENTS.md", "CLAUDE.md"] }to.qwen/settings.json; Qwen Code then loadsCLAUDE.mditself. qwen mcp addprints its help instead of adding the server. → There is a--beforenpx, as in the Codex command. → Remove it.- A skill you created is not offered. → It is in
.claude/skills/. → Move it to.qwen/skills/<name>/SKILL.mdand start a new session.
Homework
About 25 minutes, after the lesson, on your own. Nothing later in the course depends on it.
- The plan loop in Qwen Code. Pick one more small addition your page needs. Write the four-part brief yourself and send it after
/plan. Change the plan once, approve it, then review with/diffandgit diff. Ask Qwen Code to commit and push, without a tag. Deliverable: the commit. Done when: the addition shows on the page and you can say which item of the plan was yours. - Undo, two ways. With
git statusclean, ask for a change you do not want, such as a red main heading, and approve it. Undo it once with/restore, then make it again and undo it withgit restore about-me.html. Deliverable: the restored page. Done when: the page looks as before andgit statusreports nothing to commit. - A browser for Qwen Code. Exit Qwen Code and run
qwen mcp add playwright npx -y @playwright/mcp@latest, thenqwen mcp list. Start a local server as in lesson 9.2, startqwen, and ask it to open your page and describe it. Deliverable: the description. Done when: Qwen Code reports on the page from a real browser session.