Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/commands/skill/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export { installSkill } from "./install"
export { publishSkill } from "./publish"
export { deleteReview, listReviews, submitReview, voteReview } from "./review"
export { searchSkills } from "./search"
export { viewSkill } from "./view"
export { voteSkill } from "./vote"
238 changes: 0 additions & 238 deletions src/commands/skill/review.ts

This file was deleted.

35 changes: 0 additions & 35 deletions src/commands/skill/vote.ts

This file was deleted.

108 changes: 0 additions & 108 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,114 +1015,6 @@ skillCmd
})
})

// Skill voting (verbs instead of flags)
skillCmd
.command("upvote <skill>")
.description("Upvote a skill")
.action(async (skill) => {
const { voteSkill } = await import("./commands/skill")
await voteSkill(skill, "up")
})

skillCmd
.command("downvote <skill>")
.description("Downvote a skill")
.action(async (skill) => {
const { voteSkill } = await import("./commands/skill")
await voteSkill(skill, "down")
})

// skill review subcommand
const skillReview = skillCmd
.command("review")
.description("Manage skill reviews")

skillReview
.command("list <skill>")
.description("List reviews for a skill")

.option("--limit <number>", "Number of reviews to show", "10")
.option("--page <number>", "Page number", "1")
.action(async (skill, options) => {
const { listReviews } = await import("./commands/skill")
await listReviews(skill, {
limit: Number.parseInt(options.limit, 10),
page: Number.parseInt(options.page, 10),
})
})

skillReview
.command("add <skill>")
.description("Add a review for a skill")
.option("-b, --body <text>", "Review text (required)")
.option("-m, --model <name>", "Agent model used (e.g., claude-3.5-sonnet)")
.option("--up", "Upvote the skill")
.option("--down", "Downvote the skill")
.action(async (skill, options) => {
if (!options.body) {
console.error(pc.red("Error: --body is required"))
console.error(
pc.dim(
'Usage: smithery skill review add <skill> --up|--down -b "review text"',
),
)
process.exit(1)
}
if (!options.up && !options.down) {
console.error(pc.red("Error: --up or --down is required"))
console.error(
pc.dim(
'Usage: smithery skill review add <skill> --up|--down -b "review text"',
),
)
process.exit(1)
}
if (options.up && options.down) {
console.error(pc.red("Error: Cannot specify both --up and --down"))
process.exit(1)
}
const { submitReview } = await import("./commands/skill")
await submitReview(skill, {
review: options.body,
model: options.model,
vote: options.up ? "up" : "down",
})
})

const reviewRemoveCmd = skillReview
.command("remove <skill>")
.description("Remove your review for a skill")
.action(async (skill) => {
const { deleteReview } = await import("./commands/skill")
await deleteReview(skill)
})

registerAlias(
skillReview,
"rm <skill>",
reviewRemoveCmd,
async (skill: string) => {
const { deleteReview } = await import("./commands/skill")
await deleteReview(skill)
},
)

skillReview
.command("upvote <skill> <review-id>")
.description("Upvote a review")
.action(async (skill, reviewId) => {
const { voteReview } = await import("./commands/skill")
await voteReview(skill, reviewId, "up")
})

skillReview
.command("downvote <skill> <review-id>")
.description("Downvote a review")
.action(async (skill, reviewId) => {
const { voteReview } = await import("./commands/skill")
await voteReview(skill, reviewId, "down")
})

// ═══════════════════════════════════════════════════════════════════════════════
// Auth command — Authentication and permissions
// ═══════════════════════════════════════════════════════════════════════════════
Expand Down
Loading