sharing
यह क्या करती है
यह स्किल बताती है कि डैशबोर्ड, दस्तावेज़ और फ़ॉर्म जैसे आइटम जानबूझकर साझा किए जाने तक अपने निर्माता के लिए निजी कैसे रहते हैं। यह ऐप में शेयरिंग या पहुंच जांच जोड़ने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब आप यूज़र द्वारा बनने वाला नया आइटम प्रकार जोड़ते हैं, जैसे दस्तावेज़ या फ़ॉर्म।
- ✓जब आपको नियंत्रित करना है कि यूज़र की बनाई चीज़ कौन देख या संपादित कर सकता है।
- ✓जब आप ऐप में मानक share dialog जोड़ते हैं।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/sharing/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“ऐसे दस्तावेज़ बनने दीजिए जो निजी रहें, पर मुझे एक दस्तावेज़ चुने हुए टीम साथियों के साथ साझा करने दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
नया आइटम अपने निर्माता के लिए निजी शुरू होता है। निर्माता नामित लोगों के साथ साझा कर सकता है, या visibility organization या लिंक वाले किसी भी व्यक्ति के लिए सेट कर सकता है, और हर सूची व read इन नियमों से जांची जाती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
डिफ़ॉल्ट रूप से नया दस्तावेज़ कौन देख सकता है?
केवल उसका निर्माता, जब तक वह साफ़ तौर पर साझा न हो।
visibility के स्तर क्या हैं?
Private, organization और public, जहां public का मतलब है लिंक वाला कोई भी व्यक्ति।
क्या public आइटम दूसरों की सूचियों में दिखते हैं?
नहीं। वे लिंक से पहुंचे जा सकते हैं, पर डिफ़ॉल्ट सूचियों और खोज से बाहर रहते हैं।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13184
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।