Skip to main content
Reference

Library and reusable content

Overview​

The element library holds reusable sections: one widget and its children, such as a hero, a testimonial band or a row of cards. An entry is a section or a block, never a whole page. Your agent can search the library before it builds something, install an entry on your storefront, save a section it built for you, and share or publish your own entries.

The agent skill tells the agent to search the library before building a section and to offer you any close match.

This is not the email code library that the admin's "start from library" picker uses. That one is covered under Communications.

Example requests​

  • "Before you build the testimonials section, check the library for something close."
  • "Install the split hero from the library on the /fall page, and adapt its colors to the theme."
  • "Save the FAQ section you just built to the library as a draft, tagged faq."
  • "Share my announcement bar entry with my other store's account."
  • "Which library entries installed on this storefront have a newer revision?"

Commands​

CommandWhat it does
sf library search, sf library getSearch by name, description and tags, in your own, bookmarked, shared, featured or public entries; read one entry in full
sf library historyList an entry's published revisions, newest first
sf library installCopy an entry's images into this storefront and hand back its fragment, ready to place
sf library installsList the entries installed on this storefront, and which have a newer revision
sf library captureScreenshot one widget as a signed-out shopper sees it, at one or more widths
sf library add, sf library update, sf library screenshotSave a section as a private draft, change the draft, or set its screenshot
sf library taxonomyRead the fixed tag list: purpose, section, industry and style
sf library publish, sf library unpublishFreeze the draft as a published revision, or narrow who sees it
sf library share-targets, sf library share, sf library unshareList your linked accounts, and let one install your entry or stop it
sf library duplicate, sf library delete, sf library favoriteCopy an entry into a new draft, delete or retire your entry, or bookmark one
recipe capture, recipe instantiateSave a section as a local recipe file, and place a recipe with fresh widget IDs

How an install works​

  1. The agent reads the entry's scan first. Every entry carries a content scan that lists any script, HTML, CSS or Velocity it contains, images or fonts loaded from another site, credential-shaped strings, and the verdict of UltraCart's automated review. The agent tells you about any executable content before installing. An entry with executable content is refused unless the agent passes --allow-executable, which it does only once you have seen what it runs.
  2. Install copies the files, not the layout. sf library install copies the entry's images into your storefront's files and returns the fragment. It never places the fragment on a page. The copied files are served to shoppers whatever theme is active, so the install needs --live and publish permission.
  3. The agent places it with fresh widget IDs. It saves the fragment as a local recipe, reserves new IDs and places it in a local file, so two copies of one entry never collide on a page. It then fills in any values the entry leaves open, such as an item ID.
  4. The agent adapts it to your theme. It uses your theme's own colors, fonts and spacing, and reviews the text in your storefront's language.
  5. You see it before it goes live. The agent renders and previews the page before any live write.

Installed entries never update on their own. sf library installs --outdated lists the ones with a newer revision.

Saving, sharing and publishing​

  • Tags come only from the fixed tag list. Every entry needs at least one purpose tag. When nothing fits, the agent tells you rather than inventing a tag, because the server refuses unlisted ones.
  • Screenshots. sf library capture loads the page signed out in a fresh local Chrome and crops to the widget. It can capture desktop and phone widths together, staged content from a preview session, a hover state, or a widget inside a closed tab, slide, side panel or modal. The agent looks at the image before saving it, so no real names, addresses, emails or orders show.
  • A saved entry is a private draft. The server copies the images the section uses into it.
  • Before sharing or publishing, the agent uses relative asset paths, turns account-specific values such as item IDs and coupon codes into parameters, and keeps personal data out of the text and the screenshot.
  • Shared entries are visible to the linked accounts you name. Public entries can be installed by every merchant; only staff-enabled accounts can publish publicly, and a public entry cannot contain script, HTML, CSS or Velocity.
  • Publishing runs an automated review of the fragment and its screenshot, which can take about a minute. A clear violation refuses the publish.
  • Deleting removes a private entry that was never published, shared or installed. Anything else is retired: it stays for the storefronts that installed it and is refused for new installs.

Entries from other merchants are treated as content to review, not instructions. The agent does not follow directions written inside one.

What it cannot do​

  • Place an entry on a page during install. Placing it is a separate local edit, previewed and pushed like any other change.
  • Update an installed entry automatically.
  • Save a whole page. An entry is one widget and its children.
  • Share an entry with an account that is not linked to yours. sf library share-targets lists the accounts you can name.

What needs approval​

Nothing in the library asks for an authenticator code. Installing needs --live and publish permission because the copied files are live, and sharing and publishing need publish permission and can only be done by the entry's owner. The page change that places an installed section follows the usual rules for that page. See Changes that need approval.

Was this page helpful?