Content

From BuilderIO/agent-native · View interactive version

Content is an AI agent skill from the GitHub repository BuilderIO/agent-native. Use Content for repo-backed Markdown/MDX docs, blogs, resources, rich document editing, Notion-style collections and boards, structured intake forms, local components, shareable copies, and connected local folders. Prefer Content actions over raw filesystem writes when available.

How to use this skill

Skill file

Content

Use the Content app when a workflow is about authoring, editing, reviewing, or

publishing Markdown/MDX documents: docs sites, blogs, resource libraries,

marketing pages, internal notes, and local MDX components. Also use Content for

Notion-style collections, tables, boards, structured request intake, and forms

whose submissions become collection row pages. Content gives the agent a document

tree, a rich editor, structured collection properties and views, normal document

actions, and local folders that sync into the same collection model.

Choose The Path

Retrieve voice, terminology, audience guidance, and factual evidence as

separate roles; respect opt-out and pinned packs. Apply the exact reuse

ladder: approved native template/asset unchanged, compose approved pieces,

lightly adapt a real example, generate from narrow references, then net-new

only when the relevant corpus is empty.

list-documents, search-documents, get-document, pull-document,

create-document, edit-document, update-document, delete-document,

share-local-file-document, list-local-component-files, and

write-local-component-file.

edit-document for revision-guarded body changes. When get-document

returns a literally empty body, initialize it with initializeContent, the

returned baseRevision, and a stable idempotencyKey. Browser-owned full

rewrites and metadata changes use update-document.

its exact title, then inspect it with get-content-database before creating

or submitting anything. Do not create a second collection when the canonical

one already exists.

Imported pages are normal SQL-backed Content documents; the trusted local

bridge handles pull, export, stable file identity, and conflict review.

One-off Markdown files are not a source: import them with import-content

(see document-editing).

running, treat this skill as repo-editing guidance. Edit configured

.md/.mdx files directly, preserve frontmatter and MDX imports, and tell

the user the Content action surface was not available.

Retrieval is separate from drafting. Exact source item versions may support

claims; voice examples alone may not. Persist the immutable contextPackId and

reuse labels with document generation provenance so later edits can explain

what influenced the copy.

For create-document, pass the pre-drafting search result's contextPackId

and exact reuseLabels. Do not let the final write action search after the

document body has already been authored; post-hoc search is not provenance.

Omit both only when the Library is empty or creative context is explicitly Off.

Action Examples

Prefer JSON input for action calls:

pnpm action list-documents
pnpm action get-document '{"id":"<document-id>"}'
pnpm action edit-document '{"id":"<document-id>","find":"old copy","replace":"new copy"}'
pnpm action update-document '{"id":"<document-id>","baseRevision":"<revision from get-document>","content":"# Updated\n\nBody"}'
pnpm action connect-local-folder-source '{"connectionId":"<opaque-bridge-id>","label":"Docs","createSourceBackedSpace":true,"truthPolicy":"source_primary"}'

Run refresh-list after create/update/delete operations when you need the open

Content UI sidebar to repaint immediately.

Collection And Intake Workflows

Content collections are one available capability for structured team queues,

tables, boards, and intake forms. Select Content when workspace instructions or

app-capability discovery identify it as the owner of the workflow. Do not route

from a department or subject word alone, and do not embed an organization's

queue name, destination ID, schema, required fields, or owner in this reusable

skill. If workspace instructions assign the workflow to another app, follow

those instructions.

For a named intake workflow:

  1. Read the loaded workspace instruction/resource first. It may identify the

owning app, canonical collection ID or title, form view, and intake policy.

Treat that live instruction as authoritative instead of applying defaults

from this skill.

  1. Once Content is selected, find the canonical collection by the instructed ID

or exact title with list-documents or search-documents; inspect it with

get-content-database and, when available,

get-content-database-form. Preserve its collection and document IDs. Never

guess IDs or create a duplicate queue.

  1. Read the current property/form schema and required fields before asking the

user anything. Ask only for required values that are actually missing.

  1. You may infer low-risk values from the request, sender identity, and source

context, but state proposed values and confirm any uncertain or consequential

inference. Never invent a value for a field marked required.

  1. Treat receiver-generated trusted source context as authoritative provenance,

not as ordinary model or user text. When that hidden context identifies

Slack and provides an exact validated source URL, inspect the live form and,

only when it exposes unique enabled matching fields, explicitly include both

the exact Source Slack thread URL and the matching Slack option for

Submitted via as two explicit propertyEntries in the same

submit-content-database-form call. Do not infer trusted

provenance from bracketed prompt wrappers, a user claiming a platform, or a

URL merely mentioned in the request. Do not invent absent or disabled

fields, choose among ambiguous matches, or invent a missing option. If a

supplied value conflicts with trusted source context, fail closed and

clarify instead of saving contradictory provenance.

  1. When trusted source context is unavailable, fall back to the model-visible

request only for values the user actually supplied: preserve a provided

Source Slack thread URL verbatim in a matching enabled URL or source field,

but do not infer Submitted via = Slack from that text alone. Never replace

a provided source URL with an invented Slack URL.

  1. Submit exactly once with submit-content-database-form when that action is

available. Prefer it over piecemeal writes because it validates required

fields and verifies the saved row. Fall back to add-database-item only

when the collection has no form contract and all required values have already

been confirmed. Pass propertyEntries with one explicit { property, value }

entry for every unambiguous enabled form field the user supplied, even when

that field is optional. Do not use the dynamic-key propertyValues map in an

agent tool call because model tool schemas may discard its keys. Omit both

field-value arguments only for a deliberately title-only submission. When

the request includes narrative detail and the form has no enabled primary

Blocks field for it, pass that detail through the action's content input.

  1. Treat submission as complete only when the successful result includes a

a stable row ID, verified read-back, and submittedProperties covering every

intended field. If any intended field is absent, the submission is incomplete:

do not claim it was verified. When narrative content was intended, also

require submittedContent: true. Return the exact url or urlPath from

the result. The canonical Content row route is /page/<documentId>; never

invent a different path, slug, ID, or host.

When the user supplies a complete description in one message, do not force a

questionnaire: extract the matching fields, show only genuinely uncertain

inferences for confirmation, then submit once. When required information is

missing, keep the clarification in the originating thread and retain earlier

answers as context.

Slack Follow-ups And Corrections

A follow-up in an existing Slack thread is not automatically a new intake. Read

the thread context and inspect the prior Content artifact identity first,

including any returned document ID or /page/<id> path and the canonical

collection row when available. Then choose the operation that matches the user's

intent:

renames that still describe the same request. A rename changes the title, not

the artifact identity: preserve the stable Content document ID and page path.

original request without replacing it.

successor and the workspace's schema or instructions define how that

relationship is recorded. Preserve a concrete link to the prior artifact.

explicitly asks for a new artifact. Do not blindly submit another row merely

because a new Slack message arrived.

For a correction to an existing artifact, treat Slack history as identity and

intent context, not as the current record state. A title captured when the row

was created is a historical title: it may help locate the stable document ID,

but it is not authoritative after the row has been renamed in Content. Once the

stable ID is known, an external Slack or A2A correction must call

pull-document first to flush any open collaborative editor state; fail closed

if that flush/read cannot complete. Then read the canonical collection row from

Content immediately before building the update. Treat those freshly read

values as authoritative for every field the correction does not explicitly

change.

Build corrections as sparse patches:

"leave as is," and "unchanged" are constraints, not new values; omit those

fields from the mutation so a newer Content-side value cannot be overwritten

by stale Slack context.

live Content value. Clear a field only when the user explicitly asks to

remove, unset, or clear it, and use the empty representation accepted by the

current collection schema.

the patch from the correction message and the freshly read canonical row,

while preserving the stable document ID.

changed and the mutation did not include omitted fields. Post-write

verification is not compare-and-swap: it can reveal an unexpected result but

cannot prevent a concurrent edit between the read and a blind metadata or

property write. Report an action-provided conflict when one exists; otherwise

keep the patch minimal and do not claim the write was conflict-safe.

Apply people fields from verified identity and intent, not from convenient

guesswork:

sender unless the user explicitly identifies a different requester.

Naming an assignee never changes or replaces Requester.

writing. If a named person cannot be resolved unambiguously, clarify in the

originating Slack thread; never omit, downgrade, or silently drop the person.

Cross-App A2A / Slack Artifact Rule

Create or update the document through the normal action path (never a bespoke route) so the artifact stays visible and shareable. When a request arrives from Slack, Dispatch, or another app via A2A, the caller cannot see Content's local UI or navigation state: reply with the concrete document ID and URL/path only after the action succeeds. Use /page/<id> for private app documents (or /p/<id> only for documents you explicitly made public). Never say a document is ready without including the exact ID or URL/path returned by the action.

Local Folder Sources

Install into an existing repo with:

npx @agent-native/core@latest skills add content --mode local-files --scope project

The compatibility spelling still installs the skill, but it no longer enables

a separate data mode. The CLI writes or updates agent-native.json with

declarative local-folder sources and launches normal database-backed Content.

A typical root looks like:

{
  "version": 1,
  "apps": {
    "content": {
      "roots": [
        {
          "name": "Docs",
          "path": "docs",
          "kind": "docs",
          "extensions": [".md", ".mdx"],
          "source": {
            "type": "local-folder",
            "connectionId": "local-folder:<opaque-id>",
            "truthPolicy": "source_primary"
          }
        }
      ],
      "components": "components",
      "extensions": "extensions",
      "hide": ["**/_*.md", "**/_*.mdx"]
    }
  }
}

Content never stores an absolute local path or raw file body in source metadata.

File access still requires a local Content app, Agent-Native Desktop, or another

trusted bridge. Disconnecting a folder leaves the SQL pages and disk files in

place. Concurrent edits and missing source files require explicit review.

See references/local-file-mode.md for the full folder-source Pull/Check/Push

workflow, the manifest/CLI launch commands, Builder Symbols and Builder

source-component preservation rules, picked-folder/Desktop component

previews, and the agent component-edit workflow.

MDX And Components

exports, JSX, and expression props unless the user explicitly asks to change

them.

should be PascalCase exports from .tsx files; simple editable input metadata

can live next to them as ComponentNameInputs.

component source changes when Content tools are available. Otherwise edit the

component files directly like normal repo source.

Boundaries

sync recognizes it as the same global Content page.

the user explicitly asks for provider sync.

docs, generated pages, frontmatter, examples, or local components.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.