sharing
하는 일
이 스킬은 대시보드, 문서, 양식처럼 사용자가 만든 항목이 의도적으로 공유되기 전까지 만든 사람에게만 비공개로 남는 방법을 설명합니다. 앱에 공유 기능이나 접근 확인을 추가하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓문서나 양식처럼 사용자가 만드는 새 항목 유형을 추가할 때.
- ✓사용자가 만든 항목을 누가 보거나 편집할 수 있는지 제어해야 할 때.
- ✓앱에 표준 공유 대화상자를 추가할 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/sharing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“사람들이 비공개로 문서를 만들 수 있게 하고, 제가 특정 팀원들과 문서를 공유할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
새 항목은 만든 사람에게만 비공개로 시작합니다. 만든 사람은 지정한 사람과 공유하거나, 공개 범위를 조직이나 링크를 가진 누구에게나로 설정할 수 있으며, 모든 목록과 읽기는 이 규칙에 따라 확인됩니다.
기술 내용 (원본 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
자주 묻는 질문
기본으로 새 문서는 누가 볼 수 있나요?
명시적으로 공유되지 않는 한, 만든 사람만 볼 수 있습니다.
공개 범위에는 어떤 수준이 있나요?
비공개, 조직, 공개가 있으며, 공개는 링크를 가진 누구나 볼 수 있다는 뜻입니다.
공개 항목이 다른 사람의 목록에 나타나나요?
아니요. 링크로는 접근할 수 있지만 기본 목록과 검색에서는 제외됩니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.