Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Feb 8, 2026

Summary

  • Adds a new AgentSkills language class that generates 16 markdown skill files — one per supported SDK language (web, node, react-native, deno, flutter, dart, android, apple, kotlin, swift, php, python, ruby, go, dotnet, cli)
  • Each skill file is output as {lang}/SKILL.md with YAML frontmatter, client setup, and practical code examples following each language's naming conventions
  • All database examples use the new TablesDB API (tables/rows/columns) with a deprecation note for the old Databases class
  • Integrated into example.php — run with php example.php agent-skills

Test plan

  • Run php example.php agent-skills and verify 16 folders are generated under examples/agent-skills/
  • Verify each SKILL.md has valid YAML frontmatter
  • Verify code examples use correct syntax per language (object params for TS, snake_case for Python/Ruby, PascalCase for Go/.NET, etc.)
  • Verify all database examples use TablesDB with table/row/column terminology
  • Verify no hardcoded "appwrite" — all names derived from {{ spec.title }}

Summary by CodeRabbit

  • New Features

    • Agent Skills SDK generation added and integrated into the CLI (multiple SDK languages supported).
    • CLI tools to scaffold, validate, and package skills (init, quick-validate, package).
  • Documentation

    • New language-specific SDK guides and service reference templates for agent-skills.
    • Comprehensive skill-creator guide, workflow and output pattern docs, and included Apache-2.0 license.

Introduces a new `agent-skills` SDK language that generates 16 markdown
skill files (one per supported SDK language) teaching AI agents how to
use each Appwrite SDK. Each skill file is output as `{lang}/SKILL.md`
with YAML frontmatter, setup instructions, and practical code examples
using the new TablesDB API terminology.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Agent Skills generation: a new PHP language class AgentSkills, a generator branch in the PHP example to emit examples/agent-skills, many new templates/agent-skills/* Twig templates for multiple languages, and a skill-creator toolset with docs and Python CLI scripts for init/validate/package.

Changes

Cohort / File(s) Summary
PHP generator
example.php
Adds conditional branch to generate an agent-skills SDK example and imports AgentSkills.
Language class
src/SDK/Language/AgentSkills.php
New AgentSkills language implementation exposing metadata and a getFiles() list for language-specific skill outputs.
Agent-skills templates
templates/agent-skills/*, templates/agent-skills/base/frontmatter.md.twig, templates/agent-skills/references/service.md.twig
Adds comprehensive Twig templates for agent-skills documentation across many languages (typescript, dart, kotlin, swift, php, python, ruby, go, dotnet) and a shared reference/frontmatter template.
Skill-creator docs
.agents/skills/skill-creator/LICENSE.txt, .agents/skills/skill-creator/SKILL.md, .agents/skills/skill-creator/references/*
Adds license, SKILL.md guide, and reference docs (output-patterns, workflows) for skill authoring.
Skill-creator scripts
.agents/skills/skill-creator/scripts/init_skill.py, .agents/skills/skill-creator/scripts/package_skill.py, .agents/skills/skill-creator/scripts/quick_validate.py
Adds CLI Python tools: init_skill (scaffold), package_skill (zip/.skill), quick_validate (validate SKILL.md).
Agent skill pointer
.claude/skills/skill-creator
Adds small pointer/reference file.
Repo config
.coderabbit.yaml
Adds review filter configuration to exclude certain agent/claude paths from reviews.

Sequence Diagram(s)

mermaid
sequenceDiagram
autonumber
actor CLI as CLI
participant Gen as example.php (Generator)
participant SDK as SDK
(AgentSkills)
participant Spec as Swagger2
participant FS as FileSystem
CLI->>Gen: invoke with requestedSdk
Gen->>Gen: check requestedSdk === "agent-skills"
Gen->>SDK: new SDK(new AgentSkills(), new Swagger2(spec))
SDK->>Spec: read/generate from spec
SDK->>FS: write generated files to examples/agent-skills
Gen->>FS: write companion markdown files

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

"I nibble docs and spin a thread,
Templates sprout where paths were spread.
New skills take root, examples bloom,
A tiny rabbit clears the room. 🐇
Code and docs hop home to groom."

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add AgentSkills language for AI agent skill files' clearly and concisely summarizes the main change: introducing a new AgentSkills language class for generating markdown skill files across supported SDK languages.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/agent-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Fix all issues with AI agents
In `@templates/agent-skills/cli.md.twig`:
- Around line 50-52: The deprecation note incorrectly refers to "class"
terminology; update the wording to reference CLI commands instead. Replace the
sentence that mentions `TablesDB` and `Databases` so it reads something like:
"Use `tablesDB` commands (not the deprecated `databases` commands) for all new
work; only use `databases` if existing CLI scripts rely on it or the user
explicitly requests it." Edit the template line referencing
`TablesDB`/`Databases` accordingly in the `cli.md.twig` content.
- Around line 106-109: Update the outdated runtime value used in the CLI
example: replace the --runtime="node-18.0" flag in the template example with a
current LTS runtime such as --runtime="node-20.0" (or --runtime="node-22.0"),
ensuring the command shown (the {{ spec.title | caseLower }} functions create
... --runtime="...") uses the supported Node.js version.

In `@templates/agent-skills/dart.md.twig`:
- Around line 55-85: Add a Dart "Update row" example to match other language
templates: call TablesDB.updateRow with parameters databaseId, tableId, rowId
(use ID.unique() or placeholder like '[ROW_ID]'), and provide a data map (e.g.,
{'title': 'Updated Title'}); place this new snippet between the listRows
(results) example and the deleteRow block so the sequence is create -> query ->
update -> delete, referencing the updateRow method and TablesDB class shown in
the diff.

In `@templates/agent-skills/deno.md.twig`:
- Around line 22-27: The Deno example uses Client without importing it; add a
URL-based import like the InputFile example to avoid broken code—e.g., add a
top-line import: import { Client, Users, TablesDB, Storage, ID, Query } from
"https://deno.land/x/{{ spec.title | caseLower }}/mod.ts"; then keep the
existing client creation code that calls
Client().setEndpoint(...).setProject(...).setKey(...); ensure the import uses
the same module name pattern as InputFile to match other symbols used in the
template.

In `@templates/agent-skills/flutter.md.twig`:
- Around line 103-104: The call to storage.getFilePreview returns a
Future<Uint8List> but is assigned to preview without awaiting; update the
storage.getFilePreview invocation (the preview variable assignment) to use await
so preview holds the actual bytes rather than a Future, and ensure the enclosing
function is marked async if not already (referencing getFilePreview, preview,
and storage.getFilePreview).

In `@templates/agent-skills/go.md.twig`:
- Around line 44-50: The template uses a hardcoded "[USER_ID]" when calling
service.Create which should instead generate a unique ID like other templates;
update the call in the Go template so the first argument is produced by the ID
generation utility (equivalent to ID.unique()) rather than the literal string,
keeping the rest of the call (email, password, users.WithCreateName) unchanged
so service.Create receives a real unique user ID.

In `@templates/agent-skills/kotlin.md.twig`:
- Around line 22-28: The template is missing an import for InputFile used at
InputFile.fromPath(...); update the import block (the series of io.{{ spec.title
| caseLower }}.* imports) to include the InputFile type so the Kotlin template
compiles—add an import entry for InputFile (the same package where InputFile is
defined in this project/runtime) alongside Client, ID, Query, Users, TablesDB,
and Storage.

In `@templates/agent-skills/php.md.twig`:
- Around line 22-34: The import block for the PHP example is missing the
InputFile class, causing a class-not-found when calling InputFile::withPath(...)
in the example; update the top import list (the same block that contains Client,
ID, Query, Services\Users, Services\TablesDB, Services\Storage) to include use
{{ spec.title }}\InputFile; so the example can call InputFile::withPath(...)
without errors.

In `@templates/agent-skills/web.md.twig`:
- Around line 145-158: The real-time subscription examples use outdated channel
paths; update the two client.subscribe calls in the snippet (the calls to
client.subscribe and the unsubscribe variable) to use the SDK-supported channel
format: replace 'databases.[DATABASE_ID].tables.[TABLE_ID].rows' with
'collections.[COLLECTION_ID].documents' and replace 'buckets.[BUCKET_ID].files'
with 'collections.[BUCKET_ID]' (or the correct collections path used by your SDK
templates), ensuring the unsubscribe variable still references the returned
subscription handle from the first subscribe call.
🧹 Nitpick comments (7)
templates/agent-skills/php.md.twig (2)

67-69: Variable $doc is a leftover from the old "document" terminology.

Since this PR is specifically migrating to TablesDB with row/table/column naming, consider renaming $doc$row here (and the corresponding doc variables in the other language templates) to stay consistent with the new terminology being promoted.


56-84: PHP Database section lacks a "Create table" example.

The Dart template (line 62) includes a createTable example between database creation and row creation, but this PHP template jumps straight from create (database) to createRow. Consider adding a createTable call for completeness, or removing it from Dart — the set of demonstrated operations should be consistent across languages.

templates/agent-skills/python.md.twig (2)

22-34: InputFile import is split from the main imports block.

The InputFile import on line 89 is shown inside the File Storage code block, while all other imports are in the setup section (lines 23–28). Consider consolidating it into the setup imports for consistency, so users see all required imports in one place.

Proposed fix

In the setup block (lines 22–34), add the import:

 from {{ spec.title | caseLower }}.services.storage import Storage
+from {{ spec.title | caseLower }}.input_file import InputFile

In the File Storage block (lines 88–101), remove the redundant import:

 ```python
-from {{ spec.title | caseLower }}.input_file import InputFile
-
 storage = Storage(client)

Also applies to: 88-89


40-54: Positional arguments reduce readability for a documentation template.

The users.create() call uses positional args with a mysterious None (presumably for phone). In a skill file meant to guide AI agents, keyword arguments would be clearer and less error-prone — consistent with how the other templates (Kotlin, Swift, Dart) use named parameters.

-user = users.create(ID.unique(), 'user@example.com', None, 'password123', 'User Name')
+user = users.create(
+    user_id=ID.unique(),
+    email='user@example.com',
+    password='password123',
+    name='User Name'
+)
templates/agent-skills/go.md.twig (1)

97-99: Go import shown inside a code block mid-file is misleading.

In Go, all imports must be declared at the top of a file. Showing import "...file" inside the File Storage code block (line 98) could mislead users. Consider noting it should be added to the top-level import block, or include it in the setup imports.

templates/agent-skills/android.md.twig (1)

22-33: Missing imports for classes used in code examples.

The setup imports (lines 23–28) include Client, ID, Query, Account, TablesDB, and Storage, but the code examples also use Realtime (line 131), InputFile (line 113), File (line 113), and OAuthProvider (line 57) without importing them. For a skill document guiding AI agents, all required imports should be visible.

Proposed fix
 import io.{{ spec.title | caseLower }}.services.TablesDB
 import io.{{ spec.title | caseLower }}.services.Storage
+import io.{{ spec.title | caseLower }}.services.Realtime
+import io.{{ spec.title | caseLower }}.models.InputFile
+import io.{{ spec.title | caseLower }}.enums.OAuthProvider
+import java.io.File
templates/agent-skills/deno.md.twig (1)

92-111: InputFile import can be consolidated with the main imports.

If the main SDK imports are added to the setup section (as suggested above), the standalone InputFile import on line 95 becomes redundant and should either be merged into the main import or removed from this section to avoid confusion about where imports belong.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Fix all issues with AI agents
In @.agents/skills/skill-creator/scripts/init_skill.py:
- Around line 287-288: Validate the skill name read from sys.argv[1] (variable
skill_name) against the documented constraints (kebab-case, lowercase-only, max
64 characters, allowed chars a-z0-9 and hyphen, no leading/trailing hyphen or
consecutive hyphens) before using it in any .format() templates; if invalid,
print the usage/error and exit non-zero. Implement a small validator function
(e.g., is_valid_skill_name(name)) and call it where skill_name is assigned,
rejecting names with spaces, uppercase letters, special characters (including
braces) or length >64 to prevent malformed output when passed into .format()
calls that reference skill_name.

In @.agents/skills/skill-creator/scripts/package_skill.py:
- Line 16: The import of validate_skill from quick_validate is a bare module
import that will fail when the script is executed from outside the scripts/
directory; update package_skill.py to ensure quick_validate.py is discoverable
before importing validate_skill by prepending the script directory to sys.path
(use Path(__file__).resolve().parent and sys.path.insert(0, str(...))) or switch
to a package-relative import if appropriate, then import validate_skill;
reference the symbol validate_skill and the module quick_validate in your change
so the import always succeeds regardless of current working directory.

In @.agents/skills/skill-creator/scripts/quick_validate.py:
- Around line 26-29: The frontmatter extraction in quick_validate.py uses a
regex that only matches Unix line endings (the line with re.match and variable
match); update it to handle Windows CRLF by normalizing content =
content.replace('\r\n','\n') before the regex or change the pattern to use \r?\n
(e.g., r'^---\r?\n(.*?)\r?\n---') so the match variable correctly captures
frontmatter across both Windows and Unix line endings.
- Around line 58-71: The validation currently lets blank/whitespace-only values
pass because the `if name:` guard skips checks; after retrieving `name =
frontmatter.get('name', '')` and stripping it (`name = name.strip()`), add an
explicit required-field check that returns False with a clear message when `name
== ""` (e.g., "Name is required and cannot be empty or whitespace"); then
continue the kebab-case/length checks as before. Apply the same explicit
required/strip-and-check logic to `description` (after `description =
frontmatter.get('description', '')` and `description = description.strip()`),
returning a similar error when empty.

In @.agents/skills/skill-creator/SKILL.md:
- Line 113: Summary: Fix the spelling typo "auxilary" to "auxiliary" in the
SKILL.md content. Locate the string "auxilary" in the skill description (the
sentence mentioning "auxilary context about the process...") and replace it with
the correct spelling "auxiliary"; ensure no other occurrences remain and run a
quick search for "auxilary" to update any other instances in the document.
- Around line 314-315: The statement "Do not include any other fields in YAML
frontmatter" contradicts the file's own frontmatter and the validator; update
the SKILL.md wording to list or permit the actual allowed fields (at minimum
include license, allowed-tools, metadata, compatibility) to match
quick_validate.py and the example frontmatter in this file (which contains
license). Edit the sentence in SKILL.md to explicitly state which fields are
allowed or remove the absolute prohibition so authors aren't misled, and ensure
the text references the validator's allowed-fields behavior rather than a
blanket ban.
- Around line 152-160: Update the example directory tree in SKILL.md to use the
plural directory name `references/` (not `reference/`) so it matches the anatomy
section and other examples; modify the snippet under the `bigquery-skill/`
example (the line showing `reference/`) to `references/` and ensure any listed
child files (e.g., `finance.md`, `sales.md`, `product.md`, `marketing.md`)
remain under `references/`.

In `@templates/agent-skills/kotlin.md.twig`:
- Line 159: Replace the use of InputFile.fromFile(File(...)) with the idiomatic
InputFile.fromPath(...) in the template: locate the call to
InputFile.fromFile(File("/path/to/file.png")) and change it to
InputFile.fromPath("/path/to/file.png") so the template uses the
InputFile.fromPath method from the InputFile class instead of wrapping the path
in a java.io.File.
🧹 Nitpick comments (6)
templates/agent-skills/base/frontmatter.md.twig (1)

1-4: Consider quoting the description value to prevent YAML parsing issues.

If langDescription contains colons, quotes, or other YAML-special characters, the generated frontmatter will be malformed. Wrapping the value in quotes (or using a Twig filter to escape YAML) would make this more robust.

 ---
 name: {{ spec.title | caseLower }}-{{ lang }}
-description: {{ langDescription }}
+description: "{{ langDescription }}"
 ---
.agents/skills/skill-creator/scripts/package_skill.py (1)

67-75: No exclusion filter — common artifacts will be packaged.

skill_path.rglob('*') packages everything, including .git/, __pycache__/, .DS_Store, *.pyc, etc. Consider filtering out common unwanted patterns:

Proposed fix
+            EXCLUDE_PATTERNS = {'.git', '__pycache__', '.DS_Store', '*.pyc'}
             for file_path in skill_path.rglob('*'):
-                if file_path.is_file():
+                if file_path.is_file() and not any(
+                    part.startswith('.git') or part == '__pycache__'
+                    for part in file_path.relative_to(skill_path).parts
+                ) and file_path.name != '.DS_Store' and file_path.suffix != '.pyc':
                     arcname = file_path.relative_to(skill_path.parent)
templates/agent-skills/python.md.twig (2)

37-51: Positional arguments reduce readability of the example code.

Line 41 uses users.create(ID.unique(), 'user@example.com', None, 'password123', 'User Name') with a bare None for the phone parameter. In SDK documentation meant to teach usage, keyword arguments would be clearer and more Pythonic:

user = users.create(
    user_id=ID.unique(),
    email='user@example.com',
    password='password123',
    name='User Name'
)

This also avoids the unexplained None which could confuse readers.


86-101: InputFile import placed mid-file rather than at the top.

The InputFile import on line 89 is separated from the other imports (lines 17–23). While this works, it's unconventional for Python and could teach bad habits. Consider moving it to the main import block at the top.

.agents/skills/skill-creator/references/output-patterns.md (1)

64-68: Inner fenced code blocks lack language identifiers (markdownlint MD040).

The commit message examples at lines 64 and 73 use bare ``` fences. Adding a language hint (e.g., ```text) would satisfy the linter and improve rendering in some Markdown processors.

Also applies to: 73-77

.agents/skills/skill-creator/scripts/init_skill.py (1)

236-261: Partial state left on failure—no cleanup of the skill directory.

If file creation fails partway through (e.g., SKILL.md is written but scripts/example.py fails), the function returns None but leaves the partially created directory behind. For a scaffolding tool this is tolerable, but a cleanup step would make it more robust.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@templates/agent-skills/go.md.twig`:
- Around line 66-72: The snippet calling service.CreateRow uses a hardcoded
"[ROW_ID]" placeholder; replace this with a generated unique ID before the
CreateRow call (e.g., create a rowID variable using a UUID generator or existing
generateID helper) and pass that rowID into CreateRow so each new row gets a
unique identifier; update imports if needed and reference CreateRow and the
placeholder "[ROW_ID]" when making the change.
- Around line 16-28: The setup block is missing the "os" import and the SDK's id
package; update the import list to include "os" and the id package (e.g.,
"github.com/{{ sdk.gitUserName }}/sdk-for-go/id") so os.Getenv calls in the
client.New block work and unique ID generation is available for use; ensure any
places that call id generation (e.g., id.Generate or similar) reference the
imported id package.
🧹 Nitpick comments (1)
templates/agent-skills/swift.md.twig (1)

34-35: Force-unwrapping environment variables will crash if unset.

Using ! on ProcessInfo.processInfo.environment[...] will cause a runtime crash if the env var is missing. Consider using guard let or a nil-coalescing fallback in the example to model safer patterns.

Proposed fix
-    .setProject(ProcessInfo.processInfo.environment["{{ spec.title | caseUpper }}_PROJECT_ID"]!)
-    .setKey(ProcessInfo.processInfo.environment["{{ spec.title | caseUpper }}_API_KEY"]!)
+    .setProject(ProcessInfo.processInfo.environment["{{ spec.title | caseUpper }}_PROJECT_ID"] ?? "")
+    .setKey(ProcessInfo.processInfo.environment["{{ spec.title | caseUpper }}_API_KEY"] ?? "")

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@templates/agent-skills/go.md.twig`:
- Around line 60-72: Replace hardcoded placeholder IDs with unique ID generation
in the Go template: import and use the equivalent of an ID.unique() helper and
call it for database, row and file creation so that service.Create,
service.CreateRow and service.CreateFile receive generated IDs instead of
"[DATABASE_ID]", "[ROW_ID]" and "[FILE_ID]"; ensure you add the id import and
replace the literal strings on the Create (previously at service.Create),
CreateRow, and CreateFile calls so examples consistently demonstrate unique ID
generation.
- Around line 262-274: The CreateRow example uses a literal "[ROW_ID]"
placeholder instead of generating a unique ID; update the call to
service.CreateRow to pass id.Unique() for the row id (keep the rest of the
permissions block as-is) so the example matches the main Database section;
locate the usage in the CreateRow invocation in this template
(service.CreateRow) and replace the "[ROW_ID]" placeholder with id.Unique().

In `@templates/agent-skills/python.md.twig`:
- Around line 182-191: The template uses OAuthProvider.Github in the oauth()
example but never imports OAuthProvider; add an import for OAuthProvider (from
wherever it is exported in your codebase) to the module-level setup/import block
or, alternatively, import OAuthProvider inside the oauth() function before
calling Account.create_o_auth2_token so the name is defined when oauth() runs;
ensure you reference the same OAuthProvider symbol used in the example and keep
the Account and create_o_auth2_token calls unchanged.
🧹 Nitpick comments (1)
templates/agent-skills/python.md.twig (1)

37-51: Positional None argument in users.create may be fragile.

Line 41 passes None as the third positional argument (presumably the phone parameter). This is valid Python, but for a skill file meant to guide AI agents, using the keyword argument explicitly would reduce ambiguity and be more resilient to SDK signature changes.

@ChiragAgg5k
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@templates/agent-skills/kotlin.md.twig`:
- Around line 22-34: The client import block is missing imports for
OAuthProvider and Realtime which are referenced later; update the Kotlin
client-side import section to add imports for OAuthProvider and Realtime (so
symbols OAuthProvider.GOOGLE and Realtime(client) resolve), placing them
alongside the existing imports (e.g., next to Account, Storage, TablesDB) to
ensure the generated Kotlin code compiles.
🧹 Nitpick comments (2)
templates/agent-skills/kotlin.md.twig (1)

277-306: Force-unwrap (!!) on query parameters risks NullPointerException.

Lines 295–296 use call.parameters["userId"]!! and call.parameters["secret"]!!. If the OAuth callback is hit without these parameters (e.g., user navigates directly or provider error), this will throw an unhandled NPE. Since this is a skill file consumed by AI agents that may reproduce the pattern verbatim, consider safe handling.

Suggested safer pattern
-    val session = account.createSession(
-        userId = call.parameters["userId"]!!,
-        secret = call.parameters["secret"]!!,
-    )
+    val userId = call.parameters["userId"]
+        ?: return@get call.respond(HttpStatusCode.BadRequest)
+    val secret = call.parameters["secret"]
+        ?: return@get call.respond(HttpStatusCode.BadRequest)
+    val session = account.createSession(userId = userId, secret = secret)
templates/agent-skills/python.md.twig (1)

36-52: Consider using keyword arguments for users.create() to improve clarity.

Line 42 uses positional arguments with a None placeholder for the phone parameter: users.create(ID.unique(), 'user@example.com', None, 'password123', 'User Name'). Since this is a skill file consumed by AI agents, explicit keyword arguments would make the parameter semantics unambiguous and less error-prone when the SDK signature changes.

Suggested improvement
-user = users.create(ID.unique(), 'user@example.com', None, 'password123', 'User Name')
+user = users.create(
+    user_id=ID.unique(),
+    email='user@example.com',
+    password='password123',
+    name='User Name'
+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant