Claude-skill-registry-data managing-appwrite-functions

Handles backend logic that cannot run in the browser. Use for sensitive tasks like price calculation, cleanup, or payment verification.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/managing-appwrite-functions" ~/.claude/skills/majiayu000-claude-skill-registry-data-managing-appwrite-functions && rm -rf "$T"
manifest: data/managing-appwrite-functions/SKILL.md
source content

Appwrite Server Functions

When to use this skill

  • When logic requires an API Key that shouldn't be exposed.
  • For scheduled tasks (CRON jobs like "Cancel Unpaid Bookings").
  • For heavy processing that would slow down the frontend.

Workflow

  • Create a new function in the Appwrite Console.
  • Set runtime to Node.js.
  • Use
    node-appwrite
    SDK inside the function.
  • Trigger via events (e.g.,
    databases.*.collections.bookings.documents.*.create
    ) or HTTP.

Example (Node.js)

const sdk = require('node-appwrite');

module.exports = async function (context) {
    const client = new sdk.Client()
        .setEndpoint(process.env.APPWRITE_FUNCTION_ENDPOINT)
        .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
        .setKey(context.req.headers['x-appwrite-key']);

    const databases = new sdk.Databases(client);
    
    // Logic: e.g., Confirm payment with Stripe and update DB
    context.log('Function triggered');
    return context.res.json({ success: true });
};

Instructions

  • Security: Never hardcode keys in the function code; use Appwrite Function Environment Variables.
  • Runtimes: Prefer the latest stable Node.js runtime (e.g., 18.x or 20.x).
  • Execution: Check "Execute" permissions to ensure only authorized users or events can run it.