mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
Merge pull request #156 from amDosion/feat/ultraplan-enablement
feat: enable /ultraplan and harden GrowthBook fallback chain
This commit is contained in:
54
src/skills/bundled/cronManage.ts
Normal file
54
src/skills/bundled/cronManage.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import {
|
||||
CRON_DELETE_TOOL_NAME,
|
||||
CRON_LIST_TOOL_NAME,
|
||||
isKairosCronEnabled,
|
||||
} from '../../tools/ScheduleCronTool/prompt.js'
|
||||
import { registerBundledSkill } from '../bundledSkills.js'
|
||||
|
||||
export function registerCronListSkill(): void {
|
||||
registerBundledSkill({
|
||||
name: 'cron-list',
|
||||
description: 'List all scheduled cron jobs in this session',
|
||||
whenToUse:
|
||||
'When the user wants to see their scheduled/recurring tasks, check active cron jobs, or review what is currently looping.',
|
||||
userInvocable: true,
|
||||
isEnabled: isKairosCronEnabled,
|
||||
async getPromptForCommand() {
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: `Call ${CRON_LIST_TOOL_NAME} to list all scheduled cron jobs. Display the results in a table with columns: ID, Schedule, Prompt, Recurring, Durable. If no jobs exist, say "No scheduled tasks."`,
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function registerCronDeleteSkill(): void {
|
||||
registerBundledSkill({
|
||||
name: 'cron-delete',
|
||||
description: 'Cancel a scheduled cron job by ID',
|
||||
whenToUse:
|
||||
'When the user wants to cancel, stop, or remove a scheduled/recurring task or cron job.',
|
||||
argumentHint: '<job-id>',
|
||||
userInvocable: true,
|
||||
isEnabled: isKairosCronEnabled,
|
||||
async getPromptForCommand(args) {
|
||||
const id = args.trim()
|
||||
if (!id) {
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: `Usage: /cron-delete <job-id>\n\nProvide the job ID to cancel. Use /cron-list to see active jobs and their IDs.`,
|
||||
},
|
||||
]
|
||||
}
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: `Call ${CRON_DELETE_TOOL_NAME} with id "${id}" to cancel that scheduled job. Confirm the result to the user.`,
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import { registerRememberSkill } from './remember.js'
|
||||
import { registerSimplifySkill } from './simplify.js'
|
||||
import { registerSkillifySkill } from './skillify.js'
|
||||
import { registerStuckSkill } from './stuck.js'
|
||||
import { registerCronDeleteSkill, registerCronListSkill } from './cronManage.js'
|
||||
import { registerLoopSkill } from './loop.js'
|
||||
import { registerDreamSkill } from './dream.js'
|
||||
import { registerUpdateConfigSkill } from './updateConfig.js'
|
||||
@@ -35,6 +36,8 @@ export function initBundledSkills(): void {
|
||||
registerBatchSkill()
|
||||
registerStuckSkill()
|
||||
registerLoopSkill()
|
||||
registerCronListSkill()
|
||||
registerCronDeleteSkill()
|
||||
registerDreamSkill()
|
||||
if (feature('REVIEW_ARTIFACT')) {
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
|
||||
Reference in New Issue
Block a user