diff --git a/scripts/validate-skills.ts b/scripts/validate-skills.ts index fcae01e..10d5351 100644 --- a/scripts/validate-skills.ts +++ b/scripts/validate-skills.ts @@ -306,11 +306,30 @@ Wrap values that contain \`: \` (colon + space), such as long descriptions with }, }, { - description: 'Metadata must include a "version" field', + description: 'Frontmatter must include a metadata block with a "version" field', run({ dirName, rawFrontmatter }) { if (rawFrontmatter === null) return { errors: [] } const meta = parseMetadataBlock(rawFrontmatter) - if (meta === null || typeof meta === "string") return { errors: [] } + + // Fail if no metadata block exists + if (meta === null) { + return { + errors: [ + `skills/${dirName}/SKILL.md: frontmatter must include a "metadata:" block with a "version" field (e.g. metadata:\\n version: "1.0")`, + ], + } + } + + // Fail if metadata is a scalar (inline value) + if (typeof meta === "string") { + return { + errors: [ + `skills/${dirName}/SKILL.md: metadata must be a key-value block, not an inline scalar — use indented sub-keys (e.g. metadata:\\n version: "1.0")`, + ], + } + } + + // Fail if version is missing inside metadata if (!meta.version) { return { errors: [ @@ -318,6 +337,25 @@ Wrap values that contain \`: \` (colon + space), such as long descriptions with ], } } + + return { errors: [] } + }, + }, + { + description: 'Version must follow x.y format (e.g. "1.0", "2.5")', + run({ dirName, rawFrontmatter }) { + if (rawFrontmatter === null) return { errors: [] } + const meta = parseMetadataBlock(rawFrontmatter) + if (meta === null || typeof meta === "string") return { errors: [] } + if (!meta.version) return { errors: [] } + const versionPattern = /^\d+\.\d+$/ + if (!versionPattern.test(meta.version)) { + return { + errors: [ + `skills/${dirName}/SKILL.md: version must follow x.y format (e.g. "1.0", "2.5") — got: "${meta.version}"`, + ], + } + } return { errors: [] } }, }, diff --git a/skills/applying-slds/SKILL.md b/skills/applying-slds/SKILL.md index 17ca40a..558876c 100644 --- a/skills/applying-slds/SKILL.md +++ b/skills/applying-slds/SKILL.md @@ -1,7 +1,8 @@ --- name: applying-slds -version: "1.0.0" description: "Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include \"build a modal\", \"create a form\", \"data table\", \"SLDS styling\", \"style with hooks\", \"add an icon\"." +metadata: + version: "1.0" --- # Applying SLDS diff --git a/skills/building-ui-bundle-frontend/SKILL.md b/skills/building-ui-bundle-frontend/SKILL.md index 372da9c..d6e837d 100644 --- a/skills/building-ui-bundle-frontend/SKILL.md +++ b/skills/building-ui-bundle-frontend/SKILL.md @@ -1,6 +1,8 @@ --- name: building-ui-bundle-frontend description: "MUST activate before editing ANY file under uiBundles/*/src/ for visual or UI changes to an EXISTING app — pages, components, sections, layout, styling, colors, fonts, navigation, animations, or any look-and-feel change. Use this skill when modifying pages, components, layout, styling, or navigation in an existing UI bundle app. Activate when the project contains appLayout.tsx, routes.tsx, src/pages/, src/components/, or global.css. This skill contains critical project-specific conventions (appLayout.tsx shell, shadcn/ui components, Tailwind CSS, Salesforce base-path routing, module restrictions) that override general knowledge. Without this skill, generated code will use wrong imports, break routing, or ignore project structure. Do NOT use when creating a new app from scratch (use building-ui-bundle-app instead)." +metadata: + version: "1.0" --- # UI Bundle UI diff --git a/skills/deploying-ui-bundle/SKILL.md b/skills/deploying-ui-bundle/SKILL.md index 7bff06a..b4f31f7 100644 --- a/skills/deploying-ui-bundle/SKILL.md +++ b/skills/deploying-ui-bundle/SKILL.md @@ -1,6 +1,8 @@ --- name: deploying-ui-bundle description: "MUST activate when the project contains a uiBundles/*/src/ directory or sfdx-project.json and the task involves deploying, pushing to an org, or post-deploy setup. Use this skill when deploying a UI bundle app to a Salesforce org. Covers the full deployment sequence: org authentication, pre-deploy build, metadata deployment, permission set assignment, data import, GraphQL schema fetch, and codegen. Activate when files like *.uibundle-meta.xml or sfdx-project.json exist and the user mentions deploying, pushing, org setup, or post-deploy tasks." +metadata: + version: "1.0" --- # Deploying a UI Bundle diff --git a/skills/developing-agentforce/SKILL.md b/skills/developing-agentforce/SKILL.md index 4b81779..31d9652 100644 --- a/skills/developing-agentforce/SKILL.md +++ b/skills/developing-agentforce/SKILL.md @@ -4,7 +4,7 @@ description: "Build, modify, debug, and deploy agents with Agentforce Agent Scri license: Apache-2.0 compatibility: "Requires Agentforce license, API v66.0+, Einstein Agent User" metadata: - version: "0.5.1" + version: "1.0" last_updated: "2026-04-08" --- diff --git a/skills/developing-agentforce/references/version-history.md b/skills/developing-agentforce/references/version-history.md index 0115932..a3d6bf4 100644 --- a/skills/developing-agentforce/references/version-history.md +++ b/skills/developing-agentforce/references/version-history.md @@ -1,4 +1,4 @@ -# Version History +d# Version History Skill version changelog for developing-agentforce. @@ -8,16 +8,16 @@ Skill version changelog for developing-agentforce. | Version | Date | Changes | |---------|------|---------| -| 0.4.8 | 2026-03-17 | **Agent access guide + merge cleanup**: Adopted `agent-access-guide.md` from sf-permissions (import rules applied). Routed post-activation access step in Create and Deploy domains. Merged `preview-test-loop.md` content (jq trace diagnostics, fix strategies table, context variable limitations, utterance derivation) into `agent-validation-and-debugging.md`. Deleted orphaned `preview-test-loop.md`. Added custom object scanning guidance to Agent Spec creation. Refined post-action output field instructions. | -| 0.4.7 | 2026-03-15 | **Post-action session state fix**: Added explicit post-action instructions to prevent session state corruption by specifying output fields the agent must reference. Driven by T02 run-2026-03-15-vc-02 finding. | -| 0.4.6 | 2026-03-15 | **USER_MODE P0-1 fix**: Added static vs. dynamic SOQL guidelines to backing logic sections in `agent-design-and-spec-creation.md` and invocable Apex template. `AccessLevel.USER_MODE` required for dynamic SOQL. Added "Rules That Always Apply" cardinal rules block to SKILL.md (`--json` first, diagnose before fix, spec approval gate). | -| 0.4.5 | 2026-03-15 | **Full editorial pass + spec approval gate**: Conciseness pass across all 9 SKILL.md domains. Added spec approval hard gate (user must approve Agent Spec before implementation). Added `filter_from_agent` output visibility to Agent Spec template. Restructured Agent Spec inputs/outputs sections. Step 8 redirect to Diagnose Behavioral Issues workflow. | -| 0.4.4 | 2026-03-13 | **Staging + cleanup**: Moved unmerged reference files to `staging/` folder. Clarified live actions command syntax. Refined `agent-user-setup.md` license requirements and USER_MODE documentation. | -| 0.4.3 | 2026-03-12 | **sf-skills merge: production-gotchas + new domain**: Added "Diagnose Production Issues" task domain to SKILL.md (9 domains total). Routed `production-gotchas.md` as primary reference. Added `production-gotchas.md` as secondary reference in Diagnose Compilation (reserved keywords trigger). Added `WITH USER_MODE` object permissions warning to `agent-user-setup.md` Section 6.2. Archived orphan `agent-user-setup-and-perms.md`. Fixed stale SKILL.md reference (Section 2 → Section 6.2). | -| 0.4.2 | 2026-03-12 | **sf-skills merge: known-issues + one-at-a-time deploy**: Integrated `known-issues.md` into 6 of 8 SKILL.md domains with domain-specific loading triggers. Added one-at-a-time Apex stub deploy instruction to SKILL.md Create/Modify domains, `agent-design-and-spec-creation.md`, and `salesforce-cli-for-agents.md`. Moved Issue 16 (`connections:` → `connection messaging:`) to Resolved. | -| 0.4.0 | 2026-03-11 | **T03 test run + type mapping restructure**: Restructured Section 5 type mapping in `agent-design-and-spec-creation.md` into Primitive + Complex tables keyed by `target` type. Added steps 10 (Activate) and 11 (Verify published agent) to Create, Modify, and Deploy domains. | -| 0.3.2 | 2026-03-10 | **T02 post-fix run**: Platform-injected `show_command` tool diagnostic pattern added to `agent-validation-and-debugging.md`. Post-publish preview language strengthened in SKILL.md. | -| 0.3.0 | 2026-03-10 | **T02 first run + test framework**: Created testing framework (README, run structure, scoring rubric). First T02 run: 13/13 SUCCESS. | -| 0.2.0 | 2026-03-09 | **T01 first run**: Created T01 test scenario. First end-to-end test of skill. Identified `agent_type` inference gap. | -| 0.1.0 | 2026-03-08 | **Initial skill**: SKILL.md router with 8 task domains. 7 reference files. Agent Spec template. Asset library. | +| N/A | 2026-03-17 | **Agent access guide + merge cleanup**: Adopted `agent-access-guide.md` from sf-permissions (import rules applied). Routed post-activation access step in Create and Deploy domains. Merged `preview-test-loop.md` content (jq trace diagnostics, fix strategies table, context variable limitations, utterance derivation) into `agent-validation-and-debugging.md`. Deleted orphaned `preview-test-loop.md`. Added custom object scanning guidance to Agent Spec creation. Refined post-action output field instructions. | +| N/A | 2026-03-15 | **Post-action session state fix**: Added explicit post-action instructions to prevent session state corruption by specifying output fields the agent must reference. Driven by T02 run-2026-03-15-vc-02 finding. | +| N/A | 2026-03-15 | **USER_MODE P0-1 fix**: Added static vs. dynamic SOQL guidelines to backing logic sections in `agent-design-and-spec-creation.md` and invocable Apex template. `AccessLevel.USER_MODE` required for dynamic SOQL. Added "Rules That Always Apply" cardinal rules block to SKILL.md (`--json` first, diagnose before fix, spec approval gate). | +| N/A | 2026-03-15 | **Full editorial pass + spec approval gate**: Conciseness pass across all 9 SKILL.md domains. Added spec approval hard gate (user must approve Agent Spec before implementation). Added `filter_from_agent` output visibility to Agent Spec template. Restructured Agent Spec inputs/outputs sections. Step 8 redirect to Diagnose Behavioral Issues workflow. | +| N/A | 2026-03-13 | **Staging + cleanup**: Moved unmerged reference files to `staging/` folder. Clarified live actions command syntax. Refined `agent-user-setup.md` license requirements and USER_MODE documentation. | +| N/A | 2026-03-12 | **sf-skills merge: production-gotchas + new domain**: Added "Diagnose Production Issues" task domain to SKILL.md (9 domains total). Routed `production-gotchas.md` as primary reference. Added `production-gotchas.md` as secondary reference in Diagnose Compilation (reserved keywords trigger). Added `WITH USER_MODE` object permissions warning to `agent-user-setup.md` Section 6.2. Archived orphan `agent-user-setup-and-perms.md`. Fixed stale SKILL.md reference (Section 2 → Section 6.2). | +| N/A | 2026-03-12 | **sf-skills merge: known-issues + one-at-a-time deploy**: Integrated `known-issues.md` into 6 of 8 SKILL.md domains with domain-specific loading triggers. Added one-at-a-time Apex stub deploy instruction to SKILL.md Create/Modify domains, `agent-design-and-spec-creation.md`, and `salesforce-cli-for-agents.md`. Moved Issue 16 (`connections:` → `connection messaging:`) to Resolved. | +| N/A | 2026-03-11 | **T03 test run + type mapping restructure**: Restructured Section 5 type mapping in `agent-design-and-spec-creation.md` into Primitive + Complex tables keyed by `target` type. Added steps 10 (Activate) and 11 (Verify published agent) to Create, Modify, and Deploy domains. | +| N/A | 2026-03-10 | **T02 post-fix run**: Platform-injected `show_command` tool diagnostic pattern added to `agent-validation-and-debugging.md`. Post-publish preview language strengthened in SKILL.md. | +| N/A | 2026-03-10 | **T02 first run + test framework**: Created testing framework (README, run structure, scoring rubric). First T02 run: 13/13 SUCCESS. | +| N/A | 2026-03-09 | **T01 first run**: Created T01 test scenario. First end-to-end test of skill. Identified `agent_type` inference gap. | +| N/A | 2026-03-08 | **Initial skill**: SKILL.md router with 8 task domains. 7 reference files. Agent Spec template. Asset library. | diff --git a/skills/developing-datacloud-code-extension/SKILL.md b/skills/developing-datacloud-code-extension/SKILL.md index f69aa4f..47c35d6 100644 --- a/skills/developing-datacloud-code-extension/SKILL.md +++ b/skills/developing-datacloud-code-extension/SKILL.md @@ -1,6 +1,8 @@ --- name: developing-datacloud-code-extension description: "Develop and deploy Data Cloud Code Extensions using SF CLI plugin. Use this skill when creating custom Python transformations for Data Cloud, deploying code extensions, or testing data transformations. Supports init, run, scan, and deploy operations." +metadata: + version: "1.0" --- # developing-datacloud-code-extension Skill diff --git a/skills/generating-apex-test/SKILL.md b/skills/generating-apex-test/SKILL.md index 7b008a7..388d4a8 100644 --- a/skills/generating-apex-test/SKILL.md +++ b/skills/generating-apex-test/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-apex-test description: "Generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking strategies, assertion best practices, and disciplined test-fix loops. Use this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution and coverage analysis, or implementing testing patterns for triggers, services, controllers, batch jobs, queueables, and integrations. Triggers on *Test.cls, *_Test.cls files, sf apex run test workflows, coverage reports, test-fix loops. Do NOT trigger for production Apex code (use generating-apex) or Jest/LWC tests." +metadata: + version: "1.0" --- # Generating Apex Tests diff --git a/skills/generating-apex/SKILL.md b/skills/generating-apex/SKILL.md index 4ee230c..19416d2 100644 --- a/skills/generating-apex/SKILL.md +++ b/skills/generating-apex/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-apex description: "Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex." +metadata: + version: "1.0" --- # Generating Apex @@ -403,4 +405,4 @@ Deploy: ## Troubleshooting Boundary -This skill handles production `.cls`/`.trigger`/`.apex` issues only: compile/parse failures, deployment dependency errors, runtime governor-limit failures. For test execution, assertions, coverage, or `sf apex run test` failures, delegate to `generating-apex-test`. \ No newline at end of file +This skill handles production `.cls`/`.trigger`/`.apex` issues only: compile/parse failures, deployment dependency errors, runtime governor-limit failures. For test execution, assertions, coverage, or `sf apex run test` failures, delegate to `generating-apex-test`. diff --git a/skills/generating-custom-application/SKILL.md b/skills/generating-custom-application/SKILL.md index 7d9e75b..bcb1a10 100644 --- a/skills/generating-custom-application/SKILL.md +++ b/skills/generating-custom-application/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-custom-application description: "Use this skill when users need to create or configure Salesforce Custom Applications. Trigger when users mention custom apps, application metadata, app navigation, or organizing tabs into applications. Use when users want to create app containers for tabs and pages. Always use this skill for custom application work." +metadata: + version: "1.0" --- ## When to Use This Skill diff --git a/skills/generating-custom-field/SKILL.md b/skills/generating-custom-field/SKILL.md index 6eb9c6f..38c0246 100644 --- a/skills/generating-custom-field/SKILL.md +++ b/skills/generating-custom-field/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-custom-field description: "Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, or field metadata. Also use when users encounter field deployment errors, especially around Roll-up Summary format, Master-Detail constraints, or formula issues. Always use this skill for any custom field metadata work, field generation, or field troubleshooting." +metadata: + version: "1.0" --- ## When to Use This Skill @@ -498,4 +500,4 @@ Before generating CustomField XML, verify: ### Naming Checks - [ ] Is the API name free of reserved words (`Order`, `Group`, `Select`, etc.)? -- [ ] Is the API name unique on this object? \ No newline at end of file +- [ ] Is the API name unique on this object? diff --git a/skills/generating-custom-object/SKILL.md b/skills/generating-custom-object/SKILL.md index c4ac93d..99534e0 100644 --- a/skills/generating-custom-object/SKILL.md +++ b/skills/generating-custom-object/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-custom-object description: "Use this skill when users need to create, generate, or validate Salesforce Custom Object metadata. Trigger when users mention custom objects, creating objects, object metadata, .object files, sharing models, name fields, or validation rules on objects. Also use when users say things like \"create a custom object\", \"generate object metadata\", \"set up an object for...\", or when they're troubleshooting object deployment errors especially around sharing models and Master-Detail relationships. Always use this skill for any custom object metadata work." +metadata: + version: "1.0" --- ## When to Use This Skill @@ -235,4 +237,4 @@ Before generating the Custom Object XML, verify: ### Architectural Checks - [ ] Is `` present with a meaningful summary? - [ ] Are `` and `` set to `true` if user-facing? -- [ ] Does the filename match the intended API name? \ No newline at end of file +- [ ] Does the filename match the intended API name? diff --git a/skills/generating-custom-tab/SKILL.md b/skills/generating-custom-tab/SKILL.md index 648b5b8..01c19d0 100644 --- a/skills/generating-custom-tab/SKILL.md +++ b/skills/generating-custom-tab/SKILL.md @@ -1,6 +1,8 @@ --- name: generating-custom-tab description: "Use this skill when users need to create or configure Salesforce Custom Tabs. Trigger when users mention tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, or tab configuration. Also use when users want to add navigation to custom objects, create tabs for external content, or set up Lightning page tabs. Always use this skill for any custom tab work." +metadata: + version: "1.0" --- ## When to Use This Skill @@ -151,4 +153,4 @@ Also forbidden: - Follow consistent naming conventions - Object tab files MUST only contain `true` and `` — nothing else - Web tab files MUST only contain: `false`, `