sharing
Was er macht
Dieser Skill erklärt, wie Elemente wie Dashboards, Dokumente und Formulare beim Ersteller privat bleiben, bis sie bewusst geteilt werden. Er richtet sich an Entwickler, die Freigabe- oder Zugriffsprüfungen in einer App ergänzen.
Wann du ihn nutzt
- ✓Wenn du einen neuen Elementtyp hinzufügst, den Nutzer erstellen, etwa ein Dokument oder Formular.
- ✓Wenn du kontrollieren musst, wer etwas sehen oder bearbeiten darf, das ein Nutzer erstellt hat.
- ✓Wenn du den Standard-Freigabedialog in eine App einbaust.
Link zum Skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/sharing/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Lass Leute Dokumente erstellen, die privat bleiben, aber gib mir die Möglichkeit, ein Dokument mit bestimmten Teamkollegen zu teilen.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Neue Elemente sind zunächst nur für ihren Ersteller sichtbar. Der Ersteller kann mit benannten Personen teilen oder die Sichtbarkeit auf die Organisation oder auf alle mit dem Link setzen, und jede Liste und jeder Lesezugriff wird gegen diese Regeln geprüft.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Sharing — Private by Default, Explicit Share
Rule
Any resource a user creates (dashboards, documents, forms, decks, compositions, booking links, issues, analyses) is private to the creator by default and visible to others only when they have been explicitly shared with or when the creator changes visibility to org or public.
This is the framework-level primitive. Every ownable resource gets it for free — same API, same UI, same skill.
Workspace apps are the intentional organization-scoped exception: their default
visibility is org, configurable by an organization owner/admin. The creator is
stored as the app owner, and the creator or an organization owner/admin can
change the app's visibility or manage its share grants.
Concepts
Three visibility levels
private— owner + explicit share grants only. Default.org— owner + explicit grants + anyone in the same org (read-only).public— owner + explicit grants + anyone with the link (read-only). Public docs do NOT appear in other users' list/sidebar/search results —accessFilteromits them by default. They're reachable by id (resolveAccessadmits them) so direct links and SSR routes like/p/:idkeep working. If a list endpoint legitimately needs cross-user public discovery (a template gallery, etc.), passaccessFilter(table, shares, ctx, minRole, { includePublic: true }).
Visibility is coarse. Explicit share grants are fine-grained (per user, reusable organization group, or per org).
Roles on a share grant
viewer— read only.commenter— read + add comments, but cannot edit the resource or manage shares.editor— read + write.admin— read + write + manage shares. Does NOT replace the singleowner_emailon the resource.
Share roles apply to one resource; organization roles apply to a team; app
roles apply within one app. These are separate permissions. For role setup,
use agent-native-docs to find the current organization and app-role guide.
Before adding an admin gate, identify which role system protects that operation
and use its existing role descriptor and permission checks. Do not replace role
checks with an email comparison or a custom isAdmin column.
Anonymous public URLs stay separate
Form "publish" slugs, booking-link slugs, any feature that exposes a URL to unauthenticated users — these are a different axis and are NOT controlled by the sharing system. Keep them alongside it.
Make a resource ownable
In your template's server/db/schema.ts:
import { sql } from "drizzle-orm";
import { pgTable, text } from "drizzle-orm/pg-core";
import {
createSharesTable,
ownableColumns,
} from "@agent-native/core/db/schema";
export const decks = pgTable("decks", {
id: text("id").primaryKey(),
title: text("title").notNull(),
data: text("data").notNull(),
createdAt: text("created_at").notNull().default(sql`now()`),
updatedAt: text("updated_at").notNull().default(sql`now()`),
...ownableColumns(), // adds owner_email, org_id, visibility
});
export const deckShares = createSharesTable("deck_shares");
Then register it in server/db/index.ts (not the schema file — keeps the schema file free of the getDb closure and avoids circular imports):
// server/db/index.ts
import * as schema from "./schema.js";
import { createGetDb } from "@agent-native/core/db";
import { registerShareableResource } from "@agent-native/core/sharing";
export const getDb = createGetDb(schema);
export { schema };
registerShareableResource({
type: "deck",
resourceTable: schema.decks,
sharesTable: schema.deckShares,
displayName: "Deck",
titleColumn: "title",
getResourcePath: (deck) => `/deck/${deck.id}`,
getDb,
});
Add agentRead: { actions: ["get-deck"] } naming the MCP tool that reads one
resource, so the share panel can send it to Claude, Claude Code and Codex.
The type string is the stable id the UI and actions use. getDb is required — the framework-level share actions use it to reach your template's DB.
Restricting public visibility and cross-org user shares
Some resources should NOT be reachable by an arbitrary authenticated user even with the link, and should NOT be shareable to an email outside the org. Two optional registration flags lock these axes down:
registerShareableResource({
type: "extension",
// ...
allowPublic: false, // hides "Public" in the share dialog and rejects it server-side
Häufige Fragen
Wer sieht ein neues Dokument standardmäßig?
Nur der Ersteller, sofern es nicht ausdrücklich geteilt wird.
Welche Sichtbarkeitsstufen gibt es?
Privat, Organisation und öffentlich, wobei öffentlich bedeutet: alle mit dem Link.
Erscheinen öffentliche Elemente in den Listen anderer?
Nein. Sie sind über den Link erreichbar, werden aber aus Standardlisten und der Suche ausgelassen.
Details
Originalbeschreibung des Autors
Framework-level sharing and privacy for user-authored resources (dashboards, documents, forms, decks, etc.). Use when making a resource table ownable, wiring list/read/update access checks, or dropping the standard share dialog into a template.
repo: BuilderIO/agent-native
Beliebtheit
- GitHub-Sterne
- 7.6k
- Platz im Ranking
- #13184
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
design-exploration
7.6kHilft deinem Agenten, mehrere UI-Design-Richtungen nebeneinander zu erkunden, dich eine auswählen zu lassen und das gewählte Design danach zu verfeinern.
visual-edit
7.6kHilft deinem Agenten, eine laufende lokale App in einem visuellen Editor zu öffnen, damit du ihre echten Bildschirme gemeinsam prüfen und bearbeiten kannst.
turn-into-app
7.6kVerwandelt einen Arbeitsablauf, eine Tabelle oder ein Projekt in eine ausgearbeitete visuelle App mit gefüllten Bildschirmen und einem Agenten im Hintergrund.
visual-plan
7.6kVerwandelt einen einfachen Textplan in einen interaktiven visuellen Plan mit Diagrammen, Dateiübersichten, Code-Ausschnitten und offenen Fragen.
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.