Skip to content

Commit d81ea3f

Browse files
cliffhallclaude
andcommitted
fix: tighten six skill statements from Copilot round 4
- testing: the stdio recipe says filesystem takes its allowed directories as arguments, not through env; the opening sentence is grammatical. - client-smoke: the HTTP recipe waits for the listener before connecting. - project-structure: time has no pytest config in pyproject.toml; a helper for everything goes in its feature area, not the workspace root; the closing rule mirrors the whole Maintenance rule (purpose changes, the root README). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 7b15470 commit d81ea3f

3 files changed

Lines changed: 26 additions & 12 deletions

File tree

‎.claude/skills/client-smoke/SKILL.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,17 @@ the URL. The transport is inferred from the path: `/mcp` is Streamable HTTP,
125125

126126
```sh
127127
PORT=3917 node src/everything/dist/index.js streamableHttp &
128+
# Wait for the listener: the server answers before the CLI is pointed at it.
129+
until curl -s -o /dev/null http://localhost:3917/mcp; do sleep 0.2; done
128130
$INSPECT http://localhost:3917/mcp \
129131
--method tools/call --tool-name echo --tool-arg message=over-http --format json
130132
kill %1
131133
```
132134

135+
Without the wait, the CLI can reach the port before the server is listening
136+
and fail with a refused connection. In a separate terminal the equivalent is
137+
waiting for the `listening on port` line on stderr.
138+
133139
A change to a tool, resource or prompt of `everything` is checked over stdio
134140
and Streamable HTTP. Check HTTP+SSE as well when the change touches transport
135141
or session code; it is deprecated but must keep working.

‎.claude/skills/project-structure/SKILL.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ server from them. `/testing` covers what that means for a new test.
6262

6363
```
6464
src/<server>/
65-
├── pyproject.toml dependencies, the console script, pytest config
65+
├── pyproject.toml dependencies, the console script; pytest config in `fetch` and `git`
6666
├── uv.lock, .python-version
6767
├── src/mcp_server_<name>/
6868
│ ├── __init__.py main(): the command-line flags, then asyncio.run(serve(...))
@@ -89,7 +89,8 @@ importable.
8989
| A tool, resource or prompt for `everything` | Its own kebab-case file in `tools/`, `resources/` or `prompts/`, exporting a `register…` function, wired into that directory's `index.ts` |
9090
| A transport for `everything` | `src/everything/transports/`, plus a `case` in `src/everything/index.ts` and a `start:…` script |
9191
| A tool for `filesystem`, `memory` or `sequentialthinking` | A `server.registerTool(...)` call in that server's `index.ts`; the logic it calls goes in `lib.ts` (or the class it extends) so a test can reach it |
92-
| A helper module for a TypeScript server | A kebab-case `.ts` file at the workspace root, imported with the `.js` extension |
92+
| A helper module for `everything` | A kebab-case `.ts` file in the feature area it supports, beside its users (`server/logging.ts`, `server/roots.ts`, `resources/session.ts`), imported with the `.js` extension |
93+
| A helper module for `filesystem`, `memory` or `sequentialthinking` | A kebab-case `.ts` file at the workspace root, imported with the `.js` extension |
9394
| A tool for a Python server | `server.py`: the tool-name enum member (`git`, `time`), the model, the `list_tools` entry, the `call_tool` branch |
9495
| A command-line flag for a Python server | `__init__.py`, passed into `serve()` |
9596
| A test | `/testing` |
@@ -110,6 +111,7 @@ file matches no `prettier --check` glob. Both run in `npm run validate:guards`.
110111
If one fires on a file you added, the fix is to bring the file into the
111112
existing config, not to exclude it.
112113

113-
When a file or directory is added, removed or renamed, the entries that
114-
describe it change in the same PR: the tree in `AGENTS.md`, the server's
115-
`README.md`, and for `everything`, `docs/structure.md`.
114+
When a file or directory is added, removed, renamed or given a different
115+
purpose, every entry that describes it changes in the same PR (`AGENTS.md`,
116+
**Maintenance rules**): the root `README.md`, the server's own `README.md`,
117+
the tree in `AGENTS.md`, and for `everything`, `docs/structure.md`.

‎.claude/skills/testing/SKILL.md‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ disable-model-invocation: false
88

99
The **rules** are in [`AGENTS.md`](../../../AGENTS.md) under **Always test new
1010
or modified code**: new behavior comes with tests, test at the protocol level
11-
where you can, and keep expected error output off the console. This skill is
12-
which harness each server has **today**, how to write a test with it, and which
13-
command runs what.
11+
where you can, and keep expected error output off the console. This skill
12+
explains which harness each server has **today**, how to write a test with it,
13+
and which command runs what.
1414

1515
Driving a running server by hand, with the Inspector or an LLM client, is
1616
`/client-smoke`. It is evidence for a PR, not a substitute for a test.
@@ -139,10 +139,16 @@ await client.close(); // this is what stops the child process
139139
```
140140

141141
`src/sequentialthinking/__tests__/input-schema.test.ts` is the reference.
142-
`stderr: "pipe"` keeps the server's startup banner off the console. Pass a
143-
server's configuration with the transport's `env` option: the child inherits
144-
only the SDK's default safelist (`PATH`, `HOME`, `USER` and the like), not the
145-
other variables of the test process.
142+
`stderr: "pipe"` keeps the server's startup banner off the console.
143+
144+
Give the server what it needs to start. `filesystem` takes its allowed
145+
directories as arguments (`args: [distIndexPath, testDir]`, with `testDir` a
146+
`realpath`-resolved temporary directory, as
147+
`src/filesystem/__tests__/structured-content.test.ts` does); with none, and a
148+
client that offers no Roots, every file operation is refused. Environment
149+
variables such as `MEMORY_FILE_PATH` go in the transport's `env` option: the
150+
child inherits only the SDK's default safelist (`PATH`, `HOME`, `USER` and the
151+
like), not the other variables of the test process.
146152

147153
⚠️ **These tests run the last build, not your edit.** `npm test` does not build.
148154
A test that spawns `dist/index.js` passes or fails on whatever `tsc` last

0 commit comments

Comments
 (0)