ccjk 2.2.5 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/codex.mjs +4 -84
- package/dist/chunks/index.mjs +698 -1
- package/dist/chunks/index2.mjs +1 -0
- package/dist/chunks/mcp-performance.mjs +2 -5
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/workflows.mjs +617 -84
- package/dist/cli.mjs +2 -2
- package/dist/i18n/locales/en/cloud-sync.json +147 -0
- package/dist/i18n/locales/en/marketplace.json +32 -1
- package/dist/i18n/locales/zh-CN/cloud-sync.json +147 -0
- package/dist/i18n/locales/zh-CN/marketplace.json +32 -1
- package/package.json +1 -1
package/dist/chunks/index.mjs
CHANGED
|
@@ -321,6 +321,482 @@ async function initializePlugins() {
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
const cloudSyncSkill = {
|
|
325
|
+
id: "cloud-sync",
|
|
326
|
+
name: {
|
|
327
|
+
"en": "Cloud Sync",
|
|
328
|
+
"zh-CN": "\u4E91\u540C\u6B65\u7BA1\u7406"
|
|
329
|
+
},
|
|
330
|
+
description: {
|
|
331
|
+
"en": "Cross-device synchronization for configurations, skills, and workflows",
|
|
332
|
+
"zh-CN": "\u8DE8\u8BBE\u5907\u540C\u6B65\u914D\u7F6E\u3001\u6280\u80FD\u548C\u5DE5\u4F5C\u6D41"
|
|
333
|
+
},
|
|
334
|
+
category: "devops",
|
|
335
|
+
triggers: ["/sync", "/cloud", "/backup", "/restore"],
|
|
336
|
+
enabled: true,
|
|
337
|
+
version: "1.0.0",
|
|
338
|
+
author: "CCJK Team",
|
|
339
|
+
tags: ["cloud", "sync", "backup", "restore", "configuration"],
|
|
340
|
+
template: `# Cloud Sync Management
|
|
341
|
+
|
|
342
|
+
## Overview
|
|
343
|
+
|
|
344
|
+
Cloud Sync provides seamless cross-device synchronization for your CCJK environment.
|
|
345
|
+
Keep your configurations, skills, and workflows in sync across all your development machines.
|
|
346
|
+
|
|
347
|
+
## Features
|
|
348
|
+
|
|
349
|
+
### Configuration Sync
|
|
350
|
+
- Synchronize CCJK settings across devices
|
|
351
|
+
- Preserve API configurations securely
|
|
352
|
+
- Sync MCP service configurations
|
|
353
|
+
|
|
354
|
+
### Skills Sync
|
|
355
|
+
- Share custom skills between machines
|
|
356
|
+
- Version control for skill updates
|
|
357
|
+
- Conflict resolution for concurrent edits
|
|
358
|
+
|
|
359
|
+
### Workflow Sync
|
|
360
|
+
- Sync workflow states and progress
|
|
361
|
+
- Share workflow templates
|
|
362
|
+
- Collaborative workflow management
|
|
363
|
+
|
|
364
|
+
### Conflict Resolution
|
|
365
|
+
- Intelligent merge for non-conflicting changes
|
|
366
|
+
- Manual resolution UI for conflicts
|
|
367
|
+
- Version history for rollback
|
|
368
|
+
|
|
369
|
+
## Commands
|
|
370
|
+
|
|
371
|
+
### Sync Status
|
|
372
|
+
\`\`\`bash
|
|
373
|
+
/sync status
|
|
374
|
+
\`\`\`
|
|
375
|
+
View current synchronization status, pending changes, and last sync time.
|
|
376
|
+
|
|
377
|
+
### Push Changes
|
|
378
|
+
\`\`\`bash
|
|
379
|
+
/sync push # Push all pending changes
|
|
380
|
+
/sync push --config # Push configuration only
|
|
381
|
+
/sync push --skills # Push skills only
|
|
382
|
+
/sync push --workflows # Push workflows only
|
|
383
|
+
\`\`\`
|
|
384
|
+
|
|
385
|
+
### Pull Changes
|
|
386
|
+
\`\`\`bash
|
|
387
|
+
/sync pull # Pull all remote changes
|
|
388
|
+
/sync pull --force # Force pull, overwrite local
|
|
389
|
+
/sync pull --merge # Merge with local changes
|
|
390
|
+
\`\`\`
|
|
391
|
+
|
|
392
|
+
### Configure Cloud Storage
|
|
393
|
+
\`\`\`bash
|
|
394
|
+
/sync config # Interactive configuration
|
|
395
|
+
/sync config github # Configure GitHub Gist
|
|
396
|
+
/sync config webdav # Configure WebDAV
|
|
397
|
+
/sync config local # Configure local folder sync
|
|
398
|
+
\`\`\`
|
|
399
|
+
|
|
400
|
+
### Backup Management
|
|
401
|
+
\`\`\`bash
|
|
402
|
+
/backup create # Create full backup
|
|
403
|
+
/backup create --name "v1.0" # Create named backup
|
|
404
|
+
/backup list # List all backups
|
|
405
|
+
/backup restore <id> # Restore from backup
|
|
406
|
+
/backup delete <id> # Delete a backup
|
|
407
|
+
\`\`\`
|
|
408
|
+
|
|
409
|
+
### Conflict Management
|
|
410
|
+
\`\`\`bash
|
|
411
|
+
/sync conflicts # List all conflicts
|
|
412
|
+
/sync resolve <id> --local # Keep local version
|
|
413
|
+
/sync resolve <id> --remote # Keep remote version
|
|
414
|
+
/sync resolve <id> --merge # Manual merge
|
|
415
|
+
\`\`\`
|
|
416
|
+
|
|
417
|
+
## Supported Cloud Storage
|
|
418
|
+
|
|
419
|
+
### GitHub Gist (Recommended)
|
|
420
|
+
- Free and reliable
|
|
421
|
+
- Version history built-in
|
|
422
|
+
- Easy to set up with personal access token
|
|
423
|
+
|
|
424
|
+
\`\`\`bash
|
|
425
|
+
/sync config github
|
|
426
|
+
# Enter your GitHub personal access token
|
|
427
|
+
# Token needs 'gist' scope
|
|
428
|
+
\`\`\`
|
|
429
|
+
|
|
430
|
+
### WebDAV
|
|
431
|
+
Compatible with:
|
|
432
|
+
- Nutstore (\u575A\u679C\u4E91)
|
|
433
|
+
- Nextcloud
|
|
434
|
+
- ownCloud
|
|
435
|
+
- Any WebDAV server
|
|
436
|
+
|
|
437
|
+
\`\`\`bash
|
|
438
|
+
/sync config webdav
|
|
439
|
+
# Enter WebDAV URL, username, and password
|
|
440
|
+
\`\`\`
|
|
441
|
+
|
|
442
|
+
### Local Folder
|
|
443
|
+
For manual sync via Dropbox, OneDrive, etc.
|
|
444
|
+
|
|
445
|
+
\`\`\`bash
|
|
446
|
+
/sync config local
|
|
447
|
+
# Enter path to sync folder
|
|
448
|
+
\`\`\`
|
|
449
|
+
|
|
450
|
+
## Usage Examples
|
|
451
|
+
|
|
452
|
+
### First-Time Setup
|
|
453
|
+
\`\`\`bash
|
|
454
|
+
# 1. Configure cloud storage
|
|
455
|
+
/sync config github
|
|
456
|
+
|
|
457
|
+
# 2. Push initial configuration
|
|
458
|
+
/sync push --all
|
|
459
|
+
|
|
460
|
+
# 3. Verify sync status
|
|
461
|
+
/sync status
|
|
462
|
+
\`\`\`
|
|
463
|
+
|
|
464
|
+
### Daily Workflow
|
|
465
|
+
\`\`\`bash
|
|
466
|
+
# Start of day: pull latest changes
|
|
467
|
+
/sync pull
|
|
468
|
+
|
|
469
|
+
# End of day: push your changes
|
|
470
|
+
/sync push
|
|
471
|
+
\`\`\`
|
|
472
|
+
|
|
473
|
+
### Handling Conflicts
|
|
474
|
+
\`\`\`bash
|
|
475
|
+
# Check for conflicts after pull
|
|
476
|
+
/sync conflicts
|
|
477
|
+
|
|
478
|
+
# Review and resolve each conflict
|
|
479
|
+
/sync resolve skill-123 --merge
|
|
480
|
+
\`\`\`
|
|
481
|
+
|
|
482
|
+
### Backup Before Major Changes
|
|
483
|
+
\`\`\`bash
|
|
484
|
+
# Create backup before risky operations
|
|
485
|
+
/backup create --name "before-upgrade"
|
|
486
|
+
|
|
487
|
+
# If something goes wrong
|
|
488
|
+
/backup restore before-upgrade
|
|
489
|
+
\`\`\`
|
|
490
|
+
|
|
491
|
+
## Security
|
|
492
|
+
|
|
493
|
+
### Sensitive Data Handling
|
|
494
|
+
- API keys are encrypted before sync
|
|
495
|
+
- OAuth tokens are never synced (re-authenticate on each device)
|
|
496
|
+
- Local encryption key derived from device-specific identifier
|
|
497
|
+
|
|
498
|
+
### Access Control
|
|
499
|
+
- GitHub: Uses personal access token with minimal scope
|
|
500
|
+
- WebDAV: Supports app-specific passwords
|
|
501
|
+
- All connections use HTTPS/TLS
|
|
502
|
+
|
|
503
|
+
## Best Practices
|
|
504
|
+
|
|
505
|
+
1. **Regular Syncing**: Sync at least daily to avoid large conflicts
|
|
506
|
+
2. **Named Backups**: Create named backups before major changes
|
|
507
|
+
3. **Review Conflicts**: Don't auto-resolve conflicts without review
|
|
508
|
+
4. **Secure Tokens**: Use app-specific passwords when available
|
|
509
|
+
5. **Test Restore**: Periodically test backup restoration
|
|
510
|
+
|
|
511
|
+
## Troubleshooting
|
|
512
|
+
|
|
513
|
+
### Sync Failed
|
|
514
|
+
\`\`\`bash
|
|
515
|
+
# Check connection
|
|
516
|
+
/sync status --verbose
|
|
517
|
+
|
|
518
|
+
# Force re-authentication
|
|
519
|
+
/sync config github --reauth
|
|
520
|
+
\`\`\`
|
|
521
|
+
|
|
522
|
+
### Conflicts Won't Resolve
|
|
523
|
+
\`\`\`bash
|
|
524
|
+
# Reset sync state
|
|
525
|
+
/sync reset
|
|
526
|
+
|
|
527
|
+
# Re-initialize from remote
|
|
528
|
+
/sync pull --force
|
|
529
|
+
\`\`\`
|
|
530
|
+
|
|
531
|
+
### Backup Corrupted
|
|
532
|
+
\`\`\`bash
|
|
533
|
+
# List all backups with integrity check
|
|
534
|
+
/backup list --verify
|
|
535
|
+
|
|
536
|
+
# Delete corrupted backup
|
|
537
|
+
/backup delete <corrupted-id>
|
|
538
|
+
\`\`\`
|
|
539
|
+
`
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
const marketplaceSkill = {
|
|
543
|
+
id: "mcp-marketplace",
|
|
544
|
+
name: {
|
|
545
|
+
"en": "MCP Marketplace",
|
|
546
|
+
"zh-CN": "MCP \u63D2\u4EF6\u5E02\u573A"
|
|
547
|
+
},
|
|
548
|
+
description: {
|
|
549
|
+
"en": "Discover, install and manage MCP plugins",
|
|
550
|
+
"zh-CN": "\u53D1\u73B0\u3001\u5B89\u88C5\u548C\u7BA1\u7406 MCP \u63D2\u4EF6"
|
|
551
|
+
},
|
|
552
|
+
category: "dev",
|
|
553
|
+
triggers: ["/market", "/mcp", "/plugins", "/install"],
|
|
554
|
+
enabled: true,
|
|
555
|
+
version: "1.0.0",
|
|
556
|
+
author: "CCJK Team",
|
|
557
|
+
tags: ["mcp", "marketplace", "plugins", "extensions", "install"],
|
|
558
|
+
template: `# MCP Marketplace Skill
|
|
559
|
+
|
|
560
|
+
## Overview
|
|
561
|
+
|
|
562
|
+
The MCP Marketplace provides a centralized hub for discovering, installing, and managing
|
|
563
|
+
Model Context Protocol (MCP) plugins. It integrates seamlessly with Claude Code and CCJK
|
|
564
|
+
to enhance your AI-assisted development workflow.
|
|
565
|
+
|
|
566
|
+
## Features
|
|
567
|
+
|
|
568
|
+
- **Browse Marketplace**: Discover trending and recommended plugins
|
|
569
|
+
- **Search Plugins**: Search by name, category, or tags
|
|
570
|
+
- **Install Management**: One-click install, update, and uninstall
|
|
571
|
+
- **Security Scanning**: Automatic security checks before installation
|
|
572
|
+
- **Dependency Resolution**: Automatic handling of plugin dependencies
|
|
573
|
+
|
|
574
|
+
## Commands
|
|
575
|
+
|
|
576
|
+
### Search Plugins
|
|
577
|
+
\`\`\`bash
|
|
578
|
+
# Search by keyword
|
|
579
|
+
ccjk market search <query>
|
|
580
|
+
|
|
581
|
+
# Search with filters
|
|
582
|
+
ccjk market search <query> --category ai-tools
|
|
583
|
+
ccjk market search <query> --tag productivity
|
|
584
|
+
\`\`\`
|
|
585
|
+
|
|
586
|
+
### Browse Marketplace
|
|
587
|
+
\`\`\`bash
|
|
588
|
+
# View trending plugins
|
|
589
|
+
ccjk market trending
|
|
590
|
+
|
|
591
|
+
# Browse by category
|
|
592
|
+
ccjk market browse --category dev-tools
|
|
593
|
+
ccjk market browse --category ai-tools
|
|
594
|
+
ccjk market browse --category data-processing
|
|
595
|
+
\`\`\`
|
|
596
|
+
|
|
597
|
+
### Install Plugins
|
|
598
|
+
\`\`\`bash
|
|
599
|
+
# Install a plugin
|
|
600
|
+
ccjk market install <plugin-id>
|
|
601
|
+
|
|
602
|
+
# Install specific version
|
|
603
|
+
ccjk market install <plugin-id>@1.2.0
|
|
604
|
+
|
|
605
|
+
# Install with dependencies
|
|
606
|
+
ccjk market install <plugin-id> --with-deps
|
|
607
|
+
|
|
608
|
+
# Force reinstall
|
|
609
|
+
ccjk market install <plugin-id> --force
|
|
610
|
+
\`\`\`
|
|
611
|
+
|
|
612
|
+
### Update Plugins
|
|
613
|
+
\`\`\`bash
|
|
614
|
+
# Update all plugins
|
|
615
|
+
ccjk market update
|
|
616
|
+
|
|
617
|
+
# Update specific plugin
|
|
618
|
+
ccjk market update <plugin-id>
|
|
619
|
+
|
|
620
|
+
# Check for updates
|
|
621
|
+
ccjk market check-updates
|
|
622
|
+
\`\`\`
|
|
623
|
+
|
|
624
|
+
### Manage Installed Plugins
|
|
625
|
+
\`\`\`bash
|
|
626
|
+
# List installed plugins
|
|
627
|
+
ccjk market list
|
|
628
|
+
|
|
629
|
+
# Show plugin details
|
|
630
|
+
ccjk market info <plugin-id>
|
|
631
|
+
|
|
632
|
+
# Uninstall plugin
|
|
633
|
+
ccjk market uninstall <plugin-id>
|
|
634
|
+
|
|
635
|
+
# Enable/disable plugin
|
|
636
|
+
ccjk market enable <plugin-id>
|
|
637
|
+
ccjk market disable <plugin-id>
|
|
638
|
+
\`\`\`
|
|
639
|
+
|
|
640
|
+
## Categories
|
|
641
|
+
|
|
642
|
+
### AI Tools
|
|
643
|
+
AI-enhanced functionality for code generation, analysis, and optimization.
|
|
644
|
+
- Code completion enhancers
|
|
645
|
+
- AI-powered refactoring
|
|
646
|
+
- Intelligent code review
|
|
647
|
+
|
|
648
|
+
### Development Tools
|
|
649
|
+
Tools to assist with coding and development workflows.
|
|
650
|
+
- Language servers
|
|
651
|
+
- Linters and formatters
|
|
652
|
+
- Build tool integrations
|
|
653
|
+
|
|
654
|
+
### Productivity Tools
|
|
655
|
+
Enhance your development efficiency.
|
|
656
|
+
- Task automation
|
|
657
|
+
- Snippet managers
|
|
658
|
+
- Documentation generators
|
|
659
|
+
|
|
660
|
+
### Data Processing
|
|
661
|
+
Data transformation and analysis tools.
|
|
662
|
+
- Data converters
|
|
663
|
+
- Schema validators
|
|
664
|
+
- API integrators
|
|
665
|
+
|
|
666
|
+
### Integrations
|
|
667
|
+
Third-party service integrations.
|
|
668
|
+
- Cloud service connectors
|
|
669
|
+
- Database integrations
|
|
670
|
+
- CI/CD tool bridges
|
|
671
|
+
|
|
672
|
+
## Security
|
|
673
|
+
|
|
674
|
+
All plugins undergo security scanning before installation:
|
|
675
|
+
|
|
676
|
+
### Security Checks
|
|
677
|
+
- **Permission Analysis**: Detects dangerous permission requests
|
|
678
|
+
- **Vulnerability Scanning**: Checks against known CVE databases
|
|
679
|
+
- **Code Pattern Analysis**: Identifies suspicious code patterns
|
|
680
|
+
- **Dependency Audit**: Scans dependencies for vulnerabilities
|
|
681
|
+
|
|
682
|
+
### Security Levels
|
|
683
|
+
- \`verified\` - Officially verified by CCJK team
|
|
684
|
+
- \`community\` - Community-reviewed plugin
|
|
685
|
+
- \`unverified\` - New or unreviewed plugin
|
|
686
|
+
|
|
687
|
+
### Skip Security (Not Recommended)
|
|
688
|
+
\`\`\`bash
|
|
689
|
+
ccjk market install <plugin-id> --skip-verification
|
|
690
|
+
\`\`\`
|
|
691
|
+
|
|
692
|
+
## Configuration
|
|
693
|
+
|
|
694
|
+
### Plugin Settings
|
|
695
|
+
\`\`\`bash
|
|
696
|
+
# Configure plugin
|
|
697
|
+
ccjk market config <plugin-id> --set key=value
|
|
698
|
+
|
|
699
|
+
# View plugin config
|
|
700
|
+
ccjk market config <plugin-id> --list
|
|
701
|
+
|
|
702
|
+
# Reset plugin config
|
|
703
|
+
ccjk market config <plugin-id> --reset
|
|
704
|
+
\`\`\`
|
|
705
|
+
|
|
706
|
+
### Global Settings
|
|
707
|
+
\`\`\`bash
|
|
708
|
+
# Set default registry
|
|
709
|
+
ccjk market registry set <url>
|
|
710
|
+
|
|
711
|
+
# Enable auto-updates
|
|
712
|
+
ccjk market settings --auto-update true
|
|
713
|
+
|
|
714
|
+
# Set security level
|
|
715
|
+
ccjk market settings --security-level strict
|
|
716
|
+
\`\`\`
|
|
717
|
+
|
|
718
|
+
## Plugin Development
|
|
719
|
+
|
|
720
|
+
### Create a Plugin
|
|
721
|
+
\`\`\`bash
|
|
722
|
+
ccjk market create <plugin-name>
|
|
723
|
+
\`\`\`
|
|
724
|
+
|
|
725
|
+
### Publish to Marketplace
|
|
726
|
+
\`\`\`bash
|
|
727
|
+
ccjk market publish
|
|
728
|
+
\`\`\`
|
|
729
|
+
|
|
730
|
+
### Plugin Manifest Example
|
|
731
|
+
\`\`\`json
|
|
732
|
+
{
|
|
733
|
+
"packageId": "my-plugin",
|
|
734
|
+
"name": "My Plugin",
|
|
735
|
+
"version": "1.0.0",
|
|
736
|
+
"description": "A useful MCP plugin",
|
|
737
|
+
"author": "Your Name",
|
|
738
|
+
"license": "MIT",
|
|
739
|
+
"keywords": ["mcp", "plugin"],
|
|
740
|
+
"mcpServer": {
|
|
741
|
+
"command": "node",
|
|
742
|
+
"args": ["dist/server.js"]
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
\`\`\`
|
|
746
|
+
|
|
747
|
+
## Troubleshooting
|
|
748
|
+
|
|
749
|
+
### Installation Issues
|
|
750
|
+
\`\`\`bash
|
|
751
|
+
# Clear cache and retry
|
|
752
|
+
ccjk market cache clear
|
|
753
|
+
ccjk market install <plugin-id>
|
|
754
|
+
|
|
755
|
+
# Verbose installation
|
|
756
|
+
ccjk market install <plugin-id> --verbose
|
|
757
|
+
\`\`\`
|
|
758
|
+
|
|
759
|
+
### Dependency Conflicts
|
|
760
|
+
\`\`\`bash
|
|
761
|
+
# Check dependencies
|
|
762
|
+
ccjk market deps <plugin-id>
|
|
763
|
+
|
|
764
|
+
# Force resolve conflicts
|
|
765
|
+
ccjk market install <plugin-id> --force-deps
|
|
766
|
+
\`\`\`
|
|
767
|
+
|
|
768
|
+
### Rollback
|
|
769
|
+
\`\`\`bash
|
|
770
|
+
# Rollback to previous version
|
|
771
|
+
ccjk market rollback <plugin-id>
|
|
772
|
+
|
|
773
|
+
# Rollback to specific version
|
|
774
|
+
ccjk market rollback <plugin-id>@1.0.0
|
|
775
|
+
\`\`\`
|
|
776
|
+
|
|
777
|
+
## Best Practices
|
|
778
|
+
|
|
779
|
+
1. **Review Before Install**: Always check plugin ratings and reviews
|
|
780
|
+
2. **Keep Updated**: Regularly update plugins for security patches
|
|
781
|
+
3. **Minimal Plugins**: Only install plugins you actively use
|
|
782
|
+
4. **Backup Config**: Export your plugin configuration before major changes
|
|
783
|
+
5. **Report Issues**: Help improve the ecosystem by reporting bugs
|
|
784
|
+
|
|
785
|
+
## Integration with Claude Code
|
|
786
|
+
|
|
787
|
+
The marketplace integrates directly with Claude Code's MCP system:
|
|
788
|
+
|
|
789
|
+
\`\`\`bash
|
|
790
|
+
# Installed plugins are automatically available in Claude Code
|
|
791
|
+
claude --mcp-list # Shows marketplace-installed plugins
|
|
792
|
+
|
|
793
|
+
# Plugins can be used in conversations
|
|
794
|
+
# Example: Using a database plugin
|
|
795
|
+
"Connect to my PostgreSQL database and show tables"
|
|
796
|
+
\`\`\`
|
|
797
|
+
`
|
|
798
|
+
};
|
|
799
|
+
|
|
324
800
|
const browserSkill = {
|
|
325
801
|
id: "browser-automation",
|
|
326
802
|
name: {
|
|
@@ -437,8 +913,229 @@ Use these refs to interact with specific elements:
|
|
|
437
913
|
`
|
|
438
914
|
};
|
|
439
915
|
|
|
916
|
+
const workflowSkill = {
|
|
917
|
+
id: "workflow-automation",
|
|
918
|
+
name: {
|
|
919
|
+
"en": "Workflow Automation",
|
|
920
|
+
"zh-CN": "\u5DE5\u4F5C\u6D41\u81EA\u52A8\u5316"
|
|
921
|
+
},
|
|
922
|
+
description: {
|
|
923
|
+
"en": "Subagent-driven development workflow with two-stage review",
|
|
924
|
+
"zh-CN": "Subagent \u9A71\u52A8\u7684\u4E24\u9636\u6BB5\u5BA1\u67E5\u5F00\u53D1\u5DE5\u4F5C\u6D41"
|
|
925
|
+
},
|
|
926
|
+
category: "dev",
|
|
927
|
+
triggers: ["/workflow", "/wf", "/flow"],
|
|
928
|
+
enabled: true,
|
|
929
|
+
version: "1.0.0",
|
|
930
|
+
author: "CCJK",
|
|
931
|
+
tags: ["workflow", "subagent", "review", "automation", "ci"],
|
|
932
|
+
template: `# Workflow Automation Skill
|
|
933
|
+
|
|
934
|
+
## Overview
|
|
935
|
+
|
|
936
|
+
This skill provides Subagent-driven development workflows with automatic two-stage review.
|
|
937
|
+
Inspired by Anthropic's Superpowers architecture for autonomous agent collaboration.
|
|
938
|
+
|
|
939
|
+
## Core Concepts
|
|
940
|
+
|
|
941
|
+
### Two-Stage Review
|
|
942
|
+
1. **Draft Stage**: Subagents work on tasks in parallel
|
|
943
|
+
2. **Review Stage**: Automated quality checks and validation
|
|
944
|
+
3. **Finalize Stage**: Merge approved changes
|
|
945
|
+
|
|
946
|
+
### Workflow States
|
|
947
|
+
- \`idle\` \u2192 \`planning\` \u2192 \`executing\` \u2192 \`reviewing\` \u2192 \`finalizing\` \u2192 \`completed\`
|
|
948
|
+
|
|
949
|
+
## Quick Start
|
|
950
|
+
|
|
951
|
+
### Create a Workflow
|
|
952
|
+
\`\`\`bash
|
|
953
|
+
ccjk workflow create "Implement user authentication"
|
|
954
|
+
\`\`\`
|
|
955
|
+
|
|
956
|
+
### Start Workflow Execution
|
|
957
|
+
\`\`\`bash
|
|
958
|
+
ccjk workflow start <workflow-id>
|
|
959
|
+
\`\`\`
|
|
960
|
+
|
|
961
|
+
### Check Workflow Status
|
|
962
|
+
\`\`\`bash
|
|
963
|
+
ccjk workflow status <workflow-id>
|
|
964
|
+
ccjk workflow list
|
|
965
|
+
\`\`\`
|
|
966
|
+
|
|
967
|
+
## Task Management
|
|
968
|
+
|
|
969
|
+
### Add Tasks to Workflow
|
|
970
|
+
\`\`\`bash
|
|
971
|
+
ccjk workflow task add <workflow-id> "Create login component"
|
|
972
|
+
ccjk workflow task add <workflow-id> "Add authentication API" --depends-on task-1
|
|
973
|
+
\`\`\`
|
|
974
|
+
|
|
975
|
+
### Task Priorities
|
|
976
|
+
\`\`\`bash
|
|
977
|
+
ccjk workflow task add <workflow-id> "Fix security bug" --priority critical
|
|
978
|
+
ccjk workflow task add <workflow-id> "Add tests" --priority high
|
|
979
|
+
\`\`\`
|
|
980
|
+
|
|
981
|
+
### View Task Dependencies
|
|
982
|
+
\`\`\`bash
|
|
983
|
+
ccjk workflow tasks <workflow-id> --graph
|
|
984
|
+
\`\`\`
|
|
985
|
+
|
|
986
|
+
## Subagent Scheduling
|
|
987
|
+
|
|
988
|
+
### Automatic Scheduling
|
|
989
|
+
The scheduler automatically:
|
|
990
|
+
- Assigns tasks to available subagents
|
|
991
|
+
- Respects task dependencies
|
|
992
|
+
- Balances workload across agents
|
|
993
|
+
- Handles failures with retry logic
|
|
994
|
+
|
|
995
|
+
### Manual Assignment
|
|
996
|
+
\`\`\`bash
|
|
997
|
+
ccjk workflow assign <task-id> <subagent-id>
|
|
998
|
+
\`\`\`
|
|
999
|
+
|
|
1000
|
+
### View Subagent Status
|
|
1001
|
+
\`\`\`bash
|
|
1002
|
+
ccjk workflow agents
|
|
1003
|
+
ccjk workflow agent <agent-id> --tasks
|
|
1004
|
+
\`\`\`
|
|
1005
|
+
|
|
1006
|
+
## Review System
|
|
1007
|
+
|
|
1008
|
+
### Automatic Review
|
|
1009
|
+
When tasks complete, the system automatically:
|
|
1010
|
+
1. Runs requirement verification
|
|
1011
|
+
2. Performs code quality checks
|
|
1012
|
+
3. Validates test coverage
|
|
1013
|
+
4. Checks for security issues
|
|
1014
|
+
|
|
1015
|
+
### Review Results
|
|
1016
|
+
\`\`\`bash
|
|
1017
|
+
ccjk workflow review <workflow-id>
|
|
1018
|
+
ccjk workflow review <task-id> --detailed
|
|
1019
|
+
\`\`\`
|
|
1020
|
+
|
|
1021
|
+
### Manual Review Override
|
|
1022
|
+
\`\`\`bash
|
|
1023
|
+
ccjk workflow approve <task-id>
|
|
1024
|
+
ccjk workflow reject <task-id> --reason "Missing tests"
|
|
1025
|
+
\`\`\`
|
|
1026
|
+
|
|
1027
|
+
## Quality Checks
|
|
1028
|
+
|
|
1029
|
+
### Built-in Checks
|
|
1030
|
+
- **Naming Conventions**: camelCase, PascalCase validation
|
|
1031
|
+
- **Code Structure**: Function length, nesting depth
|
|
1032
|
+
- **Error Handling**: Try-catch coverage
|
|
1033
|
+
- **Documentation**: JSDoc/TSDoc presence
|
|
1034
|
+
- **Style**: Consistent formatting
|
|
1035
|
+
|
|
1036
|
+
### Custom Checks
|
|
1037
|
+
\`\`\`bash
|
|
1038
|
+
ccjk workflow check add "No console.log" --pattern "console\\.log"
|
|
1039
|
+
ccjk workflow check add "Max file size" --max-lines 500
|
|
1040
|
+
\`\`\`
|
|
1041
|
+
|
|
1042
|
+
## Workflow Templates
|
|
1043
|
+
|
|
1044
|
+
### Feature Development
|
|
1045
|
+
\`\`\`bash
|
|
1046
|
+
ccjk workflow create --template feature "Add dark mode"
|
|
1047
|
+
\`\`\`
|
|
1048
|
+
|
|
1049
|
+
### Bug Fix
|
|
1050
|
+
\`\`\`bash
|
|
1051
|
+
ccjk workflow create --template bugfix "Fix login timeout"
|
|
1052
|
+
\`\`\`
|
|
1053
|
+
|
|
1054
|
+
### Refactoring
|
|
1055
|
+
\`\`\`bash
|
|
1056
|
+
ccjk workflow create --template refactor "Migrate to TypeScript"
|
|
1057
|
+
\`\`\`
|
|
1058
|
+
|
|
1059
|
+
## Events and Hooks
|
|
1060
|
+
|
|
1061
|
+
### Available Events
|
|
1062
|
+
- \`workflow:created\`
|
|
1063
|
+
- \`workflow:started\`
|
|
1064
|
+
- \`task:assigned\`
|
|
1065
|
+
- \`task:completed\`
|
|
1066
|
+
- \`review:passed\`
|
|
1067
|
+
- \`review:failed\`
|
|
1068
|
+
- \`workflow:completed\`
|
|
1069
|
+
|
|
1070
|
+
### Add Hooks
|
|
1071
|
+
\`\`\`bash
|
|
1072
|
+
ccjk workflow hook add task:completed "npm test"
|
|
1073
|
+
ccjk workflow hook add review:passed "npm run lint"
|
|
1074
|
+
\`\`\`
|
|
1075
|
+
|
|
1076
|
+
## Best Practices
|
|
1077
|
+
|
|
1078
|
+
### 1. Break Down Large Tasks
|
|
1079
|
+
Split complex features into smaller, independent tasks that can run in parallel.
|
|
1080
|
+
|
|
1081
|
+
### 2. Define Clear Dependencies
|
|
1082
|
+
Use \`--depends-on\` to ensure tasks run in the correct order.
|
|
1083
|
+
|
|
1084
|
+
### 3. Set Appropriate Priorities
|
|
1085
|
+
- \`critical\`: Security fixes, blocking issues
|
|
1086
|
+
- \`high\`: Important features, bugs
|
|
1087
|
+
- \`medium\`: Regular development
|
|
1088
|
+
- \`low\`: Nice-to-have improvements
|
|
1089
|
+
|
|
1090
|
+
### 4. Review Before Merge
|
|
1091
|
+
Always check review results before finalizing:
|
|
1092
|
+
\`\`\`bash
|
|
1093
|
+
ccjk workflow review <workflow-id> --summary
|
|
1094
|
+
\`\`\`
|
|
1095
|
+
|
|
1096
|
+
### 5. Use Templates
|
|
1097
|
+
Create custom templates for recurring workflow patterns.
|
|
1098
|
+
|
|
1099
|
+
## Integration with Git
|
|
1100
|
+
|
|
1101
|
+
### Automatic Branch Management
|
|
1102
|
+
\`\`\`bash
|
|
1103
|
+
ccjk workflow create "Feature X" --branch feature/x
|
|
1104
|
+
\`\`\`
|
|
1105
|
+
|
|
1106
|
+
### Worktree Support
|
|
1107
|
+
Each subagent can work in isolated git worktrees:
|
|
1108
|
+
\`\`\`bash
|
|
1109
|
+
ccjk workflow start <id> --worktree
|
|
1110
|
+
\`\`\`
|
|
1111
|
+
|
|
1112
|
+
## Troubleshooting
|
|
1113
|
+
|
|
1114
|
+
### Stuck Workflow
|
|
1115
|
+
\`\`\`bash
|
|
1116
|
+
ccjk workflow diagnose <workflow-id>
|
|
1117
|
+
ccjk workflow retry <task-id>
|
|
1118
|
+
\`\`\`
|
|
1119
|
+
|
|
1120
|
+
### Cancel Workflow
|
|
1121
|
+
\`\`\`bash
|
|
1122
|
+
ccjk workflow cancel <workflow-id>
|
|
1123
|
+
ccjk workflow cancel <workflow-id> --force
|
|
1124
|
+
\`\`\`
|
|
1125
|
+
|
|
1126
|
+
### View Logs
|
|
1127
|
+
\`\`\`bash
|
|
1128
|
+
ccjk workflow logs <workflow-id>
|
|
1129
|
+
ccjk workflow logs <task-id> --tail 100
|
|
1130
|
+
\`\`\`
|
|
1131
|
+
`
|
|
1132
|
+
};
|
|
1133
|
+
|
|
440
1134
|
const BUILTIN_SKILLS = [
|
|
441
|
-
|
|
1135
|
+
cloudSyncSkill,
|
|
1136
|
+
browserSkill,
|
|
1137
|
+
marketplaceSkill,
|
|
1138
|
+
workflowSkill
|
|
442
1139
|
];
|
|
443
1140
|
function getBuiltinSkill(id) {
|
|
444
1141
|
return BUILTIN_SKILLS.find((s) => s.id === id);
|