@frontmcp/skills 0.0.1 → 1.0.0-beta.11

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.
Files changed (104) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +58 -13
  3. package/catalog/frontmcp-config/SKILL.md +156 -0
  4. package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +5 -0
  5. package/catalog/frontmcp-config/references/configure-auth.md +243 -0
  6. package/catalog/frontmcp-config/references/configure-elicitation.md +183 -0
  7. package/catalog/frontmcp-config/references/configure-http.md +210 -0
  8. package/catalog/frontmcp-config/references/configure-session.md +210 -0
  9. package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +5 -0
  10. package/catalog/frontmcp-config/references/configure-throttle.md +234 -0
  11. package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +5 -0
  12. package/catalog/frontmcp-config/references/configure-transport.md +200 -0
  13. package/catalog/frontmcp-config/references/setup-redis.md +9 -0
  14. package/catalog/frontmcp-config/references/setup-sqlite.md +9 -0
  15. package/catalog/frontmcp-deployment/SKILL.md +152 -0
  16. package/catalog/frontmcp-deployment/references/build-for-browser.md +143 -0
  17. package/catalog/frontmcp-deployment/references/build-for-cli.md +191 -0
  18. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +66 -20
  19. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +218 -0
  20. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +77 -59
  21. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +18 -4
  22. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +69 -36
  23. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +65 -0
  24. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +229 -0
  25. package/catalog/frontmcp-development/SKILL.md +126 -0
  26. package/catalog/frontmcp-development/references/create-adapter.md +170 -0
  27. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +10 -5
  28. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +83 -40
  29. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +62 -15
  30. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +100 -7
  31. package/catalog/frontmcp-development/references/create-plugin.md +506 -0
  32. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +65 -22
  33. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +63 -23
  34. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +148 -26
  35. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +174 -20
  36. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +114 -28
  37. package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +5 -0
  38. package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +5 -0
  39. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +172 -23
  40. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +61 -14
  41. package/catalog/frontmcp-development/references/decorators-guide.md +754 -0
  42. package/catalog/frontmcp-development/references/official-adapters.md +199 -0
  43. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +97 -27
  44. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  45. package/catalog/frontmcp-extensibility/references/vectoriadb.md +289 -0
  46. package/catalog/frontmcp-guides/SKILL.md +420 -0
  47. package/catalog/frontmcp-guides/references/example-knowledge-base.md +641 -0
  48. package/catalog/frontmcp-guides/references/example-task-manager.md +517 -0
  49. package/catalog/frontmcp-guides/references/example-weather-api.md +297 -0
  50. package/catalog/frontmcp-production-readiness/SKILL.md +98 -0
  51. package/catalog/frontmcp-production-readiness/references/common-checklist.md +156 -0
  52. package/catalog/frontmcp-production-readiness/references/production-browser.md +46 -0
  53. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +62 -0
  54. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +61 -0
  55. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +52 -0
  56. package/catalog/frontmcp-production-readiness/references/production-lambda.md +53 -0
  57. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +66 -0
  58. package/catalog/frontmcp-production-readiness/references/production-node-server.md +61 -0
  59. package/catalog/frontmcp-production-readiness/references/production-vercel.md +52 -0
  60. package/catalog/frontmcp-setup/SKILL.md +132 -0
  61. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +280 -0
  62. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +66 -19
  63. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +79 -17
  64. package/catalog/frontmcp-setup/references/project-structure-nx.md +251 -0
  65. package/catalog/frontmcp-setup/references/project-structure-standalone.md +217 -0
  66. package/catalog/frontmcp-setup/references/readme-guide.md +226 -0
  67. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +63 -58
  68. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +60 -82
  69. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +65 -72
  70. package/catalog/frontmcp-testing/SKILL.md +135 -0
  71. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +79 -63
  72. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +5 -0
  73. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +5 -0
  74. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +5 -0
  75. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +5 -0
  76. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +5 -0
  77. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +6 -0
  78. package/catalog/skills-manifest.json +337 -382
  79. package/package.json +2 -2
  80. package/src/index.d.ts +1 -1
  81. package/src/index.js.map +1 -1
  82. package/src/loader.js +0 -1
  83. package/src/loader.js.map +1 -1
  84. package/src/manifest.d.ts +15 -3
  85. package/src/manifest.js +3 -3
  86. package/src/manifest.js.map +1 -1
  87. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  88. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  89. package/catalog/auth/configure-auth/SKILL.md +0 -250
  90. package/catalog/auth/configure-session/SKILL.md +0 -201
  91. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  92. package/catalog/config/configure-http/SKILL.md +0 -167
  93. package/catalog/config/configure-throttle/SKILL.md +0 -189
  94. package/catalog/config/configure-transport/SKILL.md +0 -151
  95. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  96. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  97. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  98. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  99. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  100. package/catalog/development/decorators-guide/SKILL.md +0 -598
  101. package/catalog/plugins/create-plugin/SKILL.md +0 -336
  102. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  103. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  104. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: frontmcp-development
3
+ description: 'Use when you want to create a tool, add a resource, build a prompt, write a provider, implement an adapter, add OpenAPI integration, create a plugin, agent, job, or workflow. The skill for BUILDING any FrontMCP component.'
4
+ tags: [router, development, tools, resources, prompts, agents, skills, guide]
5
+ category: development
6
+ targets: [all]
7
+ bundle: [recommended, minimal, full]
8
+ priority: 10
9
+ visibility: both
10
+ license: Apache-2.0
11
+ metadata:
12
+ docs: https://docs.agentfront.dev/frontmcp/servers/overview
13
+ ---
14
+
15
+ # FrontMCP Development Router
16
+
17
+ Entry point for building MCP server components. This skill helps you find the right development skill based on what you want to build. It does not teach implementation details itself — it routes you to the specific skill that does.
18
+
19
+ ## When to Use This Skill
20
+
21
+ ### Must Use
22
+
23
+ - Starting a FrontMCP development task and unsure which component type to build (tool vs resource vs prompt vs agent)
24
+ - Onboarding to the FrontMCP development model and need an overview of all building blocks
25
+ - Planning a feature that may require multiple component types working together
26
+
27
+ ### Recommended
28
+
29
+ - Looking up the canonical name of a development skill to install or search
30
+ - Comparing component types to decide which fits your use case
31
+ - Understanding how tools, resources, prompts, agents, and skills relate to each other
32
+
33
+ ### Skip When
34
+
35
+ - You already know which component to build (go directly to `create-tool`, `create-resource`, etc.)
36
+ - You need to configure server settings, not build components (see `frontmcp-config`)
37
+ - You need to deploy or build, not develop (see `frontmcp-deployment`)
38
+
39
+ > **Decision:** Use this skill when you need to figure out WHAT to build. Use the specific skill when you already know.
40
+
41
+ ## Scenario Routing Table
42
+
43
+ | Scenario | Skill | Description |
44
+ | -------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- |
45
+ | Expose an executable action that AI clients can call | `create-tool` | Class-based or function-style tools with Zod input/output validation |
46
+ | Expose read-only data via a URI | `create-resource` | Static resources or URI template resources for dynamic data |
47
+ | Create a reusable conversation template or system prompt | `create-prompt` | Prompt entries with arguments and multi-turn message sequences |
48
+ | Build an autonomous AI loop that orchestrates tools | `create-agent` | Agent entries with LLM config, inner tools, and swarm handoff |
49
+ | Register shared services or configuration via DI | `create-provider` | Dependency injection tokens, lifecycle hooks, factory providers |
50
+ | Run a background task with progress and retries | `create-job` | Job entries with attempt tracking, retry config, and progress |
51
+ | Chain multiple jobs into a sequential pipeline | `create-workflow` | Workflow entries that compose jobs with data passing |
52
+ | Write instruction-only AI guidance (no code execution) | `create-skill` | Skill entries with markdown instructions from files, strings, or URLs |
53
+ | Write AI guidance that also orchestrates tools | `create-skill-with-tools` | Skill entries that combine instructions with registered tools |
54
+ | Look up any decorator signature or option | `decorators-guide` | Complete reference for @Tool, @Resource, @Prompt, @Agent, @App, @FrontMcp, and more |
55
+ | Integrate an external API via OpenAPI spec | `official-adapters` | OpenapiAdapter with auth, polling, inline specs, and multiple API composition |
56
+ | Use official plugins (caching, remember, feature flags) | `official-plugins` | Built-in plugins for caching, session memory, approval, and feature flags (dashboard is beta) |
57
+ | Connect to an external data source via a custom adapter | `create-adapter` | Create custom adapters for external data sources |
58
+ | Configure LLM settings for an agent component | `create-agent-llm-config` | Configure LLM settings for agent components |
59
+ | Add will/did/around lifecycle hooks to a plugin | `create-plugin-hooks` | Add lifecycle hooks to plugins (will/did/around) |
60
+ | Annotate tools with client hints for AI clients | `create-tool-annotations` | Add MCP tool annotations for client hints |
61
+ | Define typed output schemas for tool responses | `create-tool-output-schema-types` | Define typed output schemas for tools |
62
+
63
+ ## Recommended Reading Order
64
+
65
+ 1. **`decorators-guide`** — Start here to understand the full decorator landscape
66
+ 2. **`create-tool`** — The most common building block; learn tools first
67
+ 3. **`create-resource`** — Expose data alongside tools
68
+ 4. **`create-prompt`** — Add reusable conversation templates
69
+ 5. **`create-provider`** — Share services across tools and resources via DI
70
+ 6. **`create-agent`** — Build autonomous AI loops (advanced)
71
+ 7. **`create-job`** / **`create-workflow`** — Background processing (advanced)
72
+ 8. **`create-skill`** / **`create-skill-with-tools`** — Author your own skills (meta)
73
+ 9. **`official-adapters`** — Integrate external APIs via OpenAPI specs
74
+ 10. **`official-plugins`** — Add caching, session memory, feature flags, and more
75
+
76
+ ## Cross-Cutting Patterns
77
+
78
+ | Pattern | Applies To | Rule |
79
+ | ----------------- | --------------------------------- | -------------------------------------------------------------------------------------- |
80
+ | Naming convention | Tools | Use `snake_case` for tool names (`get_weather`, not `getWeather`) |
81
+ | Naming convention | Skills, resources | Use `kebab-case` for skill and resource names |
82
+ | File naming | All components | Use `<name>.<type>.ts` pattern (e.g., `fetch-weather.tool.ts`) |
83
+ | DI access | Tools, resources, prompts, agents | Use `this.get(TOKEN)` (throws) or `this.tryGet(TOKEN)` (returns undefined) |
84
+ | Error handling | All components | Use `this.fail(err)` with MCP error classes, not raw `throw` |
85
+ | Input validation | Tools | Always use Zod raw shapes (not `z.object()`) for `inputSchema` |
86
+ | Output validation | Tools | Always define `outputSchema` to prevent data leaks |
87
+ | Registration | All components | Add to `tools`, `resources`, `prompts`, `agents`, etc. arrays in `@App` or `@FrontMcp` |
88
+ | Test files | All components | Use `.spec.ts` extension, never `.test.ts` |
89
+
90
+ ## Common Patterns
91
+
92
+ | Pattern | Correct | Incorrect | Why |
93
+ | ----------------------- | --------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------- |
94
+ | Choosing component type | Tool for actions, Resource for data, Prompt for templates | Using a tool to return static data | Each type has protocol-level semantics; misuse confuses AI clients |
95
+ | Component registration | Register in `@App` arrays, compose apps in `@FrontMcp` | Register tools directly in `@FrontMcp` without an `@App` | Apps provide modularity; direct registration bypasses app-level hooks |
96
+ | Shared logic | Extract to a `@Provider` and inject via DI | Duplicate code across multiple tools | Providers are testable, lifecycle-managed, and scoped |
97
+ | Complex orchestration | Use `@Agent` with inner tools | Chain tool calls manually in a single tool | Agents handle LLM loops, retries, and tool selection automatically |
98
+ | Background work | Use `@Job` with retry config | Run long tasks inside a tool's `execute()` | Jobs have progress tracking, attempt awareness, and timeout handling |
99
+
100
+ ## Verification Checklist
101
+
102
+ ### Architecture
103
+
104
+ - [ ] Each component type matches its semantic purpose (action=tool, data=resource, template=prompt)
105
+ - [ ] Shared services use `@Provider` with DI tokens, not module-level singletons
106
+ - [ ] Components are registered in `@App` arrays, apps composed in `@FrontMcp`
107
+
108
+ ### Development Workflow
109
+
110
+ - [ ] Files follow `<name>.<type>.ts` naming convention
111
+ - [ ] Each component has a corresponding `.spec.ts` test file
112
+ - [ ] `decorators-guide` consulted for unfamiliar decorator options
113
+
114
+ ## Troubleshooting
115
+
116
+ | Problem | Cause | Solution |
117
+ | ---------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
118
+ | Unsure which component type to use | Requirements are ambiguous | Check the Scenario Routing Table above; if the action modifies state, use a tool; if it returns data by URI, use a resource |
119
+ | Component not discovered at runtime | Not registered in `@App` or `@FrontMcp` arrays | Add to the appropriate array (`tools`, `resources`, `prompts`, etc.) |
120
+ | DI token not resolving | Provider not registered in scope | Register the provider in the `providers` array of the same `@App` |
121
+ | Need both AI guidance and tool execution | Used `create-skill` but need tools too | Switch to `create-skill-with-tools` which combines instructions with registered tools |
122
+
123
+ ## Reference
124
+
125
+ - [Server Overview](https://docs.agentfront.dev/frontmcp/servers/overview)
126
+ - Related skills: `create-tool`, `create-resource`, `create-prompt`, `create-agent`, `create-provider`, `create-job`, `create-workflow`, `create-skill`, `create-skill-with-tools`, `decorators-guide`, `official-adapters`, `official-plugins`
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: create-adapter
3
+ description: Build adapters that generate MCP tools and resources from external sources automatically
4
+ ---
5
+
6
+ # Creating Custom Adapters
7
+
8
+ Build adapters that automatically generate MCP tools, resources, and prompts from external sources — databases, GraphQL schemas, proprietary APIs, or any definition format.
9
+
10
+ ## When to Use This Skill
11
+
12
+ ### Must Use
13
+
14
+ - Integrating a non-OpenAPI source (GraphQL, gRPC, database schema) that should generate MCP tools automatically
15
+ - Building a reusable adapter that converts external definitions into tools, resources, or prompts at startup
16
+ - Creating tools dynamically at runtime based on external state or configuration
17
+
18
+ ### Recommended
19
+
20
+ - Wrapping a proprietary internal API that has its own schema format
21
+ - Auto-generating tools from a database schema or config file on server start
22
+ - Building an adapter that polls an external source and refreshes tool definitions periodically
23
+
24
+ ### Skip When
25
+
26
+ - The external API has an OpenAPI/Swagger spec (see `official-adapters`)
27
+ - You need cross-cutting middleware behavior like logging or caching (see `create-plugin`)
28
+ - You are building a single static tool manually (see `create-tool`)
29
+
30
+ > **Decision:** Use this skill when you need to auto-generate MCP tools, resources, or prompts from a non-OpenAPI external source by extending `DynamicAdapter`.
31
+
32
+ ## Step 1: Extend DynamicAdapter
33
+
34
+ ```typescript
35
+ import { DynamicAdapter, type FrontMcpAdapterResponse } from '@frontmcp/sdk';
36
+
37
+ interface MyAdapterOptions {
38
+ endpoint: string;
39
+ apiKey: string;
40
+ }
41
+
42
+ class MyApiAdapter extends DynamicAdapter<MyAdapterOptions> {
43
+ declare __options_brand: MyAdapterOptions;
44
+
45
+ async fetch(): Promise<FrontMcpAdapterResponse> {
46
+ // Fetch definitions from external source
47
+ const res = await globalThis.fetch(this.options.endpoint, {
48
+ headers: { Authorization: `Bearer ${this.options.apiKey}` },
49
+ });
50
+ const schema = await res.json();
51
+
52
+ // Convert to MCP tool definitions
53
+ return {
54
+ tools: schema.operations.map((op: { name: string; description: string; params: Record<string, unknown> }) => ({
55
+ name: op.name,
56
+ description: op.description,
57
+ inputSchema: this.convertParams(op.params),
58
+ execute: async (input: Record<string, unknown>) => {
59
+ return this.callApi(op.name, input);
60
+ },
61
+ })),
62
+ resources: [],
63
+ prompts: [],
64
+ };
65
+ }
66
+
67
+ private convertParams(params: Record<string, unknown>) {
68
+ // Convert external param definitions to Zod schemas
69
+ // ...
70
+ }
71
+
72
+ private async callApi(operation: string, input: Record<string, unknown>) {
73
+ // Call the external API
74
+ // ...
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Step 2: Register
80
+
81
+ ```typescript
82
+ @App({
83
+ name: 'MyApp',
84
+ adapters: [
85
+ MyApiAdapter.init({
86
+ name: 'my-api',
87
+ endpoint: 'https://api.example.com/schema',
88
+ apiKey: process.env.API_KEY!,
89
+ }),
90
+ ],
91
+ })
92
+ class MyApp {}
93
+ ```
94
+
95
+ ## FrontMcpAdapterResponse
96
+
97
+ The `fetch()` method returns tools, resources, and prompts to register:
98
+
99
+ ```typescript
100
+ interface FrontMcpAdapterResponse {
101
+ tools?: AdapterToolDefinition[];
102
+ resources?: AdapterResourceDefinition[];
103
+ prompts?: AdapterPromptDefinition[];
104
+ }
105
+ ```
106
+
107
+ ## Static init()
108
+
109
+ `DynamicAdapter` provides a static `init()` method inherited by all subclasses:
110
+
111
+ ```typescript
112
+ // Usage — no manual instantiation needed
113
+ const adapter = MyApiAdapter.init({
114
+ name: 'my-api', // Required: adapter name (used for tool namespacing)
115
+ endpoint: '...',
116
+ apiKey: '...',
117
+ });
118
+
119
+ // Register in @App
120
+ @App({ adapters: [adapter] })
121
+ ```
122
+
123
+ ## Nx Generator
124
+
125
+ ```bash
126
+ nx generate @frontmcp/nx:adapter my-adapter --project=my-app
127
+ ```
128
+
129
+ Creates a `DynamicAdapter` subclass in `src/adapters/my-adapter.adapter.ts`.
130
+
131
+ ## Common Patterns
132
+
133
+ | Pattern | Correct | Incorrect | Why |
134
+ | ----------------------- | ------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------- |
135
+ | Adapter registration | `MyAdapter.init({ name: 'my-api', ... })` in `adapters` array | `new MyAdapter({ ... })` directly | `init()` returns the proper provider entry for DI wiring |
136
+ | Options branding | `declare __options_brand: MyAdapterOptions;` in adapter class | Omitting the brand declaration | Brand ensures TypeScript infers the correct options type for `init()` |
137
+ | Fetch return type | Return `{ tools: [...], resources: [...], prompts: [...] }` | Returning raw API response without conversion | `fetch()` must return `FrontMcpAdapterResponse` with MCP-compatible definitions |
138
+ | Tool naming | Namespace tools: `name: 'my-api:operation-name'` | Flat names without namespace: `name: 'operation-name'` | Namespacing prevents collisions when multiple adapters are registered |
139
+ | Error handling in fetch | Throw descriptive errors with endpoint info | Silently returning empty arrays on failure | Adapter errors should surface at startup so misconfigurations are caught early |
140
+
141
+ ## Verification Checklist
142
+
143
+ ### Configuration
144
+
145
+ - [ ] Adapter class extends `DynamicAdapter<TOptions>`
146
+ - [ ] `__options_brand` is declared with the correct options type
147
+ - [ ] `fetch()` method is implemented and returns `FrontMcpAdapterResponse`
148
+ - [ ] Adapter is registered via `.init()` in the `adapters` array of `@App`
149
+
150
+ ### Runtime
151
+
152
+ - [ ] Generated tools appear in `tools/list` MCP response
153
+ - [ ] Tool names are namespaced with the adapter name (e.g., `my-api:operationId`)
154
+ - [ ] Generated tools accept valid input and return expected output
155
+ - [ ] Adapter fetch errors produce clear startup error messages
156
+
157
+ ## Troubleshooting
158
+
159
+ | Problem | Cause | Solution |
160
+ | ------------------------------------------ | ----------------------------------------------------------- | -------------------------------------------------------------------------------- |
161
+ | No tools appear after adapter registration | `fetch()` returns empty `tools` array | Verify external source is reachable and response is parsed correctly |
162
+ | TypeScript error on `.init()` options | Missing `__options_brand` declaration | Add `declare __options_brand: MyAdapterOptions;` to the adapter class |
163
+ | Tool input validation fails | `inputSchema` conversion does not produce valid Zod schemas | Verify `convertParams` produces `z.object()` shapes matching the external schema |
164
+ | Duplicate tool name error | Multiple adapters produce tools with the same name | Use unique `name` parameter in `init()` to namespace tools |
165
+ | Adapter not found at runtime | Registered in wrong `@App` or not in `adapters` array | Ensure `.init()` result is in the `adapters` array of the correct `@App` |
166
+
167
+ ## Reference
168
+
169
+ - [Adapter Documentation](https://docs.agentfront.dev/frontmcp/adapters/overview)
170
+ - Related skills: `official-adapters`, `create-plugin`, `create-tool`
@@ -1,13 +1,18 @@
1
+ ---
2
+ name: create-agent-llm-config
3
+ description: Reference for supported LLM provider configurations including Anthropic and OpenAI
4
+ ---
5
+
1
6
  # Agent LLM Configuration Reference
2
7
 
3
- ## Supported Adapters
8
+ ## Supported Providers
4
9
 
5
10
  ### Anthropic
6
11
 
7
12
  ```typescript
8
13
  llm: {
9
- adapter: 'anthropic',
10
- model: 'claude-sonnet-4-20250514',
14
+ provider: 'anthropic', // Any supported provider — 'anthropic', 'openai', etc.
15
+ model: 'claude-sonnet-4-20250514', // Any supported model for the chosen provider
11
16
  apiKey: { env: 'ANTHROPIC_API_KEY' },
12
17
  maxTokens: 4096,
13
18
  }
@@ -17,8 +22,8 @@ llm: {
17
22
 
18
23
  ```typescript
19
24
  llm: {
20
- adapter: 'openai',
21
- model: 'gpt-4o',
25
+ provider: 'openai',
26
+ model: 'gpt-4o', // Any supported model for the chosen provider
22
27
  apiKey: { env: 'OPENAI_API_KEY' },
23
28
  maxTokens: 4096,
24
29
  }
@@ -1,35 +1,35 @@
1
1
  ---
2
2
  name: create-agent
3
- description: Create autonomous AI agents with inner tools, LLM providers, and multi-agent swarms. Use when building agents, configuring LLM adapters, adding inner tools, or setting up agent handoff.
4
- tags: [agent, ai, llm, tools, autonomous]
5
- parameters:
6
- - name: llm-provider
7
- description: LLM provider to use
8
- type: string
9
- default: anthropic
10
- - name: name
11
- description: Agent name
12
- type: string
13
- required: true
14
- examples:
15
- - scenario: Create a code review agent with GitHub tools
16
- expected-outcome: Agent autonomously reviews PRs using inner tools
17
- - scenario: Create a multi-agent swarm for complex workflows
18
- expected-outcome: Agents hand off tasks to each other
19
- priority: 8
20
- visibility: both
21
- license: Apache-2.0
22
- metadata:
23
- docs: https://docs.agentfront.dev/frontmcp/servers/agents
3
+ description: Create autonomous AI agents that use LLM reasoning to plan and invoke inner tools
24
4
  ---
25
5
 
26
6
  # Creating an Autonomous Agent
27
7
 
28
8
  Agents are autonomous AI entities that use an LLM to reason, plan, and invoke inner tools to accomplish goals. In FrontMCP, agents are TypeScript classes that extend `AgentContext`, decorated with `@Agent`, and registered on a `@FrontMcp` server or inside an `@App`.
29
9
 
30
- ## When to Use @Agent vs @Tool
10
+ ## When to Use This Skill
31
11
 
32
- Use `@Agent` when the task requires autonomous reasoning, multi-step planning, or LLM-driven decision making. An agent receives a goal, decides which tools to call, interprets results, and iterates until the goal is met. Use `@Tool` when you need a direct, deterministic function that executes a single action without LLM involvement.
12
+ ### Must Use
13
+
14
+ - Building an autonomous AI entity that uses LLM reasoning to decide which tools to call
15
+ - Orchestrating multi-step workflows where the agent plans, acts, and iterates toward a goal
16
+ - Creating multi-agent swarms with handoff between specialized agents
17
+
18
+ ### Recommended
19
+
20
+ - Performing complex tasks that require chaining multiple inner tools with LLM-driven decisions
21
+ - Implementing structured multi-pass review (security pass, quality pass, synthesis)
22
+ - Composing nested sub-agents with different LLM configs for specialized subtasks
23
+
24
+ ### Skip When
25
+
26
+ - You need a direct, deterministic function that executes a single action (see `create-tool`)
27
+ - You are building a reusable conversation template without autonomous execution (see `create-prompt`)
28
+ - You only need to expose readable data at a URI (see `create-resource`)
29
+
30
+ > **Decision:** Use this skill when the task requires autonomous LLM-driven reasoning, tool invocation, and iterative planning -- not a single deterministic action.
31
+
32
+ ### @Agent vs @Tool Quick Comparison
33
33
 
34
34
  | Aspect | @Agent | @Tool |
35
35
  | --------------- | ------------------------------- | ---------------------------- |
@@ -50,8 +50,8 @@ import { z } from 'zod';
50
50
  name: 'code_reviewer',
51
51
  description: 'Reviews code changes and provides feedback',
52
52
  llm: {
53
- adapter: 'anthropic',
54
- model: 'claude-sonnet-4-20250514',
53
+ provider: 'anthropic', // Any supported provider — 'anthropic', 'openai', etc.
54
+ model: 'claude-sonnet-4-20250514', // Any supported model for the chosen provider
55
55
  apiKey: { env: 'ANTHROPIC_API_KEY' },
56
56
  },
57
57
  inputSchema: {
@@ -110,7 +110,7 @@ The `llm` field is required and configures which LLM provider and model the agen
110
110
  name: 'my_agent',
111
111
  description: 'An agent with LLM config',
112
112
  llm: {
113
- adapter: 'anthropic', // 'anthropic' or 'openai'
113
+ provider: 'anthropic', // 'anthropic' or 'openai'
114
114
  model: 'claude-sonnet-4-20250514',
115
115
  apiKey: { env: 'ANTHROPIC_API_KEY' }, // read from env var
116
116
  },
@@ -122,7 +122,7 @@ The `apiKey` field accepts either an object `{ env: 'ENV_VAR_NAME' }` to read fr
122
122
  ```typescript
123
123
  // OpenAI example
124
124
  llm: {
125
- adapter: 'openai',
125
+ provider: 'openai',
126
126
  model: 'gpt-4o',
127
127
  apiKey: { env: 'OPENAI_API_KEY' },
128
128
  },
@@ -139,7 +139,7 @@ Override `execute()` when you need custom orchestration logic:
139
139
  name: 'structured_reviewer',
140
140
  description: 'Reviews code with a structured multi-pass approach',
141
141
  llm: {
142
- adapter: 'anthropic',
142
+ provider: 'anthropic',
143
143
  model: 'claude-sonnet-4-20250514',
144
144
  apiKey: { env: 'ANTHROPIC_API_KEY' },
145
145
  },
@@ -193,7 +193,7 @@ Use `completion()` for a single LLM call that returns the full response, and `st
193
193
  name: 'summarizer',
194
194
  description: 'Summarizes text using LLM',
195
195
  llm: {
196
- adapter: 'anthropic',
196
+ provider: 'anthropic',
197
197
  model: 'claude-sonnet-4-20250514',
198
198
  apiKey: { env: 'ANTHROPIC_API_KEY' },
199
199
  },
@@ -287,7 +287,7 @@ class PostReviewCommentTool extends ToolContext {
287
287
  name: 'pr_reviewer',
288
288
  description: 'Autonomously reviews GitHub pull requests',
289
289
  llm: {
290
- adapter: 'anthropic',
290
+ provider: 'anthropic',
291
291
  model: 'claude-sonnet-4-20250514',
292
292
  apiKey: { env: 'ANTHROPIC_API_KEY' },
293
293
  },
@@ -315,7 +315,7 @@ Use `exports: { tools: [] }` to expose specific tools that the agent makes avail
315
315
  name: 'data_pipeline',
316
316
  description: 'Data processing pipeline agent',
317
317
  llm: {
318
- adapter: 'openai',
318
+ provider: 'openai',
319
319
  model: 'gpt-4o',
320
320
  apiKey: { env: 'OPENAI_API_KEY' },
321
321
  },
@@ -333,7 +333,7 @@ Use the `agents` array to compose agents from smaller, specialized sub-agents. E
333
333
  @Agent({
334
334
  name: 'security_auditor',
335
335
  description: 'Audits code for security vulnerabilities',
336
- llm: { adapter: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
336
+ llm: { provider: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
337
337
  systemInstructions: 'Focus on OWASP Top 10 vulnerabilities.',
338
338
  tools: [StaticAnalysisTool],
339
339
  })
@@ -342,7 +342,7 @@ class SecurityAuditorAgent extends AgentContext {}
342
342
  @Agent({
343
343
  name: 'performance_auditor',
344
344
  description: 'Audits code for performance issues',
345
- llm: { adapter: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
345
+ llm: { provider: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
346
346
  systemInstructions: 'Focus on time complexity, memory leaks, and N+1 queries.',
347
347
  tools: [ProfilerTool],
348
348
  })
@@ -351,7 +351,7 @@ class PerformanceAuditorAgent extends AgentContext {}
351
351
  @Agent({
352
352
  name: 'code_auditor',
353
353
  description: 'Comprehensive code auditor that delegates to specialized sub-agents',
354
- llm: { adapter: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
354
+ llm: { provider: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
355
355
  inputSchema: {
356
356
  repository: z.string().describe('Repository URL'),
357
357
  branch: z.string().default('main').describe('Branch to audit'),
@@ -372,7 +372,7 @@ Swarm mode enables multi-agent handoff, where agents can transfer control to eac
372
372
  @Agent({
373
373
  name: 'triage_agent',
374
374
  description: 'Triages incoming requests and hands off to specialists',
375
- llm: { adapter: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
375
+ llm: { provider: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
376
376
  inputSchema: {
377
377
  request: z.string().describe('The incoming user request'),
378
378
  },
@@ -391,7 +391,7 @@ class TriageAgent extends AgentContext {}
391
391
  @Agent({
392
392
  name: 'billing_agent',
393
393
  description: 'Handles billing and payment inquiries',
394
- llm: { adapter: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
394
+ llm: { provider: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: { env: 'ANTHROPIC_API_KEY' } },
395
395
  tools: [LookupInvoiceTool, ProcessRefundTool],
396
396
  swarm: {
397
397
  role: 'specialist',
@@ -413,7 +413,7 @@ const QuickSummarizer = agent({
413
413
  name: 'quick_summarizer',
414
414
  description: 'Summarizes text quickly',
415
415
  llm: {
416
- adapter: 'anthropic',
416
+ provider: 'anthropic',
417
417
  model: 'claude-sonnet-4-20250514',
418
418
  apiKey: { env: 'ANTHROPIC_API_KEY' },
419
419
  },
@@ -494,7 +494,7 @@ Protect agents with throttling controls:
494
494
  name: 'expensive_agent',
495
495
  description: 'An agent that performs expensive LLM operations',
496
496
  llm: {
497
- adapter: 'anthropic',
497
+ provider: 'anthropic',
498
498
  model: 'claude-sonnet-4-20250514',
499
499
  apiKey: { env: 'ANTHROPIC_API_KEY' },
500
500
  },
@@ -523,7 +523,7 @@ Agents can include their own providers and plugins for self-contained dependency
523
523
  name: 'database_agent',
524
524
  description: 'Agent that interacts with databases',
525
525
  llm: {
526
- adapter: 'anthropic',
526
+ provider: 'anthropic',
527
527
  model: 'claude-sonnet-4-20250514',
528
528
  apiKey: { env: 'ANTHROPIC_API_KEY' },
529
529
  },
@@ -548,7 +548,7 @@ Agents can include resources and prompts that are available within the agent's s
548
548
  name: 'docs_agent',
549
549
  description: 'Agent that manages documentation',
550
550
  llm: {
551
- adapter: 'anthropic',
551
+ provider: 'anthropic',
552
552
  model: 'claude-sonnet-4-20250514',
553
553
  apiKey: { env: 'ANTHROPIC_API_KEY' },
554
554
  },
@@ -561,3 +561,46 @@ Agents can include resources and prompts that are available within the agent's s
561
561
  })
562
562
  class DocsAgent extends AgentContext {}
563
563
  ```
564
+
565
+ ## Common Patterns
566
+
567
+ | Pattern | Correct | Incorrect | Why |
568
+ | ----------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------- |
569
+ | LLM config | `llm: { provider: 'anthropic', model: '...', apiKey: { env: 'KEY' } }` | `llm: { provider: 'anthropic', apiKey: 'sk-hardcoded' }` | Environment variable references prevent leaking secrets in code |
570
+ | Inner tools vs exported | `tools: [...]` for agent-private; `exports: { tools: [...] }` for MCP-visible | Putting all tools in `tools` and expecting clients to see them | Inner tools are private to the agent; only exported tools appear in MCP listing |
571
+ | Custom execute | Override `execute()` for multi-pass orchestration | Putting all logic in system instructions | Custom `execute()` gives structured control over completion calls and stages |
572
+ | Sub-agents | Use `agents: [SubAgent]` for composition | Calling another agent's `execute()` directly | The `agents` array enables proper lifecycle, scope isolation, and handoff |
573
+ | Swarm handoff | Use `swarm.handoff` with `agent` name and `condition` | Manually routing between agents in `execute()` | Swarm config enables declarative, LLM-driven handoff between agents |
574
+
575
+ ## Verification Checklist
576
+
577
+ ### Configuration
578
+
579
+ - [ ] Agent class extends `AgentContext` and has `@Agent` decorator with `name`, `description`, and `llm`
580
+ - [ ] `inputSchema` is defined with Zod raw shape for input validation
581
+ - [ ] Inner tools in `tools` array are valid `@Tool` classes
582
+ - [ ] Agent is registered in `agents` array of `@App` or `@FrontMcp`
583
+ - [ ] API key uses `{ env: 'VAR_NAME' }` pattern, not hardcoded strings
584
+
585
+ ### Runtime
586
+
587
+ - [ ] Agent appears in MCP tool listing (agents surface as callable tools)
588
+ - [ ] LLM adapter connects successfully to the configured provider
589
+ - [ ] Inner tools are invoked correctly during the agent loop
590
+ - [ ] `this.completion()` and `this.streamCompletion()` return valid responses
591
+ - [ ] Swarm handoff transfers control to the correct specialist agent
592
+
593
+ ## Troubleshooting
594
+
595
+ | Problem | Cause | Solution |
596
+ | ----------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------- |
597
+ | Agent not appearing in tool listing | Not registered in `agents` array | Add agent class to `@App` or `@FrontMcp` `agents` array |
598
+ | LLM authentication error | API key not set or incorrect env variable | Verify the environment variable name in `apiKey: { env: '...' }` is set |
599
+ | Inner tools not being called | Tools not listed in `tools` array of `@Agent` | Add tool classes to the `tools` field in the `@Agent` decorator |
600
+ | Agent times out | No timeout or rate limit configured | Add `timeout: { executeMs: 120_000 }` and `rateLimit` to `@Agent` options |
601
+ | Swarm handoff fails | Target agent name does not match any registered agent | Ensure `handoff.agent` matches the `name` of a registered agent in the same scope |
602
+
603
+ ## Reference
604
+
605
+ - [Agents Documentation](https://docs.agentfront.dev/frontmcp/servers/agents)
606
+ - Related skills: `create-tool`, `create-provider`, `create-prompt`, `create-resource`