@@ -1015,114 +1015,6 @@ skillCmd
10151015 } )
10161016 } )
10171017
1018- // Skill voting (verbs instead of flags)
1019- skillCmd
1020- . command ( "upvote <skill>" )
1021- . description ( "Upvote a skill" )
1022- . action ( async ( skill ) => {
1023- const { voteSkill } = await import ( "./commands/skill" )
1024- await voteSkill ( skill , "up" )
1025- } )
1026-
1027- skillCmd
1028- . command ( "downvote <skill>" )
1029- . description ( "Downvote a skill" )
1030- . action ( async ( skill ) => {
1031- const { voteSkill } = await import ( "./commands/skill" )
1032- await voteSkill ( skill , "down" )
1033- } )
1034-
1035- // skill review subcommand
1036- const skillReview = skillCmd
1037- . command ( "review" )
1038- . description ( "Manage skill reviews" )
1039-
1040- skillReview
1041- . command ( "list <skill>" )
1042- . description ( "List reviews for a skill" )
1043-
1044- . option ( "--limit <number>" , "Number of reviews to show" , "10" )
1045- . option ( "--page <number>" , "Page number" , "1" )
1046- . action ( async ( skill , options ) => {
1047- const { listReviews } = await import ( "./commands/skill" )
1048- await listReviews ( skill , {
1049- limit : Number . parseInt ( options . limit , 10 ) ,
1050- page : Number . parseInt ( options . page , 10 ) ,
1051- } )
1052- } )
1053-
1054- skillReview
1055- . command ( "add <skill>" )
1056- . description ( "Add a review for a skill" )
1057- . option ( "-b, --body <text>" , "Review text (required)" )
1058- . option ( "-m, --model <name>" , "Agent model used (e.g., claude-3.5-sonnet)" )
1059- . option ( "--up" , "Upvote the skill" )
1060- . option ( "--down" , "Downvote the skill" )
1061- . action ( async ( skill , options ) => {
1062- if ( ! options . body ) {
1063- console . error ( pc . red ( "Error: --body is required" ) )
1064- console . error (
1065- pc . dim (
1066- 'Usage: smithery skill review add <skill> --up|--down -b "review text"' ,
1067- ) ,
1068- )
1069- process . exit ( 1 )
1070- }
1071- if ( ! options . up && ! options . down ) {
1072- console . error ( pc . red ( "Error: --up or --down is required" ) )
1073- console . error (
1074- pc . dim (
1075- 'Usage: smithery skill review add <skill> --up|--down -b "review text"' ,
1076- ) ,
1077- )
1078- process . exit ( 1 )
1079- }
1080- if ( options . up && options . down ) {
1081- console . error ( pc . red ( "Error: Cannot specify both --up and --down" ) )
1082- process . exit ( 1 )
1083- }
1084- const { submitReview } = await import ( "./commands/skill" )
1085- await submitReview ( skill , {
1086- review : options . body ,
1087- model : options . model ,
1088- vote : options . up ? "up" : "down" ,
1089- } )
1090- } )
1091-
1092- const reviewRemoveCmd = skillReview
1093- . command ( "remove <skill>" )
1094- . description ( "Remove your review for a skill" )
1095- . action ( async ( skill ) => {
1096- const { deleteReview } = await import ( "./commands/skill" )
1097- await deleteReview ( skill )
1098- } )
1099-
1100- registerAlias (
1101- skillReview ,
1102- "rm <skill>" ,
1103- reviewRemoveCmd ,
1104- async ( skill : string ) => {
1105- const { deleteReview } = await import ( "./commands/skill" )
1106- await deleteReview ( skill )
1107- } ,
1108- )
1109-
1110- skillReview
1111- . command ( "upvote <skill> <review-id>" )
1112- . description ( "Upvote a review" )
1113- . action ( async ( skill , reviewId ) => {
1114- const { voteReview } = await import ( "./commands/skill" )
1115- await voteReview ( skill , reviewId , "up" )
1116- } )
1117-
1118- skillReview
1119- . command ( "downvote <skill> <review-id>" )
1120- . description ( "Downvote a review" )
1121- . action ( async ( skill , reviewId ) => {
1122- const { voteReview } = await import ( "./commands/skill" )
1123- await voteReview ( skill , reviewId , "down" )
1124- } )
1125-
11261018// ═══════════════════════════════════════════════════════════════════════════════
11271019// Auth command — Authentication and permissions
11281020// ═══════════════════════════════════════════════════════════════════════════════
0 commit comments