Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ examples/<lang>/ ← 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

Expand Down Expand Up @@ -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/` |
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/` |

Expand Down
42 changes: 36 additions & 6 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = '';

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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";
4 changes: 2 additions & 2 deletions src/SDK/Language/ClaudePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Override;

class ClaudePlugin extends AgentSkills
class ClaudePlugin extends Skills
{
#[Override]
protected string $skillDestination = 'skills/%s/SKILL.md';
Expand Down Expand Up @@ -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[] = [
Expand Down
6 changes: 3 additions & 3 deletions src/SDK/Language/CodexPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Override;

class CodexPlugin extends AgentSkills
class CodexPlugin extends Skills
{
#[Override]
public function getName(): string
Expand Down Expand Up @@ -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',
];
}

Expand Down Expand Up @@ -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[] = [
Expand Down
2 changes: 1 addition & 1 deletion src/SDK/Language/CursorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Override;

class CursorPlugin extends AgentSkills
class CursorPlugin extends Skills
{
#[Override]
public function getName(): string
Expand Down
12 changes: 6 additions & 6 deletions src/SDK/Language/AgentSkills.php → src/SDK/Language/Skills.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Appwrite\SDK\Language;
use Twig\TwigFilter;

class AgentSkills extends Language
class Skills extends Language
{
protected array $skillLanguages = [
'typescript',
Expand All @@ -27,7 +27,7 @@ class AgentSkills extends Language

public function getName(): string
{
return 'AgentSkills';
return 'Skills';
}

public function getKeywords(): array
Expand Down Expand Up @@ -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',
];
}

Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions templates/cli/lib/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const installInitProjectSkills = async (): Promise<void> => {
}
} 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'.`);
}
};
Expand Down Expand Up @@ -573,7 +573,7 @@ const initSkill = async (): Promise<void> => {
process.chdir(localConfig.configDirectoryPath);
const cwd = process.cwd();

log("Fetching available Appwrite agent skills ...");
log("Fetching available Appwrite skills ...");
const { skills, tempDir } = fetchAvailableSkills();

try {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/cli/lib/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ export const commandDescriptions: Record<string, string> = {
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.`,
Expand Down
4 changes: 2 additions & 2 deletions templates/cli/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string[]> = {
typescript: [
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 }}

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading