diff --git a/app/config/sdks.php b/app/config/sdks.php index 4b6f1d8601..a3088b247b 100644 --- a/app/config/sdks.php +++ b/app/config/sdks.php @@ -270,6 +270,25 @@ return [ 'repoBranch' => 'main', 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/md/CHANGELOG.md'), ], + [ + 'key' => 'agent-skills', + 'name' => 'AgentSkills', + 'version' => '0.1.0', + 'url' => 'https://github.com/appwrite/agent-skills.git', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_SDK_PLATFORM_CONSOLE, + 'prism' => 'agent-skills', + 'source' => \realpath(__DIR__ . '/../sdks/console-agent-skills'), + 'gitUrl' => 'git@github.com:appwrite/agent-skills.git', + 'gitRepoName' => 'agent-skills', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'repoBranch' => 'main', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/agent-skills/CHANGELOG.md'), + ], ], ], diff --git a/composer.lock b/composer.lock index 70f1742418..ec5fe97db7 100644 --- a/composer.lock +++ b/composer.lock @@ -3797,16 +3797,16 @@ }, { "name": "utopia-php/database", - "version": "5.0.2", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "aa80f86f5bf3f0d8c13abd3213bf1649f542d366" + "reference": "94815bfa605282096272625827d0314f9ed99066" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/aa80f86f5bf3f0d8c13abd3213bf1649f542d366", - "reference": "aa80f86f5bf3f0d8c13abd3213bf1649f542d366", + "url": "https://api.github.com/repos/utopia-php/database/zipball/94815bfa605282096272625827d0314f9ed99066", + "reference": "94815bfa605282096272625827d0314f9ed99066", "shasum": "" }, "require": { @@ -3814,10 +3814,10 @@ "ext-mongodb": "*", "ext-pdo": "*", "php": ">=8.4", - "utopia-php/cache": "1.0.*", + "utopia-php/cache": "1.*", "utopia-php/framework": "0.33.*", - "utopia-php/mongo": "0.11.*", - "utopia-php/pools": "1.0.*" + "utopia-php/mongo": "1.*", + "utopia-php/pools": "1.*" }, "require-dev": { "fakerphp/faker": "1.23.*", @@ -3849,9 +3849,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/5.0.2" + "source": "https://github.com/utopia-php/database/tree/5.1.1" }, - "time": "2026-02-08T05:23:42+00:00" + "time": "2026-02-12T11:44:58+00:00" }, { "name": "utopia-php/detector", @@ -4519,16 +4519,16 @@ }, { "name": "utopia-php/mongo", - "version": "0.11.0", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/mongo.git", - "reference": "34bc0cda8ea368cde68702a6fffe2c3ac625398e" + "reference": "45bedf36c2c946ec7a0a3e59b9f12f772de0b01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/mongo/zipball/34bc0cda8ea368cde68702a6fffe2c3ac625398e", - "reference": "34bc0cda8ea368cde68702a6fffe2c3ac625398e", + "url": "https://api.github.com/repos/utopia-php/mongo/zipball/45bedf36c2c946ec7a0a3e59b9f12f772de0b01d", + "reference": "45bedf36c2c946ec7a0a3e59b9f12f772de0b01d", "shasum": "" }, "require": { @@ -4574,9 +4574,9 @@ ], "support": { "issues": "https://github.com/utopia-php/mongo/issues", - "source": "https://github.com/utopia-php/mongo/tree/0.11.0" + "source": "https://github.com/utopia-php/mongo/tree/1.0.0" }, - "time": "2025-10-20T11:11:23+00:00" + "time": "2026-02-12T05:54:06+00:00" }, { "name": "utopia-php/platform", @@ -5389,16 +5389,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.8.28", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4762aa017b28a3a7e4e53da6e193d0c196ec3fd4" + "reference": "94a2d7ef55ea63c6e8afb166d39a82c07d01c8c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4762aa017b28a3a7e4e53da6e193d0c196ec3fd4", - "reference": "4762aa017b28a3a7e4e53da6e193d0c196ec3fd4", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/94a2d7ef55ea63c6e8afb166d39a82c07d01c8c0", + "reference": "94a2d7ef55ea63c6e8afb166d39a82c07d01c8c0", "shasum": "" }, "require": { @@ -5434,9 +5434,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.8.28" + "source": "https://github.com/appwrite/sdk-generator/tree/1.9.0" }, - "time": "2026-02-11T10:35:18+00:00" + "time": "2026-02-12T12:08:13+00:00" }, { "name": "doctrine/annotations", @@ -8919,5 +8919,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/sdks/agent-skills/CHANGELOG.md b/docs/sdks/agent-skills/CHANGELOG.md new file mode 100644 index 0000000000..ddf5b0096f --- /dev/null +++ b/docs/sdks/agent-skills/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 0.1.0 + +Initial release compatible with Appwrite server 1.8.x. Follows the [Agent Skills Open Standard](https://agentskills.io/home). + +- Added agent skills for 9 languages: TypeScript, Python, PHP, Go, Kotlin, Swift, Ruby, .NET, and Dart +- Coverage for Account, Users, TablesDB, Storage, Teams, Functions, and Realtime services +- Query builder with filtering, sorting, pagination, and field selection +- Permission and Role helpers for access control +- SSR authentication patterns for major frameworks +- Consistent error handling via `AppwriteException` across all languages \ No newline at end of file diff --git a/docs/sdks/agent-skills/GETTING_STARTED.md b/docs/sdks/agent-skills/GETTING_STARTED.md new file mode 100644 index 0000000000..4dcfd9447e --- /dev/null +++ b/docs/sdks/agent-skills/GETTING_STARTED.md @@ -0,0 +1,96 @@ +## Getting Started + +Agent Skills to help developers using AI coding agents with Appwrite. Agent Skills are folders of instructions, scripts, and resources that agents like Claude Code, Cursor, GitHub Copilot, and others can discover and use to work more accurately and efficiently. + +These skills follow the Agent Skills Open Standard: https://agentskills.io/home + +### Install the skills + +Install directly with the Skills CLI: + +```bash +npx skills add chiragagg5k/appwrite-agent-skills +``` + +This installs the packaged `appwrite-*` skills into your local skills directory. + +### Available language skills + +- `appwrite-typescript` +- `appwrite-dart` +- `appwrite-kotlin` +- `appwrite-swift` +- `appwrite-php` +- `appwrite-python` +- `appwrite-ruby` +- `appwrite-go` +- `appwrite-dotnet` + +### Usage + +Skills are automatically available once installed. The agent will use them when relevant tasks are detected. + +### Prompt examples + +Use these as copy-paste prompt starters. + +#### TypeScript (server-side) + +```text +Use the appwrite-typescript skill. +Create a Node.js script that uses Users service to create a user, then adds an initial profile row in TablesDB. +Use env vars for endpoint, project ID, and API key. +Include error handling and a small retry for transient failures. +``` + +#### TypeScript (web client) + +```text +Use the appwrite-typescript skill. +Build a browser login flow with Account service: +- email/password signup +- email/password session login +- fetch current user +- logout current session +Return production-ready TypeScript code. +``` + +#### Python + +```text +Use the appwrite-python skill. +Write a script that uploads a local file to Storage, then prints the file ID and a preview URL. +Use InputFile.from_path and catch Appwrite exceptions. +``` + +#### PHP + +```text +Use the appwrite-php skill. +Create a service class that lists rows from TablesDB with Query.equal and Query.limit, and maps them to DTOs. +Prefer dependency injection for the Appwrite client. +``` + +#### Go + +```text +Use the appwrite-go skill. +Implement a CLI command that creates a document-style row, then reads it back and prints JSON output. +Use context timeouts and structured error messages. +``` + +#### Kotlin + +```text +Use the appwrite-kotlin skill. +Generate Android repository code to paginate rows using cursor queries and expose a suspend function API. +Keep UI concerns out of the data layer. +``` + +#### Migration prompt (Databases -> TablesDB) + +```text +Use the appwrite-typescript skill. +Migrate this existing Databases-based code to TablesDB APIs. +Keep behavior identical and list each API mapping you changed. +``` diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 9bb75427d0..f45435757b 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Tasks; +use Appwrite\SDK\Language\AgentSkills; use Appwrite\SDK\Language\Android; use Appwrite\SDK\Language\Apple; use Appwrite\SDK\Language\CLI; @@ -51,6 +52,7 @@ class SDKs extends Action 'graphql', 'rest', 'markdown', + 'agent-skills' ]; public static function getName(): string @@ -284,6 +286,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND $config = new Markdown(); $config->setNPMPackage('@appwrite.io/docs'); break; + case 'agent-skills': + $config = new AgentSkills(); + break; default: throw new \Exception('Language "' . $language['key'] . '" not supported'); } @@ -576,9 +581,16 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND foreach ($docDirectories as $languageTitle => $path) { $languagePath = strtolower($languageTitle !== 0 ? '/' . $languageTitle : ''); + $examplesSource = $result . '/docs/examples' . $languagePath; + + if (!\is_dir($examplesSource)) { + Console::warning("No code examples found for {$language['name']} SDK at: {$examplesSource}. Skipping copy."); + continue; + } + \exec( 'mkdir -p ' . $resultExamples . $languagePath . ' && \ - cp -r ' . $result . '/docs/examples' . $languagePath . ' ' . $resultExamples + cp -r ' . $examplesSource . ' ' . $resultExamples ); Console::success("Copied code examples for {$language['name']} SDK to: {$resultExamples}"); }