field-service-mobile-branding-configure
Derive a Field Service mobile app color scheme from a brand source (URL, hex codes, brand-guide paste, or color description), validate WCAG AA contr…
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Field Service Mobile Branding
This skill ingests a brand source and produces a 14-field color scheme that gets applied to the org-default FieldServiceMobileSettings record (DeveloperName='Field_Service_Mobile_Settings', IsDefault=true). Confirmation with the user happens between derivation and apply — never apply without approval.
> Source: This skill was authored by Chad Barbour and is mirrored from an
> upstream Field Service assets repository.
> Methodology, color tables, and contrast checks are unchanged from upstream — refresh from upstream when content changes there.
> Runtime contract: every org interaction in this skill is a single REST
> call dispatched through the Codey runtime (dispatch locally / the hosted
> Headless 360 MCP in shared surfaces). This skill has **no dependency on the
> execution environment** — no sf CLI, no shell scripts, no local Python, no
> temp files. Colors are derived and validated by the agent inline, then
> written with one sObject PATCH. Do not shell out.
Input contract
One of:
- A website URL — fetch with
WebFetch, extract dominant brand colors. - A brand-guide paste or document — parse for hex codes and named colors.
- Direct hex codes — accept as-is.
- A color description (e.g. "we're a red and white company") — ask for at least one specific hex code or URL before proceeding.
See [reference/derivation-methodology.md](reference/derivation-methodology.md) for the four ingestion cases (A–D) in detail.
Output
A 14-field color scheme written to the org-default FieldServiceMobileSettings record via a single sObject PATCH (PATCH /services/data/vXX.0/sobjects/FieldServiceMobileSettings/{id}). Color changes appear on devices after the metadata cache refreshes (default: 7 days, force-refreshable from app Settings).
Workflow
1. Confirm the target org
Before fetching the brand source, confirm the org is reachable with a cheap auth probe — dispatch SELECT Id FROM Organization LIMIT 1 (GET /services/data/vXX.0/query):
- 2xx with
totalSize=1→ the session token is live; continue. - 401/403 → the org needs re-authentication. Surface that to the user and stop; do not proceed to apply.
Then ask: "Which org should I apply this to?" and wait for explicit confirmation before proceeding. Do not assume a default — even if the user mentioned an org name in their request, confirm it explicitly so there are no surprises. (The Codey runtime resolves the connected org; this skill does not manage org aliases.)
2. Ingest the brand source
Follow the cases (A–D) in [reference/derivation-methodology.md](reference/derivation-methodology.md). At the end of this step you should have two anchors:
- Primary brand color — for non-interactive surfaces and the navbar.
- Secondary/interactive color — for buttons, links, FAB.
3. Derive the full 14-field scheme
Apply the derivation rules in [reference/derivation-methodology.md](reference/derivation-methodology.md) and the field semantics in [reference/color-fields.md](reference/color-fields.md).
Hold the scheme in memory as a flat object whose keys match the 14 FieldServiceMobileSettings color fields. Use [examples/salesforce-default-scheme.json](examples/salesforce-default-scheme.json) as a template. Before continuing, self-check that all 14 fields are present and every value matches ^#[0-9A-Fa-f]{6}$ (6-digit hex, # prefix — 3-digit shorthand and missing # are invalid); fix any that don't before proposing.
4. Validate contrast (light + dark mode)
Compute the WCAG AA contrast ratio for each pair in [reference/contrast-validation.md](reference/contrast-validation.md) inline — this is deterministic arithmetic on the hex values you already hold, not an external tool. For each #RRGGBB pair:
- Normalize each channel:
r = R/255, g = G/255, b = B/255. - Linearize each channel:
c ≤ 0.03928 → c/12.92, else((c+0.055)/1.055)^2.4. - Relative luminance:
L = 0.2126·r + 0.7152·g + 0.0722·b. - Contrast ratio:
(L_lighter + 0.05) / (L_darker + 0.05).
Evaluate all 5 light-mode pairs and all 5 dark-mode pairs from [reference/contrast-validation.md](reference/contrast-validation.md); a pair PASSES at ≥ 4.5:1 (WCAG AA, normal text). Surface any FAIL pairs to the user with a suggested fix in step 5. Note that brand colors are fixed across both modes, so a passing light-mode scheme can still fail dark-mode pairs.
5. Present proposal & confirm
Show the user:
- A
Brand & Navigation/Contrast Scale/Feedback Colorstable of all 14 fields with their hex values and roles. - The light-mode and dark-mode contrast results from step 4, with FAIL pairs flagged.
- The target org alias.
Ask the user to confirm before applying. Use the suggested fixes in [reference/contrast-validation.md](reference/contrast-validation.md) when proposing alternatives for failing pairs.
6. Apply to org
Apply only after the user has approved the proposal in step 5. Three REST calls:
- Confirm FLS (optional but recommended).
GET /services/data/vXX.0/sobjects/FieldServiceMobileSettings/describeand confirm each of the 14 color fields hasupdateable: true. A field withupdateable: false(or a filtered describe) is the earliest signal the running user lacks edit access — surface that before attempting the PATCH.
- Resolve the org-default record.
GET /services/data/vXX.0/querywithSELECT Id FROM FieldServiceMobileSettings WHERE DeveloperName = 'Field_Service_Mobile_Settings' AND IsDefault = true LIMIT 1.totalSize = 0means Field Service Mobile is not provisioned — surface the error and stop (see step 7). Otherwise takerecords[0].Id.
- Write the scheme.
PATCH /services/data/vXX.0/sobjects/FieldServiceMobileSettings/{id}with a flat JSON body of the 14 color fields. Merge semantics — only fields in the body are written. Do not sendIsDefault(not updateable). A 204 (no body) is success; then GET the record back to confirm the values landed.
7. Report back
On success, print:
FieldServiceMobileSettingsrecord id.- Timestamp of the update.
- Reminder that the metadata cache is 7 days by default — devices won't show the new scheme until the cache refreshes or a tech force-refreshes from app Settings.
If the apply fails because no Field_Service_Mobile_Settings record exists, surface the error and stop — Field Service Mobile may not be set up in the org. Direct the user to Setup → Field Service Mobile Settings to bootstrap the default record, then retry.
Scope
Generated automatically:
- The full 14-field color scheme derived from one or two brand anchors plus optional brand neutrals and semantic colors.
- Light-mode and dark-mode WCAG AA contrast validation across 5 light-mode + 5 dark-mode pairs, computed inline by the agent.
- Apply via a single sObject PATCH against the org-default
FieldServiceMobileSettingsrecord.
Out of scope:
- Splash screen, profile tab background image, push notification icon — Setup-only uploads.
- Per-profile
FieldServiceMobileSettingsrecords (multi-config orgs) — this skill targets the singleIsDefault=truerecord. If the org has multiple records, query first and confirm whichDeveloperNameto update. - Dispatcher console / Gantt colors (
FSLQA__GanttPalette__c). BrandingSetmetadata (Experience Cloud / Lightning App branding — does not theme the FS mobile app).
Files in this skill
reference/color-fields.md— the 14 fields, descriptions, defaults, JSON schema.reference/contrast-validation.md— light + dark mode pair definitions, formulas, common fixes.reference/derivation-methodology.md— translating brand sources into a full scheme, edge cases.examples/salesforce-default-scheme.json— the out-of-the-box Salesforce purple/blue scheme.examples/dark-blue-scheme.json— Salesforce-themed dark blue scheme (also serves as a contrast-warnings example).
Contrast validation and scheme derivation are performed by the agent inline (see steps 3–4); there are no executable scripts in this skill. Org writes are single REST calls dispatched through the Codey runtime.
Related skills
configure-field-service-mobile— page layouts, permissions, andFieldServiceSettingstoggles. This skill defers branding to here, and this skill defers structural mobile config to it.fs-data-capture-form-deployer— generates and deploys Data Capture Flow metadata.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
skills/field-service-mobile-branding-configure/SKILL.md同一个仓库里的其他技能
- commerce-b2b-open-code-components-integrate
- commerce-b2b-open-code-components-replace
- dx-devops-conflict-resolve
- dx-devops-pipeline-manage
- dx-devops-test-failures-analyze
- dx-devops-test-pipeline-configure
- dx-devops-test-suite-assignments-configure
- dx-devops-test-suite-run
- dx-devops-work-item-manage
- dx-app-analytics-query
- platform-agentexchange-partner-offers-configure
- automation-sandbox-post-copy-config-generate