diff --git a/AGENTS.md b/AGENTS.md index d84c43a346..075ebdad66 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ examples// ← Generated SDK output (checked in for verificat example.php ← Entry point: regenerates all SDKs from specs ``` -**Supported SDKs:** PHP, Web, Node, CLI, Ruby, Python, Dart, Flutter, React Native, Go, Swift, Apple, DotNet, Android, Kotlin, Unity, REST, GraphQL, Rust, AgentSkills, CursorPlugin, ClaudePlugin, CodexPlugin +**Supported SDKs:** PHP, Web, Node, CLI, Ruby, Python, Dart, Flutter, React Native, Go, Swift, Apple, DotNet, Android, Kotlin, Unity, REST, GraphQL, Rust, Skills, CursorPlugin, ClaudePlugin, CodexPlugin ## Primary Workflows @@ -158,7 +158,7 @@ Pass as first argument to generate only that SDK: | `kotlin` | Kotlin | `examples/kotlin/` | | `graphql` | GraphQL | `examples/graphql/` | | `rust` | Rust | `examples/rust/` | -| `agent-skills` | AgentSkills | `examples/agent-skills/` | +| `skills` | Skills | `examples/skills/` | | `cursor-plugin` | CursorPlugin | `examples/cursor-plugin/` | | `claude-plugin` | ClaudePlugin | `examples/claude-plugin/` | | `codex-plugin` | CodexPlugin | `examples/codex-plugin/` | diff --git a/README.md b/README.md index 24e0dc319e..1d0e3b077a 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ require_once 'vendor/autoload.php'; use Appwrite\Spec\StaticSpec; use Appwrite\SDK\SDK; -use Appwrite\SDK\Language\AgentSkills; +use Appwrite\SDK\Language\Skills; $spec = new StaticSpec( title: 'Appwrite', @@ -92,14 +92,14 @@ $spec = new StaticSpec( licenseURL: 'https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE', ); -$sdk = new SDK(new AgentSkills(), $spec); +$sdk = new SDK(new Skills(), $spec); $sdk ->setName('Appwrite') ->setVersion('1.9.x') ; -$sdk->generate(__DIR__ . '/examples/agent-skills'); +$sdk->generate(__DIR__ . '/examples/skills'); ``` ## Linting Twig Templates @@ -146,7 +146,7 @@ Examples: php example.php web client php example.php node server php example.php cli console -php example.php agent-skills +php example.php skills ``` ### Client SDKs @@ -181,7 +181,7 @@ php example.php agent-skills | CLI | `cli` | Node.js 20 and Bun 1.3.11 in CI | [NPM Coding Style] | NPM, Bun, native binaries | `examples/cli/` | | REST examples | `rest` | N/A | Markdown | N/A | `examples/REST/` | | GraphQL | `graphql` | N/A | GraphQL | N/A | `examples/graphql/` | -| Agent Skills | `agent-skills` | N/A | Markdown | N/A | `examples/agent-skills/` | +| Skills | `skills` | N/A | Markdown | N/A | `examples/skills/` | | Cursor Plugin | `cursor-plugin` | N/A | Markdown | N/A | `examples/cursor-plugin/` | | Claude Plugin | `claude-plugin` | N/A | Markdown | N/A | `examples/claude-plugin/` | diff --git a/example.php b/example.php index 8a49c3e4eb..b6aa1320fb 100644 --- a/example.php +++ b/example.php @@ -25,7 +25,7 @@ use Appwrite\SDK\Language\Kotlin; use Appwrite\SDK\Language\ReactNative; use Appwrite\SDK\Language\Unity; -use Appwrite\SDK\Language\AgentSkills; +use Appwrite\SDK\Language\Skills; use Appwrite\SDK\Language\ClaudePlugin; use Appwrite\SDK\Language\CodexPlugin; use Appwrite\SDK\Language\CursorPlugin; @@ -148,7 +148,36 @@ function buildStaticSpec(): StaticSpec { } $version = Config::VERSION; - $speclessSDKs = ['agent-skills', 'cursor-plugin', 'claude-plugin', 'codex-plugin']; + $sdkTargets = [ + 'php', + 'unity', + 'web', + 'node', + 'cli', + 'ruby', + 'python', + 'dart', + 'flutter', + 'react-native', + 'go', + 'swift', + 'apple', + 'dotnet', + 'rest', + 'android', + 'kotlin', + 'graphql', + 'skills', + 'cursor-plugin', + 'claude-plugin', + 'codex-plugin', + 'rust', + ]; + if ($requestedSdk && !in_array($requestedSdk, $sdkTargets)) { + throw new Exception("Unsupported SDK target: $requestedSdk"); + } + + $speclessSDKs = ['skills', 'cursor-plugin', 'claude-plugin', 'codex-plugin']; $needsSpec = !$requestedSdk || !in_array($requestedSdk, $speclessSDKs); $spec = ''; @@ -347,11 +376,11 @@ function buildStaticSpec(): StaticSpec { $sdk->generate(__DIR__ . '/examples/graphql'); } - // Agent Skills - if (!$requestedSdk || $requestedSdk === 'agent-skills') { - $sdk = new SDK(new AgentSkills(), buildStaticSpec()); + // Skills + if (!$requestedSdk || $requestedSdk === 'skills') { + $sdk = new SDK(new Skills(), buildStaticSpec()); configureSDK($sdk); - $sdk->generate(__DIR__ . '/examples/agent-skills'); + $sdk->generate(__DIR__ . '/examples/skills'); } // Cursor Plugin @@ -384,6 +413,7 @@ function buildStaticSpec(): StaticSpec { } catch (Throwable $exception) { echo 'Error: ' . $exception->getMessage() . ' on ' . $exception->getFile() . ':' . $exception->getLine() . "\n"; + exit(1); } echo "Example SDKs generated successfully\n"; diff --git a/src/SDK/Language/ClaudePlugin.php b/src/SDK/Language/ClaudePlugin.php index ecf53a5687..1099ca130c 100644 --- a/src/SDK/Language/ClaudePlugin.php +++ b/src/SDK/Language/ClaudePlugin.php @@ -6,7 +6,7 @@ use Override; -class ClaudePlugin extends AgentSkills +class ClaudePlugin extends Skills { #[Override] protected string $skillDestination = 'skills/%s/SKILL.md'; @@ -63,7 +63,7 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'CHANGELOG.md', - 'template' => 'agent-skills/CHANGELOG.md.twig', + 'template' => 'skills/CHANGELOG.md.twig', ]; $files[] = [ diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php index 8ee9cfa9af..5bbe727d50 100644 --- a/src/SDK/Language/CodexPlugin.php +++ b/src/SDK/Language/CodexPlugin.php @@ -6,7 +6,7 @@ use Override; -class CodexPlugin extends AgentSkills +class CodexPlugin extends Skills { #[Override] public function getName(): string @@ -37,7 +37,7 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', - 'template' => 'agent-skills/' . $lang . '.md.twig', + 'template' => 'skills/' . $lang . '.md.twig', ]; } @@ -86,7 +86,7 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'CHANGELOG.md', - 'template' => 'agent-skills/CHANGELOG.md.twig', + 'template' => 'skills/CHANGELOG.md.twig', ]; $files[] = [ diff --git a/src/SDK/Language/CursorPlugin.php b/src/SDK/Language/CursorPlugin.php index c39eb0ccd6..3480654dac 100644 --- a/src/SDK/Language/CursorPlugin.php +++ b/src/SDK/Language/CursorPlugin.php @@ -6,7 +6,7 @@ use Override; -class CursorPlugin extends AgentSkills +class CursorPlugin extends Skills { #[Override] public function getName(): string diff --git a/src/SDK/Language/AgentSkills.php b/src/SDK/Language/Skills.php similarity index 89% rename from src/SDK/Language/AgentSkills.php rename to src/SDK/Language/Skills.php index 4866f06bee..9893bb2516 100644 --- a/src/SDK/Language/AgentSkills.php +++ b/src/SDK/Language/Skills.php @@ -6,7 +6,7 @@ use Appwrite\SDK\Language; use Twig\TwigFilter; -class AgentSkills extends Language +class Skills extends Language { protected array $skillLanguages = [ 'typescript', @@ -27,7 +27,7 @@ class AgentSkills extends Language public function getName(): string { - return 'AgentSkills'; + return 'Skills'; } public function getKeywords(): array @@ -95,7 +95,7 @@ protected function getSkillFiles(): array $files[] = [ 'scope' => 'default', 'destination' => \sprintf($this->skillDestination, $lang), - 'template' => 'agent-skills/' . $lang . '.md.twig', + 'template' => 'skills/' . $lang . '.md.twig', ]; } @@ -109,19 +109,19 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'README.md', - 'template' => 'agent-skills/README.md.twig', + 'template' => 'skills/README.md.twig', ]; $files[] = [ 'scope' => 'default', 'destination' => 'CHANGELOG.md', - 'template' => 'agent-skills/CHANGELOG.md.twig', + 'template' => 'skills/CHANGELOG.md.twig', ]; $files[] = [ 'scope' => 'default', 'destination' => 'LICENSE', - 'template' => 'agent-skills/LICENSE.twig', + 'template' => 'skills/LICENSE.twig', ]; return $files; diff --git a/templates/cli/lib/commands/init.ts b/templates/cli/lib/commands/init.ts index 2c5ce0aad2..b6bd00e49a 100644 --- a/templates/cli/lib/commands/init.ts +++ b/templates/cli/lib/commands/init.ts @@ -252,7 +252,7 @@ const installInitProjectSkills = async (): Promise => { } } catch (e) { const msg = e instanceof Error ? e.message : String(e); - error(`Failed to install agent skills: ${msg}`); + error(`Failed to install skills: ${msg}`); hint(`You can install them later with '${EXECUTABLE_NAME} init skill'.`); } }; @@ -573,7 +573,7 @@ const initSkill = async (): Promise => { process.chdir(localConfig.configDirectoryPath); const cwd = process.cwd(); - log("Fetching available Appwrite agent skills ..."); + log("Fetching available Appwrite skills ..."); const { skills, tempDir } = fetchAvailableSkills(); try { @@ -1089,7 +1089,7 @@ init init .command("skill") .alias("skills") - .description("Install Appwrite agent skills for AI coding agents") + .description("Install Appwrite skills for AI coding agents") .action(actionRunner(initSkill)); init diff --git a/templates/cli/lib/parser.ts b/templates/cli/lib/parser.ts index 2a56f368f9..93857bc62d 100644 --- a/templates/cli/lib/parser.ts +++ b/templates/cli/lib/parser.ts @@ -849,7 +849,7 @@ export const commandDescriptions: Record = { avatars: `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`, databases: `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`, "tables-db": `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`, - init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and agent skills in ${SDK_TITLE}.`, + init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and skills in ${SDK_TITLE}.`, push: `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`, run: `The run command allows you to run the project locally to allow easy development and quick debugging.`, functions: `The functions command allows you to view, create, and manage your Cloud Functions.`, diff --git a/templates/cli/lib/utils.ts b/templates/cli/lib/utils.ts index 6ce4728a4c..9480110abc 100644 --- a/templates/cli/lib/utils.ts +++ b/templates/cli/lib/utils.ts @@ -919,9 +919,9 @@ export function isCloud(): boolean { return hostname.endsWith("appwrite.io"); } -// --- Agent Skills helpers --- +// --- Skills helpers --- -const SKILLS_REPO = "https://github.com/appwrite/agent-skills"; +const SKILLS_REPO = "https://github.com/appwrite/skills"; const LANGUAGE_MARKERS: Record = { typescript: [ diff --git a/templates/agent-skills/CHANGELOG.md.twig b/templates/skills/CHANGELOG.md.twig similarity index 100% rename from templates/agent-skills/CHANGELOG.md.twig rename to templates/skills/CHANGELOG.md.twig diff --git a/templates/agent-skills/LICENSE.twig b/templates/skills/LICENSE.twig similarity index 100% rename from templates/agent-skills/LICENSE.twig rename to templates/skills/LICENSE.twig diff --git a/templates/agent-skills/README.md.twig b/templates/skills/README.md.twig similarity index 100% rename from templates/agent-skills/README.md.twig rename to templates/skills/README.md.twig diff --git a/templates/agent-skills/base/frontmatter.md.twig b/templates/skills/base/frontmatter.md.twig similarity index 100% rename from templates/agent-skills/base/frontmatter.md.twig rename to templates/skills/base/frontmatter.md.twig diff --git a/templates/agent-skills/cli.md.twig b/templates/skills/cli.md.twig similarity index 99% rename from templates/agent-skills/cli.md.twig rename to templates/skills/cli.md.twig index 65e8b275e2..a50d2360ca 100644 --- a/templates/agent-skills/cli.md.twig +++ b/templates/skills/cli.md.twig @@ -1,7 +1,7 @@ {% set lang = 'cli' %} {% set langName = 'CLI' %} {% set langDescription %}{{ spec.title }} {{ langName }} skill. Use when managing {{ spec.title }} projects from the command line. Covers installation, login, project initialization, multi-file project configuration, deploying functions/sites/tables/buckets/teams/webhooks/topics, flag-based list queries, non-interactive CI/CD mode, and generating type-safe SDKs.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} diff --git a/templates/agent-skills/dart.md.twig b/templates/skills/dart.md.twig similarity index 99% rename from templates/agent-skills/dart.md.twig rename to templates/skills/dart.md.twig index 1ba7e4f15e..98fd5dc079 100644 --- a/templates/agent-skills/dart.md.twig +++ b/templates/skills/dart.md.twig @@ -1,7 +1,7 @@ {% set lang = 'dart' %} {% set langName = 'Dart' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building Flutter apps (mobile, web, desktop) or server-side Dart applications with {{ spec.title }}. Covers client-side auth (email, OAuth), database queries, file uploads with native file handling, real-time subscriptions, and server-side admin via API keys for user management, database administration, storage, and functions.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/dotnet.md.twig b/templates/skills/dotnet.md.twig similarity index 99% rename from templates/agent-skills/dotnet.md.twig rename to templates/skills/dotnet.md.twig index dee2bd478c..83ad3b8064 100644 --- a/templates/agent-skills/dotnet.md.twig +++ b/templates/skills/dotnet.md.twig @@ -1,7 +1,7 @@ {% set lang = 'dotnet' %} {% set langName = '.NET' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side C# or .NET applications with {{ spec.title }}, including ASP.NET and Blazor integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/go.md.twig b/templates/skills/go.md.twig similarity index 99% rename from templates/agent-skills/go.md.twig rename to templates/skills/go.md.twig index 7565221948..d90bd0f9c9 100644 --- a/templates/agent-skills/go.md.twig +++ b/templates/skills/go.md.twig @@ -1,7 +1,7 @@ {% set lang = 'go' %} {% set langName = 'Go' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side Go applications with {{ spec.title }}. Covers user management, database/table CRUD, file storage, and functions via API keys. Uses per-service packages and functional options pattern.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/kotlin.md.twig b/templates/skills/kotlin.md.twig similarity index 99% rename from templates/agent-skills/kotlin.md.twig rename to templates/skills/kotlin.md.twig index ee09951d52..dd1e70d024 100644 --- a/templates/agent-skills/kotlin.md.twig +++ b/templates/skills/kotlin.md.twig @@ -1,7 +1,7 @@ {% set lang = 'kotlin' %} {% set langName = 'Kotlin' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building native Android apps or server-side Kotlin/JVM backends with {{ spec.title }}. Covers client-side auth (email, OAuth with Activity integration), database queries, file uploads, real-time subscriptions with coroutine support, and server-side admin via API keys for user management, database administration, storage, and functions.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/php.md.twig b/templates/skills/php.md.twig similarity index 99% rename from templates/agent-skills/php.md.twig rename to templates/skills/php.md.twig index 7979ad0e1d..721987df7e 100644 --- a/templates/agent-skills/php.md.twig +++ b/templates/skills/php.md.twig @@ -1,7 +1,7 @@ {% set lang = 'php' %} {% set langName = 'PHP' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side PHP applications with {{ spec.title }}, including Laravel and Symfony integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/python.md.twig b/templates/skills/python.md.twig similarity index 99% rename from templates/agent-skills/python.md.twig rename to templates/skills/python.md.twig index ab36d5c4ad..9207a00695 100644 --- a/templates/agent-skills/python.md.twig +++ b/templates/skills/python.md.twig @@ -1,7 +1,7 @@ {% set lang = 'python' %} {% set langName = 'Python' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side Python applications with {{ spec.title }}, including Django, Flask, and FastAPI integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/ruby.md.twig b/templates/skills/ruby.md.twig similarity index 99% rename from templates/agent-skills/ruby.md.twig rename to templates/skills/ruby.md.twig index d671c704d6..d1eff0f3b3 100644 --- a/templates/agent-skills/ruby.md.twig +++ b/templates/skills/ruby.md.twig @@ -1,7 +1,7 @@ {% set lang = 'ruby' %} {% set langName = 'Ruby' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side Ruby applications with {{ spec.title }}, including Rails and Sinatra integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/rust.md.twig b/templates/skills/rust.md.twig similarity index 99% rename from templates/agent-skills/rust.md.twig rename to templates/skills/rust.md.twig index a1a9cfb6b3..7563eaf6e5 100644 --- a/templates/agent-skills/rust.md.twig +++ b/templates/skills/rust.md.twig @@ -1,7 +1,7 @@ {% set lang = 'rust' %} {% set langName = 'Rust' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building server-side Rust applications with {{ spec.title }}. Covers async client setup with API keys, user management, TablesDB database/table/row operations, file storage, function executions, permissions, queries, and error handling. Uses the crates.io `{{ spec.title | caseLower }}` package and Tokio.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/swift.md.twig b/templates/skills/swift.md.twig similarity index 99% rename from templates/agent-skills/swift.md.twig rename to templates/skills/swift.md.twig index c787f43e38..42b8f11e46 100644 --- a/templates/agent-skills/swift.md.twig +++ b/templates/skills/swift.md.twig @@ -1,7 +1,7 @@ {% set lang = 'swift' %} {% set langName = 'Swift' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building native iOS, macOS, watchOS, or tvOS apps, or server-side Swift applications with {{ spec.title }}. Covers client-side auth (email, OAuth), database queries, file uploads, real-time subscriptions with async/await, and server-side admin via API keys for user management, database administration, storage, and functions.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK diff --git a/templates/agent-skills/typescript.md.twig b/templates/skills/typescript.md.twig similarity index 99% rename from templates/agent-skills/typescript.md.twig rename to templates/skills/typescript.md.twig index c0f0e7a9b8..15deabff84 100644 --- a/templates/agent-skills/typescript.md.twig +++ b/templates/skills/typescript.md.twig @@ -1,7 +1,7 @@ {% set lang = 'typescript' %} {% set langName = 'TypeScript' %} {% set langDescription %}{{ spec.title }} {{ langName }} SDK skill. Use when building browser-based JavaScript/TypeScript apps, React Native mobile apps, or server-side Node.js/Deno backends with {{ spec.title }}. Covers client-side auth (email, OAuth, anonymous), database queries, file uploads, real-time subscriptions, and server-side admin via API keys for user management, database administration, storage, and functions.{% endset %} -{{ include('agent-skills/base/frontmatter.md.twig') }} +{{ include('skills/base/frontmatter.md.twig') }} # {{ spec.title }} {{ langName }} SDK