Skip to content

@W-21860796 Adds media-management skill#211

Open
udaiarora wants to merge 4 commits intoforcedotcom:mainfrom
udaiarora:media-mn
Open

@W-21860796 Adds media-management skill#211
udaiarora wants to merge 4 commits intoforcedotcom:mainfrom
udaiarora:media-mn

Conversation

@udaiarora
Copy link
Copy Markdown

References: Contributing guide · Skill authoring guide · Agent Skills spec

What changed

Added a new skill that instructs the agent to generate images via an MCP create_image tool, with configurable parameters for model, size, quality, and format. If image generation is unavailable, it falls back to a single shared placeholder downloaded from a CDN.

Why

For use in vibes. See @W-21860796

Notes


Skills

Manual checklist

Description quality

  • Describes what the skill does and the expected output
  • Includes relevant Salesforce domain keywords (Apex, LWC, SOQL, metadata types, etc.)
  • Trigger phrases are specific enough for Vibes to select this skill reliably

Instructions

  • Clear goal statement
  • Step-by-step workflow
  • Validation rules for generated output
  • Defined output / artifact

Context efficiency

  • Core instructions are concise — supporting material lives in templates/, examples/, or docs/ subdirectories
  • No unnecessary background explanation in the body

Automated checks

Enforced by CI (npm run validate:skills) per the Agent Skills spec:

  • Directory is one level deep, named in kebab-case (max 64 chars), contains SKILL.md
  • Frontmatter name matches directory name; description is present, ≥ 20 words, ≤ 1024 characters, and includes trigger language
  • Body is non-empty and under 500 lines
  • Name uses gerund form ⚠ (warning — does not block merge)

**2. Download the image:**
```bash
mkdir -p "generatedimages"
curl -f -H "Authorization: Bearer $ACCESS_TOKEN" "$URL" -o "generatedimages/<responseId>.<outputFormat>"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you expecting $ACCESS_TOKEN will be resolved? there is no explicit instructions.

**2. Download the image:**
```bash
mkdir -p "generatedimages"
curl -f -H "Authorization: Bearer $ACCESS_TOKEN" "$URL" -o "generatedimages/<responseId>.<outputFormat>"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this curl command fails?

If image generation fails or is not enabled, return the following URL as the image source — do not download it, do not save it locally:

```
https://cdn.scs.static.lightning.force.com/content/assets/d5222d4a11e6c2b735152d7eea824ce4/placeholder.svg
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that since this workflow involves resolving the access token, downloading, error handling, and fetching from external APIs, it is a good use case for using scripts/ rather than mentioning everything in SKILL.md

Treat SKILL as a workflow only, and delegate the detailing to Script. It saves token as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants