AI Global Academy Join the waitlist

Courses / Bonus: the course with Codex or Qwen Code

Lesson 9.4 · 50 minQwen Code in your course project

Duration~50 min in the lesson + ~25 min homework
PrerequisitesLesson 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.
Checkpointnone (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

Prompt to Claude
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

Prompt to Claude
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.
Prompt to Claude
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.

  1. Pause after Part 2. Install Qwen Code with the command for your system, open a new terminal, and run qwen --version.
  2. Pause after Part 3. Choose a provider and get its key. cd into your project, run qwen, type /auth and connect it.
  3. Pause after Part 4. Accept the trust question. Type /approval-mode and choose default. Create .qwen/settings.json with the approval setting from Part 4.
  4. Pause after Part 5. If AGENTS.md does not exist, create it with the five lines from Part 5. If there is no CLAUDE.md, create the starter from lesson 9.1.
  5. Type /quit, start qwen again, and send the rules question from Part 5.
  6. 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.
  7. Review with /diff, and with git status and git diff in a plain terminal. Reload the page in the browser.
  8. Send the commit prompt from Part 6. Read the command before approving.
  9. Save the command sheet below where you can see it during the course.

Command sheet

In the lesson (Claude Code)CodexQwen Code
claudecodexqwen
Sign inSign in with ChatGPT/auth, then a provider
CLAUDE.mdAGENTS.md pointing to CLAUDE.mdthe same AGENTS.md
/initskipskip (it writes QWEN.md)
Manual mode/permissions → Read Only/approval-mode → default
Plan mode/plan/plan
/diff/diff/diff, plus git diff
—/review/review
/rewindnone, use Git/restore, and Git
claude --continuecodex resume --lastqwen --continue
Skills in .claude/skills/.agents/skills/.qwen/skills/, called with /name
claude mcp addcodex mcp add playwright -- npx -y @playwright/mcp@latestqwen mcp add playwright npx -y @playwright/mcp@latest
SubagentsSubagents/agents

Check your work

  1. Run qwen --version. Expected: a version number.
  2. Start qwen in the project and type /approval-mode. Expected: default is the current mode.
  3. In a new session, ask the rules question. Expected: Qwen Code names CLAUDE.md and quotes a rule from it, without you naming the file.
  4. Run git log --oneline -1. Expected: the commit "Bonus 9.4: Qwen Code set up".
  5. Open the repository on GitHub. Expected: AGENTS.md, CLAUDE.md, .qwen/settings.json and that commit.

Common problems

  • qwen is 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 /auth again 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.json is in the top folder, and review the change with git diff.
  • Qwen Code does not know the rules. → AGENTS.md is 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.md but not CLAUDE.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 loads CLAUDE.md itself.
  • qwen mcp add prints its help instead of adding the server. → There is a -- before npx, 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.md and start a new session.

Homework

About 25 minutes, after the lesson, on your own. Nothing later in the course depends on it.

  1. 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 /diff and git 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.
  2. Undo, two ways. With git status clean, 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 with git restore about-me.html. Deliverable: the restored page. Done when: the page looks as before and git status reports nothing to commit.
  3. A browser for Qwen Code. Exit Qwen Code and run qwen mcp add playwright npx -y @playwright/mcp@latest, then qwen mcp list. Start a local server as in lesson 9.2, start qwen, 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.