sb-manage-images
Skill1 starsChanged 40 days agoApache-2.0View on GitHub
Upload, insert, update, or delete images in a Stable Baseline document using the upload-session flow. Use when user wants to manage images, add screenshots, or run sb-manage-images.
In this repository14 other files it gives its agents.
- sb-agentSkill
- sb-connectSkill
- sb-create-diagramSkill
- sb-create-docSkill
- sb-create-whiteboardSkill
- sb-dashboardSkill
- sb-databaseSkill
- sb-edit-docSkill
- sb-edit-whiteboardSkill
- sb-manage-dataSkill
- sb-searchSkill
- sb-setupSkill
- sb-syncSkill
- sb-updateSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
If you don't know the documentId: use listWorkspaces, then listProjects, then listDocuments or getProjectHierarchy to find it.
- Very specific: line 17
Call getDocument to get the current versionTimestamp and line numbers.
- Very specific: line 29
Call insertImageInDocument with one of:
- Very specific: line 36
Call getDocument to find the IMAGE_OMITTED marker and note the imageId.
- Very specific: line 37
Call updateImageInDocument with the imageId, documentVersionTimestamp, and fields to change: alt, caption, nlDescription, width, height, …
- Very specific: line 44
Call deleteImageInDocument with the imageId.
- Very specific: line 49
Delete the existing image (deleteImageInDocument).
- Very specific: line 54
NEVER hand-edit IMAGE_OMITTED markers in CDMD.
- Very specific: line 55
ALWAYS use getDocument before any operation to get the current versionTimestamp.
- Distinctive: line 56
If an operation fails due to versionTimestamp mismatch, re-read the document and retry.
- Very specific: line 57
Write descriptive nlDescription values: they power semantic search.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stable Baseline: Manage Images
Manage images in a Stable Baseline document using MCP tools.
If you don't know the documentId: use listWorkspaces, then listProjects, then listDocuments or getProjectHierarchy to find it. Or read .sb/config.json for cached IDs.
Supported formats: PNG, JPEG, GIF, WebP, SVG (max 10MB).
Inserting a new image (recommended flow)
- Call
getDocumentto get the currentversionTimestampand line numbers. - Upload-session flow (best practice: avoids base64 issues):
a. Call
createImageUploadSessionwith{ documentId, fileName, mimeType }. It returnsuploadUrlandassetUrl. b. PUT the raw file bytes touploadUrlwith headerContent-Type: <mimeType>. The URL is single-use and expires in 5 minutes. c. CallinsertImageInDocumentwithimageUrlset to theassetUrlfrom step (a). Include:documentVersionTimestamp,nlDescription,caption,afterLine. The tool will finalize the already-uploaded file without re-uploading. - Alternative: direct insert (for small images or URLs):
- Call
insertImageInDocumentwith one of:imageUrl: a public URL to fetch fromimageBase64: base64-encoded image data
- Include:
documentVersionTimestamp,nlDescription,caption,afterLine.
- Call
Updating image metadata
- Call
getDocumentto find the IMAGE_OMITTED marker and note theimageId. - Call
updateImageInDocumentwith theimageId,documentVersionTimestamp, and fields to change:alt,caption,nlDescription,width,height,align. - This does NOT replace the image file: to swap the image, delete and re-insert.
Deleting an image
- Call
getDocumentto find the IMAGE_OMITTED marker and note theimageId. - Call
deleteImageInDocumentwith theimageId. - This removes the marker, database record, and storage file.
Replacing an image
- Delete the existing image (
deleteImageInDocument). - Re-read the document (
getDocument) to get the updated versionTimestamp and line numbers. - Insert the new image at the desired position using the upload-session flow above.
Hard rules:
- NEVER hand-edit IMAGE_OMITTED markers in CDMD.
- ALWAYS use
getDocumentbefore any operation to get the currentversionTimestamp. - If an operation fails due to versionTimestamp mismatch, re-read the document and retry.
- Write descriptive
nlDescriptionvalues: they power semantic search.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

