/tsed:tsed-clifrom Ts.ED
Scaffolds Ts.ED v8 projects and generates controllers, services, middleware, models, and more via CLI or MCP server. Reads project preferences from package.json.
Ships in Ts.ED. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate boilerplate with the CLI so file names, directories and class names match the project preferences. Hand-write a file only when no template fits.
References, loaded on demand:
Preferences live under the tsed key of the application's package.json, for example "tsed": {"convention": "conv_default", "architecture": "arc_default", "platform": "express", "runtime": "node", "packageManager": "npm"}.
| Key | Values | Effect |
|---|---|---|
convention | conv_default, angular | File name: ProductController.ts vs product.controller.ts |
architecture | arc_default, feature | src/controllers/... vs a folder taken from the name (users/User) |
platform | express, koa, fastify | Adapter package to import |
runtime | node, vite, bun, bun-vite, babel, webpack | Dev/build scripts |
packageManager | npm, yarn, yarn_berry, pnpm, bun | Install command |
ProductController); only the file name changes.tsed.packageManager means the project is not initialized for the CLI. Do not generate; go to section 3 or ask the user.tsed is connected (tools set-workspace, generate-file, ...), use section 3.npx tsed ... inside a project that has @tsed/cli in devDependencies.{
"mcpServers": {
"tsed": {
"command": "npx",
"args": ["-y", "-p", "@tsed/cli", "tsed", "mcp"]
}
}
}
tsed mcp --http serves streamable HTTP on POST /mcp, port PORT (default 3000).npx -y @tsed/cli mcp: it fails on a first install because the package name is not the binary name.tsed-mcp binary. It does not exist.set-workspace with {cwd} (absolute path preferred). It resolves the nearest package.json and returns cwd, pkg and preferences.tsed://project/info and check isInitialized. preferences there omits architecture; read it from pkg.tsed.architecture.tsed://init/options (instructions plus the JSON schema).init-project with {cwd, platform, architecture, convention, features, runtime, packageManager, projectName?, tsedVersion?}.list-templates with an optional {search} to find the template id.get-template with {id} to read the extra properties schema.generate-file with {id, name, properties}. Example: {"id": "controller", "name": "Product", "properties": {"route": "/products", "directory": "rest"}}.files and symbolPath from the result, then edit the generated file.tsed://server/info reports the CLI version and whether the workspace is a project; use it for diagnostics.| Error code | Returned by | Fix |
|---|---|---|
E_CWD_NOT_FOUND | set-workspace | Confirm the folder with the user, then init-project with that cwd |
E_CWD_NOT_SET | generate-file | Call set-workspace first |
E_PROJECT_NOT_INITIALIZED | generate-file | Wrong workspace, or run init-project |
E_PROJECT_ALREADY_INITIALIZED | init-project | Use generate-file, or pick another folder |
E_TEMPLATE_UNKNOWN | get-template, generate-file | Take the id from list-templates |
E_ARGS_INVALID | generate-file | Re-read get-template; fix properties (details.errors) |
Do not call init-project without the user's choices. Do not retry a failed tool call with the same arguments.
Global options on every command: -r, --root-dir <path>, --verbose. Run commands non-interactively; an agent cannot answer prompts.
# New project (asks nothing with --skip-prompt)
npx -p @tsed/cli tsed init my-api --skip-prompt --platform express --arch arc_default \
--convention conv_default --runtime node --package-manager npm \
--features doc doc:swagger testing testing:vitest linter linter:oxlint
# Generate: tsed generate|g [type] [name]
npx tsed g controller Product --route /products --directory rest
npx tsed g middleware Auth --middleware-position before
npx tsed g decorator Roles --template-type endpoint
npx tsed template my-template --from new # scaffold .templates/my-template.template.ts
npx tsed add @tsed/cli-plugin-prisma # install a CLI plugin
npx tsed run <command> # run a command from src/bin/index.ts
npx tsed update # interactive version picker
npx tsed dev # Vite runtimes only: watch src/index.ts
npx tsed build # Vite runtimes only: vite build
type and name, plus the template's options, or generate opens a prompt.tsed update always prompts for the target version. Ask the user to run it, or edit the @tsed/* versions in package.json and install.tsed dev and tsed build exist only for the vite and bun-vite runtimes and need vite.config.ts. For other runtimes use the package.json scripts written by tsed init.tsed init-options prints the init JSON schema; use it when the feature list in the reference may be outdated.tsed template <name> --from new (without --from the command prompts). The file lands in .templates/<name>.template.ts..ts file under .templates/ is loaded at startup; a custom template replaces a built-in one with the same id and is labelled (custom).import {defineTemplate} from "@tsed/cli";
import {s} from "@tsed/schema";
export default defineTemplate({
id: "use-case",
label: "Use case",
description: "Create an application use case in src/use-cases.",
fileName: "{{symbolName}}.use-case",
outputDir: "{{srcDir}}/use-cases",
schema: s.object({entity: s.string().description("Entity handled by the use case")}),
render(symbolName, context) {
return `import {Injectable} from "@tsed/di";\n\n@Injectable()\nexport class ${symbolName} {}\n`;
}
});
id, label, outputDir and render are required; description, fileName, ext (default ts, null for none), hidden, preserveCase, preserveDirectory, schema, prompts, hooks, type are optional. render() returns the file content, or undefined to skip the file.schema is what get-template returns and what generate-file validates properties against. Always declare it for templates used by agents..templates/ directory before generating: the project may override controller, service, etc.Depth: https://cli.tsed.dev/llms.txt.
tsed generate service --name Logger and tsed generate template. Both are wrong: the name is the second positional argument, and the command is tsed template.--features is variadic: separate values with spaces, and use full values (doc:swagger, orm:prisma), not swagger or prisma.list-templates returns every visible template when search matches nothing. Check the returned ids instead of assuming a match.server, vitest.config) are not listed but are accepted by get-template and generate-file. Do not regenerate them in an existing project.name equal to prisma forces the prisma.service template.architecture: "feature", the base directory (controllers, services) is dropped; put the feature folder in the name: users/User.passportjs is offered only when the platform is express.tsed-controllers, tsed-di, tsed-middlewares, tsed-models, tsed-exceptions, tsed-testing) before filling it in.package.json tsed preferences read before any file was created.generate-file or tsed generate) for every file type that has a template.init-project or tsed init.npx -y -p @tsed/cli tsed mcp.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tsedio/tsed --plugin tsed13 skills in this plugin
/tsed-configurationConfigure and bootstrap a Ts.ED v8 server - the @Configuration decorator or configuration() on the Server class, PlatformExpress/PlatformKoa/PlatformFastify.bootstrap, server options (mount, middlewares, httpPort, httpsPort, acceptMimes, logger, statics, views, responseFilters, imports), per-platform express/koa/fastify options, and @tsed/config sources (envs, dotenv, json, yaml). Use when editing Server.ts, index.ts or src/config, adding @tsed/config or the extends option, or reading settings with constant(), refValue(), @Constant, @Value or configuration().get()./tsed-controllersWrite Ts.ED v8 HTTP controllers and routes - @Controller paths and nested children, mounting through the `mount` configuration, verb decorators from @tsed/schema, parameter decorators from @tsed/platform-params, typed inputs, response decorators and custom endpoint decorators. Use when adding or fixing a REST endpoint, when a route returns 404 or is shadowed by another route, when @BodyParams/@QueryParams/@PathParams receive a plain object or the wrong type, or when working with @Returns, @Status, @Redirect, @View, @Hidden, @Req/@Res or useDecorators./tsed-diDeclare, inject and scope Ts.ED v8 providers and wire lifecycle hooks - @Injectable, @Module, @Controller, @Inject, the functional API (inject, injectMany, lazyInject, constant, refValue, injectable().factory/asyncFactory/class/value, injector, context, logger), ProviderScope, custom tokens, @tsed/hooks ($on, $emit, $asyncEmit, $alter) and request context. Use when writing services or modules with @tsed/di, fixing InjectionError, "Given token is undefined" or undefined injected properties, choosing a scope, adding $onInit/$onDestroy/$onReady, or replacing registerProvider and other deprecated DI APIs./tsed-docsLocates authoritative Ts.ED v8 documentation and API reference instead of guessing framework APIs. Routes a topic to the right tsed.dev page, its markdown twin, the llms.txt indexes (tsed.dev, cli.tsed.dev, logger.tsed.dev) and the sibling tsed-* skills. Use when working in a project that depends on @tsed/* packages and an import path, decorator (@Controller, @Injectable, @Returns), function (inject, injectable, configuration), option name or error message is uncertain, when an example imports from @tsed/common, or before answering any "how do I ... in Ts.ED" question./tsed-exceptionsHandle errors and shape responses in a Ts.ED v8 application with @tsed/exceptions, exception filters from @tsed/platform-exceptions and response filters from @tsed/platform-response-filter. Use when throwing BadRequest/NotFound/Unauthorized or a custom exception, customizing the JSON error payload, writing a @Catch filter, customizing the 404 ResourceNotFound page, wrapping all responses in an envelope with @ResponseFilter, documenting errors with @Returns(404, NotFound), or debugging responses such as "InternalServerError", AJV_VALIDATION_ERROR or a response filter that is never called./tsed-loggerConfigure and use logging in a Ts.ED v8 application with @tsed/logger v8. Covers logger injection, request-scoped logs with $ctx.logger, the `logger` configuration key, @tsed/platform-log-request, appenders, layouts, JSON logs in production, connectors and custom appenders. Use when working with $log, inject(Logger), logger(), ContextLogger, $log.appenders.set, @Appender, @Layout or any @tsed/logger-* package, or when seeing "Appender ... doesn't exists", "Missing ... layout doesn't exists", duplicated log lines, missing request logs after a v8 upgrade, or an appender ignoring its levels.Other plugins' skills for the same job