Skip to content

feat(trae): add TRAE integration#513

Open
quangrau wants to merge 3 commits intoobra:mainfrom
quangrau:feat/trae-installer
Open

feat(trae): add TRAE integration#513
quangrau wants to merge 3 commits intoobra:mainfrom
quangrau:feat/trae-installer

Conversation

@quangrau
Copy link
Copy Markdown

@quangrau quangrau commented Feb 20, 2026

Summary

Add TRAE support by introducing a safe “hub pattern” installer that symlinks each Superpowers skill into ~/.trae/skills/, plus TRAE installation docs consistent with existing Codex/OpenCode patterns.

Motivation and Context

TRAE discovers skills as folders containing SKILL.md, via:

  • Global skills: ~/.trae/skills/
  • Project skills: .trae/skills/ inside a project

This change makes Superpowers skills available to TRAE in a way that:

  • Updates via git pull in the Superpowers clone (no copying)
  • Preserves any existing user skills under ~/.trae/skills/
  • Avoids overwriting user-owned directories/files (only replaces symlinks)

What Changed

  • Added scripts/install-trae.sh:
    • Ensures ~/.trae/skills is a real directory (converts from symlink if needed)
    • Symlinks each ./skills/<name> into ~/.trae/skills/<name>
    • Safe behavior: skips existing non-symlink targets
    • Idempotent: re-running repairs/recreates symlinks without duplicating work
  • Added docs:
    • .trae/INSTALL.md
    • docs/README.trae.md
    • Root README.md updated with a TRAE section

How Has This Been Tested?

  • Ran scripts/install-trae.sh with an isolated temporary HOME:
    • Fresh install: creates ~/.trae/skills and links all repo skills
    • Idempotency: running twice succeeds and results are stable
    • Safety: if a target skill path exists as a real directory/file, installer skips it (no overwrite)
  • Verified link count matches repo SKILL.md skill count.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the https://modelcontextprotocol.io
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

This mirrors the “hub pattern” approach used for other platforms: link each skill directory individually rather than replacing the entire skills folder, so user-owned skills can coexist safely.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive TRAE installation, update, verification, and troubleshooting guides; clarified global vs project-local skill locations, restart requirements, and verification steps.
    • Expanded main README with TRAE setup links and a dedicated TRAE usage guide for integrating Superpowers with TRAE.
  • Chores

    • Added an installation helper to simplify installing, linking, updating, and uninstalling TRAE skills for global or project-local setups.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds TRAE installation docs and a Bash installer that links repository "skills" into either a global (~/.trae) or project-local (.trae) skills directory via symlinks; updates README to reference the new TRAE docs and install instructions.

Changes

Cohort / File(s) Summary
Documentation
​.trae/INSTALL.md, docs/README.trae.md, README.md
Add TRAE installation and troubleshooting docs covering prerequisites, global vs project-local installation, verification, updating, and uninstall steps; README updated to reference TRAE docs and install instructions.
Installer Tooling
scripts/install-trae.sh
Add Bash installer script with --global (default) and --project modes; resolves TRAE_DIR, validates repository skills/, ensures SKILLS_DIR, and creates/removes symlinks per skill with error handling and progress output.

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant Script as scripts/install-trae.sh
  participant Repo as Repository (skills/)
  participant Target as TRAE_DIR (~/.trae or ./.trae)

  User->>Script: run installer (--global / --project)
  Script->>Repo: locate and list skills directory
  Repo-->>Script: return skill subdirectories
  Script->>Target: ensure TRAE_DIR and SKILLS_DIR exist
  Script->>Target: create/remove symlinks for each skill -> `SKILLS_DIR/skill`
  Script-->>User: completion or error messages
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hop through docs and symlink trails,
I nudge your skills into TRAE's veils.
A script that links with careful grace,
Global or local — find your place.
Carrots, commits, and a hoppity pace.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(trae): add TRAE integration' is directly related to the main objective of the PR, which adds TRAE support with an installer script and documentation. The title is concise, specific, and clearly summarizes the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
docs/README.trae.md (1)

58-63: Add bash language specifier to fenced code blocks (lines 58 and 68).

Both blocks contain shell commands but lack a language tag, causing markdownlint MD040 warnings.

📝 Proposed fix
-```
+```bash
 cd ~/.trae/superpowers && git pull
 bash ~/.trae/superpowers/scripts/install-trae.sh

```diff
-```
+```bash
 1. Verify the directory exists: `ls -la ~/.trae/skills`
 ...

Also applies to: 65-71

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/README.trae.md` around lines 58 - 63, The two fenced code blocks in the
"Updating" section and the subsequent example block are missing a language
specifier, causing markdownlint MD040 warnings; update each opening
triple-backtick to include "bash" (i.e., change ``` to ```bash) for the block
containing "cd ~/.trae/superpowers && git pull..." and the block/example around
the steps starting at the later block (lines referenced in the review), ensuring
both fenced blocks are marked as bash so linters detect shell syntax.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.trae/INSTALL.md:
- Around line 28-33: The INSTALL.md example for project-local installation is
incorrect because scripts/install-trae.sh sets TRAE_DIR="$(pwd)/.trae", so
running the installer from ~/.trae/superpowers installs skills into the
superpowers repo; update the example code block to instruct users to cd into
their project first (e.g. cd /path/to/your/project) and run the installer by
path (e.g. bash ~/.trae/superpowers/scripts/install-trae.sh --project) so
TRAE_DIR correctly points at the user's project .trae directory; modify the
example in INSTALL.md accordingly.
- Around line 50-54: The uninstall step currently deletes the entire
~/.trae/skills folder; change it to remove only the symlinks the installer
created so user-owned skill directories are preserved — replace the `rm -rf
~/.trae/skills` instruction with guidance to delete only symbolic links inside
~/.trae/skills (e.g., using a find limited to depth 1 and filtering by type l or
by testing each entry’s target to confirm it points into the superpowers clone)
so only installer-created links are removed and real directories remain intact.

In `@docs/README.trae.md`:
- Around line 38-43: The documented example incorrectly instructs users to cd
into the superpowers clone before running scripts/install-trae.sh --project,
which causes --project to install into the clone’s .trae/skills/ folder; update
the README.trae.md example so the user stays in their target project directory
(e.g., cd /path/to/your/project) and invoke the installer by its path from the
clone (e.g., bash ~/.trae/superpowers/scripts/install-trae.sh --project) so the
--project flag installs into the current project’s .trae/skills/ instead of the
superpowers repo.

In `@README.md`:
- Around line 78-87: Move the entire "### TRAE" section (including the code
block `Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md`
and the "**Detailed docs:** [docs/README.trae.md](docs/README.trae.md)" link) so
it appears immediately before the "### Verify Installation" heading; ensure you
remove the duplicate trailing copy and preserve exact content and formatting of
the "### TRAE" heading, code block, and docs link.

---

Nitpick comments:
In `@docs/README.trae.md`:
- Around line 58-63: The two fenced code blocks in the "Updating" section and
the subsequent example block are missing a language specifier, causing
markdownlint MD040 warnings; update each opening triple-backtick to include
"bash" (i.e., change ``` to ```bash) for the block containing "cd
~/.trae/superpowers && git pull..." and the block/example around the steps
starting at the later block (lines referenced in the review), ensuring both
fenced blocks are marked as bash so linters detect shell syntax.

Comment thread .trae/INSTALL.md
Comment thread .trae/INSTALL.md Outdated
Comment thread docs/README.trae.md
Comment thread README.md
@quangrau quangrau force-pushed the feat/trae-installer branch from a7300bb to b0482a5 Compare February 20, 2026 06:03
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/README.trae.md`:
- Around line 9-11: The fenced code block currently has no language identifier;
update the block delimiter to include the text language identifier by changing
the opening fence from ``` to ```text for the block that contains "Fetch and
follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md"
(ensure the closing ``` remains) so the markdownlint MD040 warning is resolved.

In `@README.md`:
- Around line 75-77: Add the MD language identifier "text" to the fenced code
blocks that contain the plain-text AI prompt lines (the three bare
triple-backtick blocks used for the Codex prompt, the OpenCode prompt, and the
Quick Install/trae prompt) so each starts with ```text instead of just ```,
ensuring the blocks with the prompt "Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md"
and the analogous Codex/OpenCode prompt blocks are updated to silence MD040.

Comment thread docs/README.trae.md Outdated
Comment thread README.md
Comment on lines +75 to +77
```
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add text language identifier to fenced block (MD040).

Same as the Quick Install block in docs/README.trae.md — the content is a plain-text AI prompt. Note that the identical bare-block pattern also exists for the Codex (line 55) and OpenCode (line 65) sections; standardising all three to text would fully silence the MD040 warning across the file.

📝 Proposed fix
-```
+```text
 Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 75-75: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 75 - 77, Add the MD language identifier "text" to the
fenced code blocks that contain the plain-text AI prompt lines (the three bare
triple-backtick blocks used for the Codex prompt, the OpenCode prompt, and the
Quick Install/trae prompt) so each starts with ```text instead of just ```,
ensuring the blocks with the prompt "Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md"
and the analogous Codex/OpenCode prompt blocks are updated to silence MD040.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 80-81: Add a single blank line between the closing markdown code
fence and the "**Detailed docs:** [docs/README.trae.md]" line in README.md so
the TRAE section matches the other sections (insert one empty line after the ```
fence that precedes the "**Detailed docs:** [docs/README.trae.md]" entry).

---

Duplicate comments:
In `@README.md`:
- Around line 78-80: The fenced code block(s) in README.md that contain plain
text (e.g., the block with "Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md"
and the similar blocks in the Codex and OpenCode sections) are missing a
language identifier and trigger MD040; update each triple-backtick fence to
include a plain-text language tag (for example change ``` to ```text) for those
blocks so markdownlint no longer flags them.

Comment thread README.md
@quangrau quangrau marked this pull request as draft February 20, 2026 06:15
@quangrau quangrau force-pushed the feat/trae-installer branch 2 times, most recently from 79355c8 to f2f95b0 Compare February 20, 2026 06:28
@quangrau quangrau force-pushed the feat/trae-installer branch from f2f95b0 to 6300032 Compare February 20, 2026 06:46
@quangrau quangrau marked this pull request as ready for review February 20, 2026 06:51
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@docs/README.trae.md`:
- Around line 22-26: Update the README step so the parent directory is created
before cloning: insert a command to create the target parent directory (e.g.,
run mkdir -p ~/.trae) immediately before the git clone line so that git clone
https://github.com/obra/superpowers.git ~/.trae/superpowers succeeds on fresh
environments where ~/.trae doesn't exist.

---

Duplicate comments:
In `@README.md`:
- Around line 78-80: The fenced code block containing the line "Fetch and follow
instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.trae/INSTALL.md"
is missing a language identifier; update that triple-backtick block to include a
language token (use "text" to match the Cursor section) so the block becomes
```text ... ```, which will satisfy markdownlint MD040 and silence the warning.

Comment thread docs/README.trae.md
Comment on lines +22 to +26
1. Clone the repo:

```bash
git clone https://github.com/obra/superpowers.git ~/.trae/superpowers
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

git clone will fail if ~/.trae doesn't exist yet.

git clone creates the final path component (superpowers) but not intermediate parent directories. On a fresh TRAE environment where ~/.trae has never been created, step 1 will error with fatal: cannot mkdir '…/superpowers': No such file or directory.

📝 Proposed fix: create parent before cloning
 1. Clone the repo:
 
    ```bash
+   mkdir -p ~/.trae
    git clone https://github.com/obra/superpowers.git ~/.trae/superpowers
    ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/README.trae.md` around lines 22 - 26, Update the README step so the
parent directory is created before cloning: insert a command to create the
target parent directory (e.g., run mkdir -p ~/.trae) immediately before the git
clone line so that git clone https://github.com/obra/superpowers.git
~/.trae/superpowers succeeds on fresh environments where ~/.trae doesn't exist.

@obra
Copy link
Copy Markdown
Owner

obra commented Feb 21, 2026

Is there a way to do this without symlinking each skill? That's gonna be a nightmare for updates.

@obra obra added new-harness Requests for harnesses with few existing items trae TRAE IDE integration labels Feb 21, 2026
@quangrau
Copy link
Copy Markdown
Author

Is there a way to do this without symlinking each skill? That's gonna be a nightmare for updates.

Thanks for the review!

TRAE only discovers top-level skill folders under ~/.trae/skills/ — no nested lookup. So individual symlinks are the only way without taking over the whole directory.

The installer is idempotent though, so updates are just

git pull && bash install-trae.sh

I updated the README to clarify this.

@quangrau
Copy link
Copy Markdown
Author

@obra , ready for another round of review. Thanks!

@obra obra added the enhancement New feature or request label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new-harness Requests for harnesses with few existing items trae TRAE IDE integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants