You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The outline command MUST scan all `.md` files in the skill's source directory and extract headings.
39
39
40
+
**Options:**
41
+
42
+
| Option | Description |
43
+
|--------|-------------|
44
+
|`--level <n>`| Maximum heading level to include (1-6, default: unlimited) |
45
+
46
+
When `--level` is provided, the command MUST only output headings with level ≤ n. For example, `--level 2` shows only `#` and `##` headings.
47
+
40
48
**Output format:**
41
49
The command MUST output a structured list of headings with:
42
50
- Heading level (1-6)
@@ -59,14 +67,35 @@ references/advanced.md
59
67
## Performance
60
68
```
61
69
70
+
With `--level 2`:
71
+
```
72
+
SKILL.md
73
+
# Skill Name
74
+
## Getting Started
75
+
## API Reference
76
+
references/advanced.md
77
+
# Advanced Topics
78
+
## Performance
79
+
```
80
+
62
81
*Since: v0.1.0*
63
82
64
83
### [RFC-0002:C-SHOW] Show Command (Normative) <aid="rfc-0002c-show"></a>
65
84
66
-
**Syntax:**`skc show <skill> --section "<heading>" [--file <path>]`
85
+
**Syntax:**`skc show <skill> --section "<heading>" [--file <path>] [--max-lines <n>]`
67
86
68
87
The show command MUST locate the specified heading and return its content.
69
88
89
+
**Options:**
90
+
91
+
| Option | Description |
92
+
|--------|-------------|
93
+
|`--file <path>`| Limit search to specific file |
94
+
|`--max-lines <n>`| Maximum lines to return (default: unlimited) |
95
+
96
+
When `--max-lines` is provided, the command MUST truncate output to the first n lines. If content is truncated, the command MUST append a line:
97
+
`... (N more lines)`
98
+
70
99
**Heading matching:**
71
100
- Matching MUST be case-insensitive
72
101
- Leading/trailing whitespace MUST be trimmed
@@ -87,17 +116,26 @@ If no heading matches, the command MUST exit with a non-zero status and a clear
87
116
88
117
### [RFC-0002:C-OPEN] Open Command (Normative) <aid="rfc-0002c-open"></a>
89
118
90
-
**Syntax:**`skc open <skill> <path>`
119
+
**Syntax:**`skc open <skill> <path> [--max-lines <n>]`
91
120
92
121
The open command MUST return the contents of the specified file.
93
122
123
+
**Options:**
124
+
125
+
| Option | Description |
126
+
|--------|-------------|
127
+
|`--max-lines <n>`| Maximum lines to return (default: unlimited) |
128
+
129
+
When `--max-lines` is provided, the command MUST truncate output to the first n lines. If content is truncated, the command MUST append a line:
130
+
`... (N more lines)`
131
+
94
132
**Path validation:**
95
133
- The path MUST be relative to the skill source root
96
134
- The path MUST NOT contain `..` sequences that escape the skill root
97
135
- The path MUST refer to a file (not a directory)
98
136
99
137
**Content:**
100
-
The command MUST return the file contents as-is without transformation.
138
+
The command MUST return the file contents as-is without transformation (except for `--max-lines` truncation).
101
139
102
140
**File type:**
103
141
The `open` command is NOT restricted to `.md` files. It can retrieve any file within the skill source directory. This enables retrieval of search results from non-`.md` files (e.g., `.txt`).
@@ -53,6 +53,9 @@ Returns access counts grouped by calling directory (CWD). Each entry includes th
53
53
**`errors`** — Failed lookups
54
54
Returns a list of failed access attempts. Each entry includes the requested target, command type, error message, and count.
55
55
56
+
**`search`** — Search query breakdown
57
+
Returns a list of search queries ordered by frequency (descending). Ties MUST be ordered by query text ascending. Each entry includes the query string and count. This enables understanding which search terms agents use most frequently.
58
+
56
59
The default query type MUST be `summary`.
57
60
58
61
*Since: v0.1.0*
@@ -159,6 +162,15 @@ All analytics responses MUST conform to a JSON schema for interoperability with
159
162
]
160
163
```
161
164
165
+
`search`:
166
+
```json
167
+
[
168
+
{"query": "authentication", "count": 25},
169
+
{"query": "error handling", "count": 18},
170
+
{"query": "api", "count": 12}
171
+
]
172
+
```
173
+
162
174
The JSON output MUST be valid JSON. Field order is not significant.
Copy file name to clipboardExpand all lines: gov/rfc/RFC-0002/clauses/C-OPEN.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,6 @@
3
3
"title": "Open Command",
4
4
"kind": "normative",
5
5
"status": "active",
6
-
"text": "**Syntax:** `skc open <skill> <path>`\n\nThe open command MUST return the contents of the specified file.\n\n**Path validation:**\n- The path MUST be relative to the skill source root\n- The path MUST NOT contain `..` sequences that escape the skill root\n- The path MUST refer to a file (not a directory)\n\n**Content:**\nThe command MUST return the file contents as-is without transformation.\n\n**File type:**\nThe `open` command is NOT restricted to `.md` files. It can retrieve any file within the skill source directory. This enables retrieval of search results from non-`.md` files (e.g., `.txt`).\n\n**Path safety:**\nThe command MUST reject any path that would resolve outside the skill source directory after canonicalization. See [[RFC-0005:C-CODES]] for error E012.\n\n**No match:**\nIf the file does not exist, the command MUST exit with error E021 per [[RFC-0005:C-CODES]].",
6
+
"text": "**Syntax:** `skc open <skill> <path> [--max-lines <n>]`\n\nThe open command MUST return the contents of the specified file.\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `--max-lines <n>` | Maximum lines to return (default: unlimited) |\n\nWhen `--max-lines` is provided, the command MUST truncate output to the first n lines. If content is truncated, the command MUST append a line:\n`... (N more lines)`\n\n**Path validation:**\n- The path MUST be relative to the skill source root\n- The path MUST NOT contain `..` sequences that escape the skill root\n- The path MUST refer to a file (not a directory)\n\n**Content:**\nThe command MUST return the file contents as-is without transformation (except for `--max-lines` truncation).\n\n**File type:**\nThe `open` command is NOT restricted to `.md` files. It can retrieve any file within the skill source directory. This enables retrieval of search results from non-`.md` files (e.g., `.txt`).\n\n**Path safety:**\nThe command MUST reject any path that would resolve outside the skill source directory after canonicalization. See [[RFC-0005:C-CODES]] for error E012.\n\n**No match:**\nIf the file does not exist, the command MUST exit with error E021 per [[RFC-0005:C-CODES]].",
0 commit comments