rulesync icon indicating copy to clipboard operation
rulesync copied to clipboard

Claude Code Command to OpenCode command issue

Open mp3por opened this issue 10 months ago • 4 comments

Hello, great repo.

I am having an issue migrating claude code command to opencode command

Issue 1: rulesync does not parse correctly the claude code command

---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [operation] | --backup | --restore | --schedule | --validate | --cleanup
description: Manage Supabase database backups with automated scheduling and recovery procedures
---

# Supabase Backup Manager

Manage comprehensive Supabase database backups with automated scheduling and recovery validation: **$ARGUMENTS**

## Current Backup Context

- Supabase project: MCP integration for backup operations and status monitoring
- Backup storage: Current backup configuration and storage capacity
- Recovery testing: Last backup validation and recovery procedure verification
- Automation status: !find . -name "*.yml" -o -name "*.json" | xargs grep -l "backup\|cron" 2>/dev/null | head -3 scheduled backup configuration

## Task

Execute comprehensive backup management with automated procedures and recovery validation:

**Backup Operation**: Use $ARGUMENTS to specify backup creation, data restoration, schedule management, backup validation, or cleanup procedures

**Backup Management Framework**:
1. **Backup Strategy** - Design backup schedules, implement retention policies, configure incremental backups, optimize storage usage
2. **Automated Backup** - Create database snapshots, export schema and data, validate backup integrity, monitor backup completion
3. **Recovery Procedures** - Test restore processes, validate data integrity, implement point-in-time recovery, optimize recovery time
4. **Schedule Management** - Configure automated backup schedules, implement backup monitoring, setup failure notifications, optimize backup windows
5. **Storage Optimization** - Manage backup storage, implement compression strategies, archive old backups, monitor storage costs
6. **Disaster Recovery** - Plan disaster recovery procedures, test recovery scenarios, document recovery processes, validate business continuity

**Advanced Features**: Automated backup validation, recovery time optimization, cross-region backup replication, backup encryption, compliance reporting.

**Monitoring Integration**: Backup success monitoring, failure alerting, storage usage tracking, recovery time measurement, compliance reporting.

**Output**: Complete backup management system with automated schedules, recovery procedures, validation reports, and disaster recovery planning.

Error: npx rulesync import --targets claudecode --features "*" ℹ Successfully loaded 1 claudecode MCP files rulesync 00:03:57 ч.

ERROR YAMLException: end of the stream or a document separator is expected at line 3, column 28: rulesync 00:03:57 ч. argument-hint: [operation] | --backup | --restore | --sched ...

Even if i migrate it to

---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[operation] | --backup | --restore | --schedule | --validate | --cleanup"
description: Manage Supabase database backups with automated scheduling and recovery procedures
command: |
  # Supabase Backup Manager

  Manage comprehensive Supabase database backups with automated scheduling and recovery validation: **$ARGUMENTS**

  ## Current Backup Context

  - Supabase project: MCP integration for backup operations and status monitoring
  - Backup storage: Current backup configuration and storage capacity
  - Recovery testing: Last backup validation and recovery procedure verification
  - Automation status: !`find . -name "*.yml" -o -name "*.json" | xargs grep -l "backup\|cron" 2>/dev/null | head -3` scheduled backup configuration

  ## Task

  Execute comprehensive backup management with automated procedures and recovery validation:

  **Backup Operation**: Use $ARGUMENTS to specify backup creation, data restoration, schedule management, backup validation, or cleanup procedures

  ### Backup Management Framework

  1. Backup Strategy
  2. Automated Backup
  3. Recovery Procedures
  4. Schedule Management
  5. Storage Optimization
  6. Disaster Recovery

  **Advanced Features**: Automated backup validation, cross-region replication, encryption, compliance reporting.

  **Monitoring Integration**: Alerts, metrics, recovery validation.

  **Output**: Complete backup management system with automated schedules, recovery procedures, validation reports, and disaster recovery planning.
---

when i do npx rulesync generate --targets opencode --features "*"

I get as a result which is not full

---
description: >-
  Manage Supabase database backups with automated scheduling and recovery
  procedures
---

What am i doing wrong ?

mp3por avatar Jan 20 '26 22:01 mp3por

@mp3por Thank you for your report. Unfortunately, I don't have time to verify that issue. If you or anyone fix it, I will be happy.

cm-dyoshikawa avatar Jan 26 '26 03:01 cm-dyoshikawa

@mp3por Both issues are related to the command file format:

Issue 1: In YAML, [ is a special character. Quote the value:

argument-hint: "[operation] | --backup | --restore | --schedule | --validate | --cleanup"

Issue 2: command is not a supported frontmatter field. The prompt body goes after the closing --- delimiter, not inside it.

Please give it a try!

saitota avatar Feb 28 '26 04:02 saitota

Mind closing this? @dyoshikawa @mp3por

saitota avatar Mar 05 '26 13:03 saitota

really thanks. @saitota

dyoshikawa avatar Mar 10 '26 14:03 dyoshikawa