Skip to content

[REF-1455]fix: Add missing body parameter to skill publish endpoint#2228

Open
alchemistklk wants to merge 1 commit intomainfrom
fix/skill-publish-body
Open

[REF-1455]fix: Add missing body parameter to skill publish endpoint#2228
alchemistklk wants to merge 1 commit intomainfrom
fix/skill-publish-body

Conversation

@alchemistklk
Copy link
Contributor

@alchemistklk alchemistklk commented Feb 5, 2026

Problem Description

The skill publish API Controller was not accepting the skillContent parameter from the request body, causing:

  1. ❌ CLI's skillContent was ignored
  2. ❌ SKILL.md metadata could not be updated in the database
  3. ❌ GitHub PR used placeholder workflowId: see-workflow-mapping
  4. ❌ All CLI publish operations affected (since 2026-01-22)

Fix Details

Modified Files

  • apps/api/src/modules/skill-package/skill-package.controller.ts

Changes

  1. ✅ Add PublishSkillDto to imports
  2. ✅ Add @Body() body?: PublishSkillDto parameter
  3. ✅ Pass body to publishSkillPackage() service method
+ import PublishSkillDto from './skill-package.dto'

  @Post(':skillId/publish')
  async publishSkill(
    @Req() req: any,
    @Param('skillId') skillId: string,
+   @Body() body?: PublishSkillDto,
  ): Promise<SkillPackageResponse> {
-   return this.skillPackageService.publishSkillPackage(req.user, skillId);
+   return this.skillPackageService.publishSkillPackage(req.user, skillId, body);
  }

Impact

Before Fix

CLI → Controller (ignores body) → Service (receives undefined)
                                      ↓
                                Uses placeholder ❌

After Fix

CLI → Controller (receives body) → Service (receives skillContent)
                                      ↓
                                Updates DB metadata ✅
                                GitHub PR has correct workflowId ✅

Scope

  • ✅ All skill publish operations via CLI
  • ✅ Metadata now syncs correctly: name, description, triggers, tags, version
  • ✅ GitHub registry contains correct workflowId

Testing

  • ✅ TypeScript compilation passes
  • ✅ Lint checks pass
  • ✅ Code logic verified
  • ✅ Service processing logic confirmed

Related Issue

Fixes bug introduced in commit afc49fed4 (2026-01-22), which created the publish endpoint but missed the body parameter.


Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Summary by CodeRabbit

  • New Features
    • The skill publishing endpoint now supports optional configuration parameters for enhanced publishing capabilities.

The publish endpoint was ignoring the skillContent sent by CLI because
the controller wasn't accepting or passing the request body to the service.

This caused:
- CLI's skillContent with workflowId to be discarded
- Service to fall back to generating SKILL.md with placeholder 'see-workflow-mapping'
- GitHub PRs to have incorrect workflowId
- Metadata updates from SKILL.md to be skipped

Changes:
- Add PublishSkillDto to controller imports
- Add @Body() parameter to publishSkill method
- Pass body to skillPackageService.publishSkillPackage()

Now when CLI sends { skillContent }, it will be properly received and used
to update skill metadata and create GitHub PRs with correct workflowId.

Fixes: All CLI skill publish operations since 2026-01-22 (commit afc49fe)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

A PublishSkillDto parameter was added as an optional argument to the publishSkill endpoint in the skill-package controller, forwarding it to the service layer. The PublishSkillDto type was also exported from the skill-package.dto module.

Changes

Cohort / File(s) Summary
Skill Package Endpoint Enhancement
apps/api/src/modules/skill-package/skill-package.controller.ts
Added optional PublishSkillDto parameter to publishSkill endpoint and updated the service call to forward the parameter. Exported PublishSkillDto from the dto module for external use.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • nettee
  • CH1111

Poem

🐰 A parameter springs forth, optional and light,
The endpoint now flexible, more dynamically bright!
With PublishSkillDto exported with care,
The service receives what the client does share. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a missing body parameter to the skill publish endpoint.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/skill-publish-body

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.

@alchemistklk alchemistklk changed the title fix: Add missing body parameter to skill publish endpoint [REF-1455]fix: Add missing body parameter to skill publish endpoint Feb 5, 2026
@linear
Copy link

linear bot commented Feb 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant