fa-mcp-sdk 0.4.51 → 0.4.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,364 @@
1
+ ---
2
+ name: feature-generator
3
+ description: >-
4
+ Command-only META-SKILL (invoked explicitly, no auto-trigger). Produces an exhaustive,
5
+ self-sufficient prompt for an AI CLI (Claude Code) to implement a feature turnkey.
6
+ Thinks first (Karpathy-style), inspects real code via Read/Grep/Glob, finds reusable
7
+ functions and packages, designs the minimal sufficient solution, drafts a plan, code
8
+ examples, and testing scenario. Universal for any fa-mcp-sdk project.
9
+ disable-model-invocation: true
10
+ argument-hint: "[feature description | path to task file]"
11
+ allowed-tools: Read, Grep, Glob, Bash(git *), Bash(yarn *), Bash(npm *), Bash(node *), Bash(ls *), Bash(cat *)
12
+ ---
13
+
14
+ # feature-generator — META-SKILL for generating prompts for an AI CLI
15
+
16
+ ## Essence
17
+
18
+ You **do NOT write code**. You generate a **self-sufficient prompt for an AI CLI**, which will then:
19
+
20
+ - study the code itself,
21
+ - design the solution itself,
22
+ - implement it itself,
23
+ - test it itself.
24
+
25
+ This is a **META-skill** (agent-building agent). Your output is a clean prompt, not an
26
+ implementation. You do not touch any code in the target repository.
27
+
28
+ ## How to invoke
29
+
30
+ **Command-only.** The skill is **never auto-invoked by the model** — `disable-model-invocation`
31
+ is set to `true`. Runs solely when the operator explicitly calls it (e.g. `/feature-generator`
32
+ or the equivalent UI invocation). Ignore any implicit triggers from phrasing in user messages.
33
+
34
+ ## When to use
35
+
36
+ - The operator describes a feature/functionality but does not write code themselves.
37
+ - A production-ready prompt is needed to hand off to Claude Code / another AI agent.
38
+
39
+ ## Core principles (Karpathy-style, think-before-code)
40
+
41
+ 1. **Think before code.** Architecture first, implementation second. Do not rush to code.
42
+ 2. **Simplicity first.** KISS / YAGNI / DRY — the minimal sufficient solution. No speculative features.
43
+ 3. **Surgical changes.** Touch only what is required. Do not "improve" adjacent code.
44
+ 4. **Goal-driven.** Every step has a verifiable success criterion.
45
+ 5. **Anti-hallucination.** Do not invent files, functions, or APIs. Only what actually exists in
46
+ the code (verified via Read/Grep/Glob).
47
+ 6. **Surface assumptions.** Explicitly mark anything inferred on behalf of the operator as
48
+ `ASSUMPTION:`.
49
+ 7. **Ask, don't guess.** If anything is ambiguous — stop, name the ambiguity, ask.
50
+
51
+ ## Input
52
+
53
+ The operator passes via `$ARGUMENTS`:
54
+
55
+ - a free-form feature description, OR
56
+ - a path to a file with the description (`task.md`, issue dump from a tracker, dialog excerpt).
57
+
58
+ If `$ARGUMENTS` is empty — request a feature description. Do not infer requirements on the
59
+ operator's behalf. If the project uses an issue tracker (Jira/Linear/GitHub Issues) — ask for
60
+ the task ID and reference it in the final prompt.
61
+
62
+ ## Pipeline
63
+
64
+ ### STEP 1 — Understanding
65
+
66
+ Extract from the input:
67
+
68
+ - **Goal** — one sentence: what the user gets in the end.
69
+ - **SDK components** — which layers are affected: `tool`, `prompt`, `resource`, `config`, `auth`,
70
+ `transport` (STDIO/HTTP/SSE), REST endpoint, CLI script, tests, documentation.
71
+ - **Input / expected output** — for features with an API or MCP tool: request format → response
72
+ format.
73
+ - **Constraints** — performance, security, compatibility, deadline, dependencies.
74
+ - **Ambiguities** — enumerate them explicitly.
75
+
76
+ If ambiguities exist — ask the operator clarifying questions **before** analyzing the code.
77
+ If the operator says "decide yourself" — record the decision as `ASSUMPTION:`.
78
+
79
+ ### STEP 2 — Codebase Discovery
80
+
81
+ **Real Read/Grep/Glob only. No guesses.**
82
+
83
+ Baseline input reads (universal for fa-mcp-sdk projects):
84
+
85
+ - `CLAUDE.md` — project rules, commands, protocols.
86
+ - `package.json` — dependencies, scripts, `fa-mcp-sdk` version, package manager in use.
87
+ - `README.md` — general context.
88
+ - `tsconfig.json` — TypeScript settings (`strict`, `moduleResolution`, `paths`).
89
+ - `FA-MCP-SDK-DOC/` (if present) — framework documentation; entry point
90
+ `00-FA-MCP-SDK-index.md`, then by topic: `02-1-tools-and-api.md`,
91
+ `02-2-prompts-and-resources.md`, `03-configuration.md`, `04-authentication.md`,
92
+ `06-utilities.md`, `07-testing-and-operations.md`.
93
+ - `config/default.yaml` (+ `config/local.yaml` if present) — current configuration.
94
+ - `src/start.ts` (or equivalent) — entry point; how `McpServerData` is assembled and
95
+ `initMcpServer()` is called.
96
+
97
+ Then — targeted by the feature's topic:
98
+
99
+ - `src/tools/` — if the feature adds/changes an MCP tool: find similar tools, learn the pattern
100
+ (`ToolWithHandler`, `inputSchema`, `annotations`, `handler`).
101
+ - `src/prompts/`, `src/resources/` — if the feature concerns prompts/resources.
102
+ - `src/lib/` — common utilities: HTTP client, logger, errors, cache, concurrency.
103
+ - `src/_types_/` (or `src/types/`) — domain types, `CustomAppConfig`.
104
+ - `tests/` — test layout (STDIO/HTTP), existing helpers, emulators.
105
+ - `scripts/` — auxiliary scripts that might be reused.
106
+
107
+ Identify and document:
108
+
109
+ 1. **Reusable artifacts** — functions/classes/types that already solve adjacent problems.
110
+ For each, cite `path/to/file.ts:<line>` and describe what it does.
111
+ 2. **Similar features/tools** — the implementation pattern to be replicated (do not reinvent).
112
+ 3. **Dependencies in `package.json`** — what is already installed and solves adjacent tasks.
113
+ Do not pull new npm packages without necessity.
114
+ 4. **SDK extension points** — which `fa-mcp-sdk` exports to use: `initMcpServer`, `appConfig`,
115
+ `formatToolResult`, `ToolExecutionError`, types `ToolWithHandler`, `IToolHandlerParams`,
116
+ `ITransportContext`, etc.
117
+ 5. **Configuration** — which new fields are needed in `config/default.yaml`, whether mapping in
118
+ `config/custom-environment-variables.yaml` is required, how to type them in `CustomAppConfig`.
119
+ 6. **Authentication / authorization** — if the feature introduces an endpoint or tool requiring
120
+ permissions, cross-check with `webServer.auth` and `jiraHeadersAuthValidator`-style patterns.
121
+ 7. **Duplication risks** — where logic might get duplicated; how to avoid it.
122
+
123
+ The step's output is a "Reusable Artifacts" section, e.g.
124
+ `src/lib/http-client.ts:42 — createHttpClient(): use for all requests with per-request auth`.
125
+
126
+ ### STEP 3 — Architecture Design
127
+
128
+ Apply **multi-role thinking**:
129
+
130
+ - **Architect**: system integrity, module boundaries, how the feature fits the SDK architecture
131
+ (tool vs prompt vs resource vs REST endpoint vs lib). Abstraction selection.
132
+ - **Senior dev**: correctness, typing, error handling, idempotency, concurrency, performance,
133
+ transport compatibility (STDIO/HTTP/SSE).
134
+ - **QA**: edge cases, failure modes, regressions, observability (logs, metrics).
135
+
136
+ Describe:
137
+
138
+ - The minimal sufficient solution (KISS).
139
+ - Which **existing** abstractions are reused, which **new** ones are introduced — and why.
140
+ - If alternatives exist — briefly list them with a justification for the chosen variant.
141
+ - Data flow: `input → validation → action → formatting → output`.
142
+ - SDK patterns: tool handler via `ToolWithHandler`, per-request context (`httpClient`, `logger`,
143
+ `mcpRequestHeaders`), response via `formatToolResult`, errors via `ToolExecutionError`.
144
+
145
+ Explicit prohibitions:
146
+
147
+ - Do not invent SDK methods/exports that do not exist. Cross-check with `FA-MCP-SDK-DOC/`.
148
+ - Do not add "for the future" (YAGNI). Only what is required now.
149
+ - Do not introduce a new npm dependency if the same task is solved by an existing one.
150
+
151
+ ### STEP 4 — Implementation Plan
152
+
153
+ Table: each row is one file, one action.
154
+
155
+ ```
156
+ <path/to/file> — <create | modify | delete> — <what exactly we do, one line>
157
+ ```
158
+
159
+ Under each row — 2–5 specific bullets: which function, where exactly, with what signature.
160
+
161
+ Group by layers in dependency order:
162
+
163
+ 1. Types (`src/_types_/*.ts`)
164
+ 2. Configuration (`config/*.yaml`, `src/bootstrap/*.ts`)
165
+ 3. Utilities / lib (`src/lib/*.ts`)
166
+ 4. Tool / prompt / resource / REST handler (`src/tools/**/*.ts` or `src/rest/*.ts`)
167
+ 5. Registration in `src/start.ts` (if needed)
168
+ 6. Tests (`tests/**`)
169
+ 7. Documentation (`CLAUDE.md`, `README.md`, `FA-MCP-SDK-DOC/*` — only if the feature genuinely
170
+ requires it)
171
+
172
+ For each "create", reference an **existing template file** (file:line) whose pattern must be
173
+ replicated. For each "modify" and "delete", verify via Read/Glob that the file actually exists.
174
+
175
+ ### STEP 5 — Code Examples
176
+
177
+ Concrete TypeScript snippets:
178
+
179
+ - Strict typing, no `any`, no stubs, no `TODO`/`FIXME`.
180
+ - Signatures of new functions/classes.
181
+ - Interfaces/DTOs with TSDoc on every field.
182
+ - Tool-handler skeleton following the project pattern:
183
+
184
+ ```ts
185
+ import type { ToolWithHandler, ToolContext } from '../../_types_/tool.js';
186
+
187
+ export const <tool_name>: ToolWithHandler = {
188
+ name: '<tool_name>',
189
+ description: '...',
190
+ inputSchema: { type: 'object', properties: { /* ... */ }, required: [/* ... */] },
191
+ annotations: { title: '...', readOnlyHint: <bool>, destructiveHint: <bool> },
192
+ handler: async (args, ctx: ToolContext) => { /* ... */ },
193
+ };
194
+ ```
195
+
196
+ - YAML config fragment and matching typing in `CustomAppConfig`.
197
+ - SQL / migrations — only if the project actually uses a DB and the feature requires it.
198
+
199
+ File names, imports (`.js` extensions for ESM), comment style — as used in the project
200
+ (cross-check existing files and `CLAUDE.md`).
201
+
202
+ ### STEP 6 — Testing Strategy
203
+
204
+ Describe:
205
+
206
+ - **Unit tests** — which functions to cover; cases happy + edge + error.
207
+ - **Integration tests** — if the project provides an MCP test runner
208
+ (`tests/mcp/<project>.js`, STDIO/HTTP transports) — describe scenarios for those mechanisms.
209
+ - **Agent Tester / Headless API** — if the feature changes a tool and the project has an Agent
210
+ Tester (`/agent-tester/api/chat/test`): describe expected LLM behavior (which tool it picks,
211
+ with what arguments, how it formulates the answer).
212
+ - **Manual checks** — `yarn build && yarn start`, then HTTP (curl/PowerShell) or an MCP client;
213
+ command + expected output.
214
+ - **Edge cases** — empty input, invalid values, missing external service, concurrent calls,
215
+ limit overflow, network failure, 401/403/5xx.
216
+ - **Response format** — structure of the success and error responses of the tool/API.
217
+
218
+ Each test case: "action → expected result". Numbered.
219
+
220
+ ### STEP 7 — Execution Instructions
221
+
222
+ Commands with expected output. **Check `package.json`** to use the correct package manager
223
+ (`yarn` vs `npm`) and correct script names. Typical set:
224
+
225
+ ```bash
226
+ <yarn|npm run> lint # expect: 0 errors
227
+ <yarn|npm run> typecheck # expect: 0 errors
228
+ <yarn|npm run> build # expect: dist/ compiled
229
+ <yarn|npm> test # expect: all tests pass
230
+ <yarn|npm> start # expect: server boots, tools registered
231
+ ```
232
+
233
+ Plus a smoke test of the feature itself: a concrete curl / MCP request / STDIO call with
234
+ expected response.
235
+
236
+ ### STEP 8 — Success Criteria
237
+
238
+ Binary checklist:
239
+
240
+ - [ ] Tool `<name>` (or endpoint/prompt/resource) is registered and visible in the tools list.
241
+ - [ ] Unit and integration tests are added and passing.
242
+ - [ ] Lint + typecheck green.
243
+ - [ ] New config fields are documented (`config/default.yaml` + `CLAUDE.md`, where appropriate).
244
+ - [ ] No duplication with existing code (explicitly list what was reused).
245
+ - [ ] All enumerated edge cases are covered by tests.
246
+ - [ ] Observability: logs/errors are informative, no secrets leaked.
247
+
248
+ ## Multi-agent review (internal check before release)
249
+
250
+ Run the result through three roles:
251
+
252
+ **🏗️ Architect check**
253
+ - Does the feature fit the SDK architecture without distortions?
254
+ - Are existing abstractions reused?
255
+ - Are there any extra layers / premature abstractions?
256
+
257
+ **👨‍💻 Senior dev check**
258
+ - Is the code strictly typed; are errors handled via `ToolExecutionError` / typed classes?
259
+ - Any race conditions, leaks, unhandled rejections?
260
+ - ESM imports with `.js` extensions? Project style followed?
261
+
262
+ **🧪 QA check**
263
+ - Are all edge cases covered by tests?
264
+ - Are there tests for errors, not just the happy path?
265
+ - How does the feature behave when external dependencies are missing (network, DB, auth service)?
266
+
267
+ If any check fails — rework the prompt and only then release it.
268
+
269
+ ## Skill output
270
+
271
+ The operator's response consists of two parts + mandatory saving to a file.
272
+
273
+ ### Mandatory saving of the result to a file
274
+
275
+ **ALWAYS** after generation, save the result (Part A + Part B in full, exactly as it goes to the
276
+ operator) into a **markdown file in the repository root**.
277
+
278
+ - File name: `prop-<short-descriptive-name>.md`
279
+ - `<short-descriptive-name>` — kebab-case, 2–6 English words capturing the feature's essence.
280
+ Examples: `prop-oauth2-token-refresh.md`, `prop-config-env-override.md`,
281
+ `prop-bulk-comment-tool.md`.
282
+ - If a file with that name already exists — append a numeric suffix `-2`, `-3`, … **without
283
+ overwriting**.
284
+ - File content — identical to what is printed in chat: Part A → separator → Part B
285
+ (including the heading `# === PROMPT FOR AI CLI — …`).
286
+ - In the operator reply, explicitly state the path to the saved file.
287
+
288
+ ### Part A — brief summary for the operator
289
+
290
+ - **Goal** (one sentence)
291
+ - **Expanded problem statement** (2–5 lines)
292
+ - **SDK components and affected layers** (tool/prompt/config/auth/...)
293
+ - **3–5 key architectural decisions** (with justification)
294
+ - **Reusable artifacts** (list with `file:line` paths)
295
+ - **Explicit assumptions** (if any)
296
+ - **Open questions** (if any remain)
297
+
298
+ ### Part B — self-sufficient prompt for the AI CLI
299
+
300
+ Separate with an explicit heading:
301
+
302
+ ```
303
+ # === PROMPT FOR AI CLI — <TICKET-ID | FEATURE-SLUG>: <title> ===
304
+ ```
305
+
306
+ The prompt contains exactly 15 sections:
307
+
308
+ 1. **Context** — goal, components, affected layers.
309
+ 2. **Mandatory input reads** — list of files "read before starting":
310
+ `CLAUDE.md`, `package.json`, `FA-MCP-SDK-DOC/*.md` (if present), `config/default.yaml`,
311
+ `src/start.ts`, + targeted files by topic.
312
+ 3. **Preconditions** — system state, access, dependencies, environment variables.
313
+ 4. **Functional requirements** — numbered list of "what must work".
314
+ 5. **Non-functional requirements** — performance, security, logging, compatibility
315
+ (if critical — different transports / API versions), concurrency.
316
+ 6. **Workflow** — step-by-step "who → to whom → what → result".
317
+ 7. **Branches and errors** — explicit deviation cases and how they are handled
318
+ (via `ToolExecutionError`, HTTP codes, structured logs).
319
+ 8. **Interfaces** — tool `inputSchema` / REST signature / DTOs with sample payloads.
320
+ 9. **Data changes** — migrations/DDL, if the feature uses a DB; otherwise
321
+ "not required — feature without DB".
322
+ 10. **Change plan** — table "file → action → what we do" (from STEP 4).
323
+ 11. **Code examples** — concrete snippets (from STEP 5), with file headers and TSDoc.
324
+ 12. **Code standard** — short extract of project rules from `CLAUDE.md` + key SDK rules:
325
+ ESM imports with `.js` extension, use `appConfig` instead of reading config directly,
326
+ response via `formatToolResult`, strict typing.
327
+ 13. **Test cases** — numbered "action → expected result" (from STEP 6).
328
+ 14. **Execution instructions** — commands with expected outcomes (from STEP 7).
329
+ 15. **Success criteria** — checklist (from STEP 8).
330
+
331
+ Hard rules for the prompt:
332
+
333
+ - The prompt **does not reference** this skill. No phrases like "as said in the skill" or
334
+ "per the instructions above".
335
+ - Do not leave `TODO`/`FIXME`, stubs, "code example omitted", `any`, empty sections.
336
+ - If a section is not applicable — state it explicitly: "not required — <one-line reason>".
337
+ - All paths — relative to the repository root, POSIX separators (`/`).
338
+ - The prompt must read as a standalone spec — without knowledge that it was produced by a skill.
339
+
340
+ ## Anti-bullshit mode (hard prohibitions)
341
+
342
+ - ❌ Inventing files, functions, exports, SDK methods. Only what is verified via Read/Grep/Glob
343
+ and/or documented in `FA-MCP-SDK-DOC/`.
344
+ - ❌ Vague wording like "implement correctly", "handle properly". Specifics only: what, where, how.
345
+ - ❌ "Bonus features" — do not add what was not asked for (YAGNI).
346
+ - ❌ `any`, stubs, `throw new Error('Not implemented')`, `// TODO: ...`.
347
+ - ❌ Suggesting to rewrite adjacent modules if not asked (Surgical changes).
348
+ - ❌ Hardcoding secrets, URLs, credentials — only via `appConfig` / ENV.
349
+ - ✅ All disputable decisions — EXPLICITLY as `ASSUMPTION:` with rollback possibility.
350
+
351
+ ## Quality gate before release (mandatory checklist)
352
+
353
+ - [ ] Part B contains all 15 sections, or an explicit "not required — …" with justification.
354
+ - [ ] Every cited source file actually exists (verified via Read/Glob).
355
+ - [ ] Every reusable function is cited with a `file:line` path.
356
+ - [ ] No references to "see the skill" / "as agreed earlier" / "per our conversation".
357
+ - [ ] Code examples are compilable: types imported, no `any`, TSDoc present, correct
358
+ `.js` extensions in ESM imports.
359
+ - [ ] Execution commands match `package.json` (correct package manager and script names).
360
+ - [ ] Tests cover edge cases and errors, not just the happy path.
361
+ - [ ] All three reviews passed: Architect, Senior dev, QA.
362
+ - [ ] Result saved to `prop-<kebab-name>.md` in the repository root; path reported to the operator.
363
+
364
+ If at least one item fails — improve the prompt, then release.
@@ -76,25 +76,81 @@ Same as `agent_prompt` prompt. **MIME:** text/plain
76
76
  **Option B: Environment Variables**
77
77
 
78
78
 
79
- ## Claude Desktop Setup
79
+ ## Usage with AI CLIs
80
80
 
81
- Add to `claude_desktop_config.json`:
81
+ The server exposes an HTTP MCP endpoint at `http[s]://<host[:port]>/mcp`. Authentication (when enabled in
82
+ `config/default.yaml` → `webServer.auth`) is passed via the standard `Authorization` header — most commonly a
83
+ JWT Bearer token generated by the `/gen-jwt` skill or by `node scripts/generate-jwt.js`.
84
+
85
+ ### With Claude Code
86
+
87
+ Add to `~\.claude.json`:
82
88
 
83
89
  ```json
84
90
  {
85
91
  "mcpServers": {
86
92
  "{{project.name}}": {
87
- "command": "node",
88
- "args": [
89
- "<path-to-project>/mcp-staff-db/dist/src/index.js"
90
- ],
91
- "env": {
93
+ "type": "http",
94
+ "url": "http[s]://<host[:port]>/mcp",
95
+ "headers": {
96
+ "Authorization": "Bearer <jwt-token>"
92
97
  }
93
98
  }
94
99
  }
95
100
  }
96
101
  ```
97
102
 
103
+ ### With Claude Desktop
104
+
105
+ Add to your Claude Desktop configuration (`claude_desktop_config.json`):
106
+
107
+ ```json
108
+ {
109
+ "mcpServers": {
110
+ "{{project.name}}": {
111
+ "command": "npx",
112
+ "args": [
113
+ "-y",
114
+ "mcp-remote@latest",
115
+ "http[s]://<host[:port]>/mcp",
116
+ "--header",
117
+ "Authorization: Bearer <jwt-token>",
118
+ "--allow-http",
119
+ "--transport",
120
+ "http-only"
121
+ ]
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### With Qwen Code
128
+
129
+ Add to `~\.qwen\settings.json`:
130
+
131
+ ```json
132
+ {
133
+ "mcpServers": {
134
+ "{{project.name}}": {
135
+ "command": "npx",
136
+ "args": [
137
+ "-y",
138
+ "mcp-remote@latest",
139
+ "http[s]://<host[:port]>/mcp",
140
+ "--header",
141
+ "Authorization: Bearer <jwt-token>",
142
+ "--allow-http",
143
+ "--transport",
144
+ "http-only"
145
+ ]
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ > For STDIO transport (local Claude Desktop integration without an HTTP server), run
152
+ > `node <path-to-project>/dist/src/start.js stdio` — see `CLAUDE.md` for details.
153
+
98
154
  ## HTTP Mode Endpoints
99
155
 
100
156
  - **/** - Home page
@@ -104,22 +160,15 @@ Add to `claude_desktop_config.json`:
104
160
 
105
161
  ## Claude Code Skills
106
162
 
107
- ### `/upgrade-guide`
163
+ The project ships with custom skills in `.claude/skills/`:
108
164
 
109
- Generates a migration guide for upgrading `fa-mcp-sdk` to the latest (or specified) version. Analyzes config changes, template diffs, new exports, and breaking changes, then saves a step-by-step guide to `upgrade-guide-<old>-to-<new>.md`.
165
+ | Command | Description |
166
+ |----------------------|-------------------------------------------------------------------------|
167
+ | `/gen-jwt` | Generate JWT tokens for MCP server authentication |
168
+ | `/upgrade-guide` | Generate migration guide for `fa-mcp-sdk` upgrades |
169
+ | `/feature-generator` | Turn a feature description into a self-sufficient prompt for an AI CLI |
110
170
 
111
- By default versions and commit hashes refer to THIS project — the skill looks up which SDK version was used in each project commit/tag. To pass SDK references directly, mention "SDK" explicitly.
112
-
113
- ```
114
- /upgrade-guide # current SDK → latest SDK
115
- /upgrade-guide 1.2.3 # project version 1.2.3 → latest SDK
116
- /upgrade-guide 1.2.3 1.2.7 # project versions
117
- /upgrade-guide abc1234 def5678 # project commits
118
- /upgrade-guide от версии 0.1.30 SDK # SDK versions directly → latest SDK
119
- /upgrade-guide от версии 0.4.30 SDK до 0.5.0 SDK # SDK versions directly
120
- /upgrade-guide от комита sdk abc1234 до комита sdk def5678 # SDK commits directly
121
- /upgrade-guide 1.2.3 1.2.7 на русском
122
- ```
171
+ Details, launch modes, and examples: [SKILL_README.md](SKILL_README.md)
123
172
 
124
173
  ## Security
125
174
 
@@ -0,0 +1,99 @@
1
+ # Skills (Claude Code)
2
+
3
+ Skills are specialized instructions for Claude Code, located in `.claude/skills/`. They are invoked inside Claude Code
4
+ chat — either by a `/command` or automatically by trigger phrases.
5
+
6
+ ## Available Skills
7
+
8
+ ### `/gen-jwt` — JWT Token Generator
9
+
10
+ Generates JWT tokens for MCP server authentication via `scripts/generate-jwt.js`.
11
+
12
+ - **Launch**: by command `/gen-jwt` or by trigger phrases ("jwt", "token for user", "токен для", "сгенерируй токен")
13
+ - **Interactive**: asks for missing required params (username, TTL), then optional (request ID, IP restriction,
14
+ service name, extra `key=value` pairs)
15
+ - **Parameters**:
16
+ - `username` (REQUIRED) — user the token is issued to
17
+ - `ttl` (REQUIRED) — lifetime in format `<N>s | <N>m | <N>d | <N>y`
18
+ - `request` (optional) — ticket/issue ID (e.g. `REQ-123`, `JIRA-456`)
19
+ - `ip` (optional) — allowed IPs / CIDR masks, comma-separated
20
+ - `service` (optional) — service name, passed as `-s <name>` flag
21
+ - any additional `key=value` pairs — appended to the token payload
22
+ - **Output**: token string, payload table, saved to `<YYYYMMDD-HHmmss>-jwt.txt` in the project root
23
+
24
+ **Examples:**
25
+
26
+ ```
27
+ /gen-jwt admin 30d
28
+ /gen-jwt vpupkin 1y request=REQ-12345 ip=10.0.0.0/24,192.168.1.100
29
+ /gen-jwt svc-account 8d service=my-mcp
30
+ /gen-jwt sergey на год привязать к заявке REQ-555
31
+ ```
32
+
33
+ ---
34
+
35
+ ### `/upgrade-guide` — FA-MCP-SDK Upgrade Guide
36
+
37
+ Generates a migration guide for upgrading the `fa-mcp-sdk` dependency in this project. Analyzes diffs in:
38
+
39
+ - `config/*.yaml` — new/removed/changed keys and defaults (correlates `default.yaml`, `_local.yaml`, `local.yaml`)
40
+ - `cli-template/` — `package.json` (new deps only), `tsconfig.json`, `eslint.config.js`, `CLAUDE.md`, `deploy/`,
41
+ `.claude/skills/`, `.run/` (from `r/`)
42
+ - `scripts/` — new or updated SDK utilities (excluding SDK-internal `copy-static.js`, `publish.sh`)
43
+ - `dist/core/index.js` — added/removed/renamed exports and breaking type changes
44
+ - project `src/` — imports and config keys affected by the upgrade
45
+
46
+ By default, versions and commit hashes refer to **this project** — the skill resolves them to the pinned SDK version
47
+ via `git show <ref>:package.json`. To reference SDK versions/commits directly, mention "SDK" explicitly.
48
+
49
+ - **Launch**: by command `/upgrade-guide` or by trigger phrases ("обновить sdk", "upgrade sdk", "migration guide",
50
+ "обновление fa-mcp-sdk")
51
+ - **Output**: `upgrade-guide-<old>-to-<new>.md` in project root
52
+
53
+ **Examples:**
54
+
55
+ ```
56
+ /upgrade-guide # current SDK -> latest SDK
57
+ /upgrade-guide 1.2.3 # project version 1.2.3 -> latest SDK
58
+ /upgrade-guide 1.2.3 1.2.7 # project versions
59
+ /upgrade-guide abc1234 def5678 # project commits
60
+ /upgrade-guide from SDK version 0.1.30 # SDK versions directly -> latest SDK
61
+ /upgrade-guide from SDK version 0.1.30 to SDK version 0.5.0 # SDK versions directly
62
+ /upgrade-guide from SDK commit abc1234 to SDK commit def5678 # SDK commits directly
63
+ /upgrade-guide 1.2.3 1.2.7 in Russian # output guide in Russian
64
+ /upgrade-guide 1.2.3 1.2.7 на русском # same, via Russian phrasing
65
+ ```
66
+
67
+ ---
68
+
69
+ ### `/feature-generator` — Feature Prompt Generator
70
+
71
+ A **META-skill**: turns a feature description into a self-sufficient prompt for an AI CLI (Claude Code or another
72
+ agent) to implement the feature turnkey. The skill itself does NOT write feature code — it produces the prompt.
73
+
74
+ What it does:
75
+
76
+ - Inspects real code via `Read` / `Grep` / `Glob` — **no guessing**
77
+ - Identifies reusable functions, classes, types, and existing npm dependencies (with `file:line` citations)
78
+ - Designs the minimal sufficient solution (KISS / YAGNI / DRY), applying multi-role review
79
+ (Architect / Senior dev / QA)
80
+ - Drafts a change plan (file → action → what exactly), code examples with TypeScript typing,
81
+ and a testing scenario
82
+ - Outputs a Part A brief summary + Part B self-sufficient 15-section prompt ready to hand off to an AI CLI
83
+
84
+ Characteristics:
85
+
86
+ - **Launch**: **command-only** via `/feature-generator`. Has `disable-model-invocation: true` — does NOT activate
87
+ on trigger phrases or implicit mentions
88
+ - **Input**: free-form feature description OR path to a file with the description (e.g. `task.md`, ticket dump)
89
+ - **Output**: file `prop-<kebab-name>.md` in repository root. If the file already exists, a numeric suffix is
90
+ appended (`-2`, `-3`, …) — the existing file is never overwritten
91
+
92
+ **Examples:**
93
+
94
+ ```
95
+ /feature-generator Add a tool for batch-processing customer records across a project
96
+ /feature-generator task.md
97
+ /feature-generator REQ-1234: implement webhook callback receiver for external events
98
+ /feature-generator Add OAuth2 token refresh logic to the HTTP client
99
+ ```
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@modelcontextprotocol/sdk": "^1.29.0",
52
52
  "dotenv": "^17.4.1",
53
- "fa-mcp-sdk": "^0.4.51"
53
+ "fa-mcp-sdk": "^0.4.52"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/express": "^5.0.6",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fa-mcp-sdk",
3
3
  "productName": "FA MCP SDK",
4
- "version": "0.4.51",
4
+ "version": "0.4.52",
5
5
  "description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
6
6
  "type": "module",
7
7
  "main": "dist/core/index.js",