Commit bcc2907
committed
feat: support markdown agent format (.md with YAML frontmatter) in mode loader
Extends the mode loader to accept .md files alongside .yaml/.yml in
~/.claude/modes/. Markdown files use YAML frontmatter for metadata
and the body as systemPrompt — the same format supported by
OpenCode, Claude Code agents, and Cursor rules.
.md data is normalized to the same shape as .yaml data, reusing
the existing CCBMode mapping with zero code duplication.
- Add kebabCase() helper for slug derivation from name
- Add parseMarkdownFrontmatter() helper (uses existing yaml package)
- .md: body → system_prompt, auto-slug if missing, icon default 🤖
- Add optional model field to CCBMode for cross-tool alignment
- Existing .yaml/.yml path: unchanged1 parent bee711f commit bcc2907
2 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
17 | 38 | | |
18 | 39 | | |
19 | 40 | | |
| |||
23 | 44 | | |
24 | 45 | | |
25 | 46 | | |
26 | | - | |
| 47 | + | |
27 | 48 | | |
28 | 49 | | |
29 | 50 | | |
30 | 51 | | |
31 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
32 | 63 | | |
33 | 64 | | |
34 | 65 | | |
35 | 66 | | |
36 | 67 | | |
37 | 68 | | |
38 | 69 | | |
| 70 | + | |
39 | 71 | | |
40 | 72 | | |
41 | 73 | | |
| |||
62 | 94 | | |
63 | 95 | | |
64 | 96 | | |
65 | | - | |
| 97 | + | |
66 | 98 | | |
67 | 99 | | |
68 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments