Conversation
- Add qwen-extension.json manifest for 'qwen extensions install' - Add QWEN.md context file for auto-activating using-superpowers skill - Update docs/README.qwen.md with extension install as primary method - Update README.md with one-liner install command - Existing .md commands already work natively (Qwen uses same format) - Note: Qwen Code can also auto-convert gemini-extension.json
📝 WalkthroughWalkthroughAdds the Superpowers integration for Qwen Code CLI: installer script and docs that symlink repository skills into a local hub (~/.qwen/skills), idempotently inject a Superpowers context block into Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Installer as .qwen/install.sh
participant Repo as Repo (skills/)
participant Hub as Filesystem (~/.qwen/skills)
participant QWEN as QWEN.md
User->>Installer: run installer
Installer->>Repo: enumerate skills dir
loop per-skill
Installer->>Hub: create symlink (or convert & copy)
end
Installer->>QWEN: remove old context block
Installer->>QWEN: append Superpowers context block
Installer->>User: print completion and next steps
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add .qwen/install.sh with hub pattern (individual skill symlinks) - Add .qwen/INSTALL.md matching Codex/OpenCode install doc pattern - Add idempotent context injection into ~/.qwen/QWEN.md with markers - Add terminology mapping (Claude Code tools → Qwen equivalents) - Update QWEN.md to include tool mapping (drop mandatory language) - Update README.md to use fetch-and-follow install pattern - Update docs/README.qwen.md with full tool mapping table Addresses gaps identified in obra#128: - GEMINI.md/QWEN.md advisory-not-executable finding - Missing tool terminology translation - Missing install script (was extension-only) - Single directory symlink → hub pattern
There was a problem hiding this comment.
Pull request overview
This PR adds native Qwen Code CLI support following patterns established for Codex and OpenCode installers. Based on learnings from issue #128 (which found that context files are advisory, not executable in similar CLIs), this implementation uses an install script with individual skill symlinks (hub pattern) plus context injection with tool mappings.
Changes:
- Adds
.qwen/install.shscript that symlinks each skill individually into~/.qwen/skills/and injects context with tool mappings into~/.qwen/QWEN.md - Includes comprehensive installation documentation following the fetch-and-follow pattern used by Codex and OpenCode
- Provides both install script approach (recommended) and extension manifest approach (alternative) for flexibility
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
qwen-extension.json |
Extension manifest for alternative qwen extensions install path |
QWEN.md |
Context file with simplified tool mappings for extension-based install |
.qwen/install.sh |
Installation script implementing hub pattern (individual skill symlinks) with idempotent context injection |
.qwen/INSTALL.md |
Installation guide following fetch-and-follow pattern, includes tool mapping documentation |
docs/README.qwen.md |
Comprehensive documentation covering installation, usage, tool mappings, troubleshooting, and uninstallation |
README.md |
Added Qwen section with fetch-and-follow install instructions consistent with Codex/OpenCode |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
docs/README.qwen.md (2)
63-65:Bashnaming here is more accurate — consider standardising across all files.This table correctly uses the actual Claude Code tool name (
Bash), but.qwen/INSTALL.md(line 90),QWEN.md(line 15), and theinstall.shinjected context block (line 78) all use the informalShelllabel. Users cross-referencing the files may be confused by the mismatch. Standardising onBash(the real tool name) across all four documents would be cleaner.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/README.qwen.md` around lines 63 - 65, The README table uses the tool label `Bash` while other docs use `Shell`, causing inconsistency; update all occurrences of the informal label to the canonical tool name `Bash` so the mapping entries remain consistent (e.g., change any `Shell` labels that map to `run_shell_command` in .qwen/INSTALL.md, QWEN.md, and the install.sh context block to `Bash`), and verify the table rows (`Search`→`search_file_content`, `Glob`→`glob`, `Bash`→`run_shell_command`) are identical across documents.
9-11: Consider addingtextlanguage specifier for consistency with the SA tooling.The "Tell Qwen" fetch instruction block at line 9 has no language specifier — identical to the pattern the SA tool correctly flags in
.qwen/INSTALL.md. While the tool didn't warn here, addingtextaligns with MD040 and makes intent explicit.♻️ Proposed fix
-``` +```text Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.qwen/INSTALL.md</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/README.qwen.mdaround lines 9 - 11, The fenced code block containing
the fetch instruction ("" followed by the URL line Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.qwen/INSTALL.md "") should include the language specifier text (i.e., change the opening
fence to "text") so the block is explicitly marked as plain text and conforms to the MD040/SA tooling expectation; update that specific fenced block in the README.qwen content to begin withtext and keep the URL line unchanged.</details> </blockquote></details> <details> <summary>.qwen/install.sh (1)</summary><blockquote> `36-53`: **Symlink targets include a trailing `/` — strip it for cleaner links.** Because the glob `"$REPO_SKILLS_DIR"/*/` captures a trailing slash, `$skill_path` resolves to something like `/path/to/skills/brainstorming/`. The `ln -s` call embeds that slash in the stored symlink target, which is valid but non-standard (`ls -la` will show the trailing slash in the target path). `basename` already strips it for `$skill_name`, so a matching strip for `$skill_path` keeps things tidy. <details> <summary>♻️ Proposed fix</summary> ```diff skill_name=$(basename "$skill_path") + skill_path="${skill_path%/}" target_path="$SKILLS_DIR/$skill_name" ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In @.qwen/install.sh around lines 36 - 53, The symlink target currently includes a trailing slash because the glob "$REPO_SKILLS_DIR"/*/ yields paths ending with '/', so when creating the link with ln -s "$skill_path" "$target_path" the stored target contains that slash; strip the trailing slash from the source path before linking (e.g., use parameter expansion to set a variable like skill_src="${skill_path%/}" and use that for ln -s) while keeping existing variables skill_path, skill_name and target_path and preserving the existing checks for existing files/links. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.qwen/INSTALL.md:
- Around line 61-63: The plain fenced code blocks containing the Qwen prompts
(for example the blocks with "/skills", "use the brainstorming skill", and "help
me plan this feature using the writing-plans skill") should include a language
specifier to silence markdownlint MD040 and clarify intent; update each
triple-backtick fence to start withtext (orplaintext) so the blocks read
as text fenced code blocks rather than unspecified code blocks.In @.qwen/install.sh:
- Around line 98-102: The current awk command (awk 'NF{p=1} p') removes leading
blank lines rather than trailing, causing extra blank lines to accumulate before
appending CONTEXT_BLOCK; replace the awk trimming+mv step with a portable
trailing-blank-line trimmer (e.g., a sed loop that deletes only trailing empty
lines) applied to "$QWEN_MD", and then append CONTEXT_BLOCK using a controlled
echo/printf that ensures exactly one blank line separation (update the section
around the awk line and the echo -e "\n\n$CONTEXT_BLOCK" >> "$QWEN_MD" to use
the new sed-based trim and a single newline when appending).
Nitpick comments:
In @.qwen/install.sh:
- Around line 36-53: The symlink target currently includes a trailing slash
because the glob "$REPO_SKILLS_DIR"/*/ yields paths ending with '/', so when
creating the link with ln -s "$skill_path" "$target_path" the stored target
contains that slash; strip the trailing slash from the source path before
linking (e.g., use parameter expansion to set a variable like
skill_src="${skill_path%/}" and use that for ln -s) while keeping existing
variables skill_path, skill_name and target_path and preserving the existing
checks for existing files/links.In
@docs/README.qwen.md:
- Around line 63-65: The README table uses the tool label
Bashwhile other
docs useShell, causing inconsistency; update all occurrences of the informal
label to the canonical tool nameBashso the mapping entries remain consistent
(e.g., change anyShelllabels that map torun_shell_commandin
.qwen/INSTALL.md, QWEN.md, and the install.sh context block toBash), and
verify the table rows (Search→search_file_content,Glob→glob,
Bash→run_shell_command) are identical across documents.- Around line 9-11: The fenced code block containing the fetch instruction
("" followed by the URL line Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.qwen/INSTALL.md "") should include the language specifier text (i.e., change the opening
fence to "text") so the block is explicitly marked as plain text and conforms to the MD040/SA tooling expectation; update that specific fenced block in the README.qwen content to begin withtext and keep the URL line unchanged.</details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
- docs/README.qwen.md: standardize tool naming (Bash → Shell) - docs/README.qwen.md: add text language specifier to code blocks - .qwen/install.sh: strip trailing slash in symlink targets - .qwen/install.sh: move symlink check before mkdir calls - .qwen/install.sh: use defensive awk for empty files - .qwen/INSTALL.md: add text language specifiers to Qwen prompts - README.md: link to docs/README.qwen.md for consistency Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 58-60: The fenced code block that currently contains the
natural-language prompt/URL should include the Markdown language specifier
"text" to satisfy MD040; update the fenced block in README.md (the block
containing "Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.qwen/INSTALL.md")
to use ```text as the opening fence so it matches the equivalent blocks in
.qwen/INSTALL.md.
|
@claude code review please |
Satisfies MD040 by adding text language specifier to fenced code blocks containing natural-language install prompts for Qwen, Codex, and OpenCode. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
29-29:⚠️ Potential issue | 🟡 MinorUpdate the "Note" to include Qwen Code CLI.
Line 29 currently lists only Codex and OpenCode as requiring manual setup, but the newly added Qwen Code CLI section follows the same manual fetch-and-follow pattern.
📝 Proposed fix
-**Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex and OpenCode require manual setup. +**Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex, OpenCode, and Qwen Code CLI require manual setup.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` at line 29, The "Note" mentioning installation differences currently states "Codex and OpenCode require manual setup" but omits Qwen Code CLI; update that Note (the line containing "**Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex and OpenCode require manual setup.") to also mention Qwen Code CLI so it reads that Codex, OpenCode, and Qwen Code CLI require manual setup or otherwise include Qwen Code CLI in the list of tools requiring manual fetch-and-follow installation instructions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@README.md`:
- Line 29: The "Note" mentioning installation differences currently states
"Codex and OpenCode require manual setup" but omits Qwen Code CLI; update that
Note (the line containing "**Note:** Installation differs by platform. Claude
Code or Cursor have built-in plugin marketplaces. Codex and OpenCode require
manual setup.") to also mention Qwen Code CLI so it reads that Codex, OpenCode,
and Qwen Code CLI require manual setup or otherwise include Qwen Code CLI in the
list of tools requiring manual fetch-and-follow installation instructions.
Updates installation note to mention that Qwen Code CLI, like Codex and OpenCode, requires manual fetch-and-follow setup. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **"Skill" tool** → Read the file at `~/.qwen/skills/<skill-name>/SKILL.md` | ||
| - **"TodoWrite"** → Write/update a plan file (e.g., `plan.md`) | ||
| - File operations → `read_file`, `write_file`, `replace` | ||
| - Search → `search_file_content`, `glob` |
There was a problem hiding this comment.
QWEN.md’s tool mapping omits web_fetch, but both the installer-injected context block and the Qwen docs include it. Consider adding WebFetch → web_fetch here too so the extension-based install path has the same mapping coverage.
| - Search → `search_file_content`, `glob` | |
| - Search → `search_file_content`, `glob` | |
| - **"WebFetch"** → `web_fetch` |
| if [ -e "$target_path" ] || [ -L "$target_path" ]; then | ||
| if [ -L "$target_path" ]; then | ||
| rm "$target_path" | ||
| else | ||
| echo " ⚠ $target_path exists and is not a symlink. Skipping." | ||
| continue | ||
| fi | ||
| fi |
There was a problem hiding this comment.
The installer removes any existing symlink at ~/.qwen/skills/<skill> and replaces it, even if the user created that symlink for their own skill source. This can unexpectedly override user-managed skills and contradicts the “coexists safely”/hub-pattern goal. Consider only replacing symlinks that already point into this repo’s skills/ directory (e.g., compare readlink target prefix), and otherwise leave the user’s symlink in place with a clear message.
| echo "Injecting Superpowers context into $QWEN_MD..." | ||
| fi | ||
|
|
||
| # Trim trailing blank lines (defensive: ensures output even for empty files) |
There was a problem hiding this comment.
The comment says “Trim trailing blank lines”, but the current awk program actually drops leading blank lines (it starts printing only after the first non-empty line) and keeps trailing blank lines. Either update the comment to match the behavior, or adjust the awk/sed logic to actually remove trailing blank lines before appending the context block.
| # Trim trailing blank lines (defensive: ensures output even for empty files) | |
| # Trim leading blank lines (defensive: ensures output even for empty files) |
| ## Terminology Mapping | ||
| The skills were originally written for Claude Code. Interpret as follows: | ||
| - **"Claude"** or **"Claude Code"** → **"Qwen"** (You). | ||
| - **"Task" tool** → Sequential execution. Perform tasks sequentially yourself. | ||
| - **"Skill" tool** → ReadFile. To invoke a skill, read `~/.qwen/skills/<skill-name>/SKILL.md`. | ||
| - **"TodoWrite"** → Write/update a plan file (e.g., `plan.md`). | ||
| - File operations → your native tools (`read_file`, `write_file`, `replace`, etc.) | ||
| - Search → `search_file_content` or `glob` | ||
| - Shell → `run_shell_command` |
There was a problem hiding this comment.
The injected terminology mapping refers to a ReadFile tool name, but elsewhere in this PR (QWEN.md and docs) the tool is called read_file. Using inconsistent tool names in the injected block can confuse the CLI/model. Suggest standardizing the injected mapping to the same read_file naming used in the docs/context file.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Line 29: Update the note sentence that currently reads "Codex, OpenCode, and
Qwen Code CLI" so its item order matches the README section order below (which
lists "Qwen Code CLI" first, then "Codex", then "OpenCode"); locate the note
string in README.md and reorder the three names to "Qwen Code CLI, Codex, and
OpenCode" (or alternatively reorder the sections to match the original note) so
the note and section headings are consistent.
| ## Installation | ||
|
|
||
| **Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex and OpenCode require manual setup. | ||
| **Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex, OpenCode, and Qwen Code CLI require manual setup. |
There was a problem hiding this comment.
Note ordering doesn't match section ordering.
Line 29 reads "Codex, OpenCode, and Qwen Code CLI", but the sections below appear in the opposite order: Qwen Code CLI (first), then Codex, then OpenCode. Aligning the note to the section sequence avoids reader confusion.
📝 Proposed fix
-**Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex, OpenCode, and Qwen Code CLI require manual setup.
+**Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Qwen Code CLI, Codex, and OpenCode require manual setup.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| **Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Codex, OpenCode, and Qwen Code CLI require manual setup. | |
| **Note:** Installation differs by platform. Claude Code or Cursor have built-in plugin marketplaces. Qwen Code CLI, Codex, and OpenCode require manual setup. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 29, Update the note sentence that currently reads "Codex,
OpenCode, and Qwen Code CLI" so its item order matches the README section order
below (which lists "Qwen Code CLI" first, then "Codex", then "OpenCode"); locate
the note string in README.md and reorder the three names to "Qwen Code CLI,
Codex, and OpenCode" (or alternatively reorder the sections to match the
original note) so the note and section headings are consistent.
Summary
Adds native Qwen Code CLI support following the same patterns as Codex and OpenCode
installers, incorporating findings from #128.
Context
Issue #128 documented that context files (GEMINI.md/QWEN.md) are advisory, not
executable — the model ignores mandatory instructions in them. The community
converged on: install script + individual skill symlinks (hub pattern) + context
injection with tool mappings. This PR follows that pattern, matching
.codex/INSTALL.mdand.opencode/INSTALL.md.Changes
.qwen/install.sh— Install script that:~/.qwen/skills/(hub pattern, coexistswith user skills)
~/.qwen/QWEN.mdwith idempotent markers(
<!-- SUPERPOWERS-CONTEXT-START/END -->).qwen/INSTALL.md— Installation guide (fetch-and-follow pattern, matchingCodex/OpenCode)
QWEN.md— Context file with tool mapping (no mandatory language)qwen-extension.json— Extension manifest (alternative install path)docs/README.qwen.md— Full docs: tool mapping table, usage, updating,uninstalling, troubleshooting
README.md— Added Qwen section using fetch-and-follow install patternHow to Test