feat(cli): add composio init --install-skills for skill installation#2940
feat(cli): add composio init --install-skills for skill installation#2940CryogenicPlanet wants to merge 2 commits intonextfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Skills installation proceeds after failed project initialization
- Modified initInteractiveFlow to return boolean indicating success; installSkillsFlow now only runs when initialization actually completed.
Or push these changes by commenting:
@cursor push fdbe98112e
Preview (fdbe98112e)
diff --git a/ts/packages/cli/src/commands/init.cmd.ts b/ts/packages/cli/src/commands/init.cmd.ts
--- a/ts/packages/cli/src/commands/init.cmd.ts
+++ b/ts/packages/cli/src/commands/init.cmd.ts
@@ -285,9 +285,9 @@
const composioDir = path.join(proc.cwd, constants.PROJECT_COMPOSIO_DIR);
- yield* initInteractiveFlow({ composioDir, noBrowser, yes });
+ const initialized = yield* initInteractiveFlow({ composioDir, noBrowser, yes });
- if (installSkills) {
+ if (initialized && installSkills) {
yield* installSkillsFlow();
}
})
@@ -296,6 +296,7 @@
/**
* Interactive init flow — handles login, project selection, wizard, install.
* Extracted to keep the main command handler under the line limit.
+ * Returns true if initialization succeeded, false if it was skipped due to missing credentials or projects.
*/
const initInteractiveFlow = (params: { composioDir: string; noBrowser: boolean; yes: boolean }) =>
Effect.gen(function* () {
@@ -318,7 +319,7 @@
if (!globalApiKey || !orgIdValue) {
yield* ui.log.warn('No global API key or org ID found. Please try `composio login` first.');
yield* ui.outro('');
- return;
+ return false;
}
const orgProjects = yield* listOrgProjects({
@@ -356,7 +357,7 @@
'Create a project at https://platform.composio.dev, then run `composio init` again.'
);
yield* ui.outro('');
- return;
+ return false;
}
// 3. Select a project
@@ -407,4 +408,5 @@
);
yield* ui.output(makeOutputJson(selected, composioDir));
yield* ui.outro('');
+ return true;
});This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
|
|
||
| if (installSkills) { | ||
| yield* installSkillsFlow(); | ||
| } |
There was a problem hiding this comment.
Skills installation proceeds after failed project initialization
Medium Severity
installSkillsFlow() runs unconditionally after initInteractiveFlow succeeds, but initInteractiveFlow has early-return paths (no credentials, no projects) that call ui.outro('') and return without error. This causes the skills selection prompt and logging to appear after the @clack/prompts closing └ marker, producing a broken UI. More importantly, it offers skill installation even when no project was actually initialized.
Additional Locations (2)
a25c797 to
93c28cc
Compare
f6d6566 to
f12a3f1
Compare
93c28cc to
2865f5b
Compare
f12a3f1 to
48ca40e
Compare
2865f5b to
46d6bc6
Compare
48ca40e to
f241d3e
Compare




Summary
Adds a
--install-skillsflag tocomposio initthat installs Composio agent skills (for Claude Code, etc.) as part of project initialization. Users can choose to install skills locally (in the repo's.claude/skills/) or globally (~/.claude/skills/).Changes
--install-skillsboolean flag toinit.cmd.tsinstallSkillsFlow()that:npx skills add composiohq/skills --path <target>via theCommandRunnerserviceTerminalUI--install-skillsis explicitly passed; defaultcomposio initbehavior is unchangedType of change
How Has This Been Tested?
composio init --install-skillswith both local and global installation targetscomposio initwithout the flag behaves identically to beforeChecklist