rulesync icon indicating copy to clipboard operation
rulesync copied to clipboard

claudecode import: array `argument-hint` in a skill aborts `--features "*"` and drops hooks/permissions

Open artgas1 opened this issue 2 months ago • 0 comments

Summary

rulesync import --targets claudecode --features "*" fails on a skill whose argument-hint is written the way the Claude Code docs show it (argument-hint: [issue-number]). YAML parses that value as an array, the skill frontmatter schema expects a string, and the whole import stops: skills, hooks and permissions are not imported at all, while features processed earlier (rules, MCP) are already written. The exit code is 1, but the partial .rulesync/ tree looks like a successful import.

Claude Code itself accepts this form; the skills frontmatter reference gives [issue-number] and [filename] [format] as argument-hint examples.

Reproduction (rulesync 21.0.0, macOS)

.claude/skills/fix-issue/SKILL.md:

---
name: fix-issue
description: Fix a GitHub issue
argument-hint: [issue-number]
---
Fix issue $ARGUMENTS.

.claude/settings.json:

{
  "permissions": { "allow": ["Bash(git status)"] },
  "hooks": { "PreToolUse": [{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check.sh" }] }] }
}

CLAUDE.md: any content.

rulesync import --targets claudecode --features "*"

Actual

Invalid frontmatter in .../.claude/skills/fix-issue/SKILL.md: Zod raw error: [{"expected":"string","code":"invalid_type","path":["argument-hint"],"message":"Invalid input: expected string, received array"}]

Exit code 1. .rulesync/ contains only .aiignore, mcp.jsonc and rules/CLAUDE.md: no skills, no hooks.json, no permissions.jsonc.

Expected

  1. Accept an array argument-hint (for example, join it back into the bracketed string), since Claude Code accepts it.
  2. One invalid file should not abort the remaining files and features. Skip that file with a warning and continue, so the import doesn't silently lose hooks and permissions.

artgas1 avatar Sep 26 '26 12:09 artgas1