跳到正文
Skillpedia
通用编程7.6k · #13191

workspace-conventions

它能做什么

这项技能列出了让一组相关应用保持一致的约定,涵盖共享代码、文件存储、凭据和框架查询。适合在多个工作区应用之间工作的开发者。

适用场景

  • ✓当你在同一工作区中同时处理多个应用的时候。
  • ✓当你需要在工作区应用中存储文件或凭据的时候。
  • ✓当你查阅框架 API,或添加其他应用会共享的代码的时候。

技能链接

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/workspace-conventions/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/workspace-conventions/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请添加一个所有应用都能使用的共享辅助函数,并把它放在正确的位置。”

每周 5 个新技能,1 分钟读完。

工作原理

技能把智能体指向正确的文档,以及共享代码与应用自有代码、文件存储和机密的规则,使改动在各处都遵循同一模式。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Workspace Conventions

The long-form detail behind the workspace AGENTS.md core rules. Read this before adding shared code, storing files or secrets, creating workspace resources, or looking up framework APIs.

Framework Docs Lookup

Read agent-native-docs for the lookup workflow (framework-search first, then the focused docs-search / source-search readers, and the rg fallback).

The workspace-specific slugs it does not list are workspace and multi-app-workspace. Feature flags and other specialized workflows are optional; read their skill only when the app uses them. Use package docs for framework APIs, the package corpus for reusable framework/template patterns, and this AGENTS.md plus .agents/skills/ for workspace-specific conventions.

Before building common workspace or agent UI, read agent-native-toolkit to inventory existing public kits and installed package seams. Read customizing-agent-native before adapting shared UI. Use the supported ladder: configure → compose → eject the smallest unit → propose a shared seam. Preview before --apply, commit agent-native.ejections.json, and never edit node_modules or eject protected runtime contracts.

Shared Conventions

  • All AI/LLM behavior goes through the app's agent chat. UI and server code must not call model providers, AI SDK generateText() / streamText(), or other inline LLM APIs directly. Use sendToAgentChat() for local app-agent work, including hidden context and submit: false prefill/review flows. Keep actions deterministic and focused. If a workflow is framed as research, analysis, generation, recommendation, or synthesis, let the agent orchestrate provider/data actions in the open AgentSidebar instead of hiding the work in one opaque action or a separate follow-up textbox. Only use useAgentChatContext, setAgentChatContextItem, listAgentChatContext, removeAgentChatContextItem, and clearAgentChatContext when UI needs two-way sync with staged context chips. Read .agents/skills/delegate-to-agent/SKILL.md before building agent-driven UI or "AI" features.
  • Put shared code in packages/shared only when multiple apps need it.
  • Keep app-specific screens, actions, state, and skills inside apps/<app>.
  • SQL is for structured records, metadata, references, and searchable text. Store large files/blob payloads (base64, data: URLs, images, video/audio, PDFs, ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob storage and persist only URLs, ids, or handles.
  • Store shared runtime configuration in the workspace root .env; use apps/<app>/.env only for app-specific overrides. For public app behavior, prefer the default in agent-native.config.ts and use the deterministic AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH> alias only when a non-secret value needs a deployment override. Never hardcode API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals in source, docs, prompts, fixtures, application state, action responses, or generated app content. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
  • Each app deploys its own /* page function, and that function ships whatever the app's server bundle depends on — including a dependency only a background job uses. Before an app takes on a heavy runtime (headless browser, ffmpeg, media processing, ML), read .agents/skills/performance/SKILL.md §9 and keep that work in a background function or job. A dependency belonging to one app does not belong in packages/shared.
  • Prefer framework defaults until the workspace has a real custom rule, component, plugin, action, or skill to share.
  • Keep the Workspace files view for user-authored or user-requested resources. Agents may create hidden agent_scratch resources for temporary working notes, scripts, task plans, or intermediate outputs, but should promote them to normal workspace visibility only when the user explicitly asks to keep or manage the file.
  • Runtime-editable global resources can be managed from Dispatch Resources. Use AGENTS.md or instructions/<slug>.md for always-on guardrails, skills/<slug>/SKILL.md for workspace skills, context/<slug>.md for personas/positioning/messaging/company facts/brand guidelines, and agents/<slug>.md for custom agent profiles. Scope them to All apps when every workspace app
常见问题

智能体应直接编辑 node_modules 吗?

不应该。技能说明绝不编辑 node_modules,并要遵循受支持的步骤来自定义共享界面。

AI 调用应该走哪里?

所有 AI 和 LLM 行为都通过应用的智能体聊天进行,而不是直接从界面或服务器代码发起。

如何找到框架文档?

技能说明应先进行框架搜索,然后再使用有针对性的文档和源代码阅读器。

详情

作者的原始描述

Shared conventions for a multi-app Agent-Native workspace: finding version-matched framework docs and source, shared vs app-owned code, file and blob storage, env and secrets, agent scratch files, and Dispatch Resources. Use when working across workspace apps, storing files or credentials, or looking up framework APIs.

repo: BuilderIO/agent-native

热度

GitHub 星标
7.6k
排名
#13191
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能