Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Afls Db Schema

ASecurity

Manages AFLS DB Schema records (mobile object metadata cache configuration). Use when user asks about DB Schema, DbSchema, mobile sync objects, SOQL filter conditions on DbSchema, enabling/disabling objects for mobile, object metadata cache settings, or which objects sync to iPad.

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentsgosqlapidocumentation

Works with

apimcp

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add SalesforceLabs/afls-for-claude --skill afls-db-schema --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Afls Db Schema?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Afls Db Schema
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/salesforcelabs-afls-db-schema/badge)](https://www.skillsdirectory.com/skills/salesforcelabs-afls-db-schema)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: afls-db-schema
description: Manages AFLS DB Schema records (mobile object metadata cache configuration). Use when user asks about DB Schema, DbSchema, mobile sync objects, SOQL filter conditions on DbSchema, enabling/disabling objects for mobile, object metadata cache settings, or which objects sync to iPad.
---

## How to Answer DB Schema Questions

**Always call MCP tools to get sourced documentation.** Do not answer from general knowledge alone.

| User asks about... | Call this tool |
|---------------------|---------------|
| DB Schema concepts, field reference, pre-configured records | `search_afls_knowledge({ query: "DB Schema mobile object sync" })` |
| Mobile metadata cache configuration | `get_afls_module_docs({ module: "mobile-metadata-cache" })` |
| List all DB Schema records | `list_db_schema()` |
| Full details for a specific record | `get_db_schema({ name: "Visit" })` |
| Create a new DB Schema record | `create_db_schema({ objectName: "Product2" })` |
| Update a DB Schema record | `update_db_schema({ name: "Visit", whereSoql: "..." })` |
| Enable/disable a DB Schema record | `toggle_db_schema({ name: "Visit", active: false })` |
| Mobile cache status | `check_mobile_cache_status()` |

---

## Configuration Mode

When the user asks about DB Schema configuration, **ask them which mode they prefer**:

1. **Show me the documentation** — call `search_afls_knowledge({ query: "DB Schema configuration" })` and present the relevant sections
2. **Walk me through it** — configure it directly in their org step-by-step (guided setup below)

Default to **guided setup** when connected to an org, or documentation mode if no org is connected.

### Guided Setup Workflow

#### Step 1: Check Current State
```
list_db_schema()
```

#### Step 2: Report Findings
Present the summary table. Include counts: total records, active, inactive, DATA type, CONFIGURATION type.

#### Step 3: Propose Changes
Based on the user's request, propose specific changes and wait for user confirmation.

#### Step 4: Apply Changes (with user confirmation)
Use the appropriate dedicated tool (`create_db_schema`, `update_db_schema`, `toggle_db_schema`).

#### Step 5: Verify and Remind About Cache
1. Re-run `list_db_schema()` to confirm changes
2. **Always remind the user**: "DbSchema changes require regenerating the mobile metadata cache. Which profiles should I generate the cache for?"
3. If user provides profiles: `generate_mobile_metadata_cache({ profileNames: ["ProfileName"] })`

---

## Tool Usage Rules

### CRITICAL: Use Dedicated DbSchema Tools Only

DB Schema records are `LifeSciConfigRecord` / `LifeSciConfigFieldValue` entries accessible ONLY through the Tooling API.

**NEVER use these for DbSchema records:**
- `run_soql`, `get_record`, `describe_sobject`, or ANY standard SOQL/record tool
- The following objects DO NOT EXIST in standard SOQL: `LifeSciConfigRecord`, `LifeSciConfigFieldValue`, `LifeSciConfigCategory`, `DbSchema__c`, `DbSchema__mdt`

**CORRECT field names:** `SObject`, `Type`, `WhereSoql`, `DeltaDateField`, `OneWaySync`, `AttachmentsSupport`, `MandatoryFields`, `PermissionSets`, `EnableDataUploadNotification`, `Status`, `SobjectPlatformEvents`, `Errors`, `Category`.
**WRONG field names (DO NOT USE):** `EntityType`, `SOQLFilterCondition`, `DeltaSyncDateField`, `WebToMobileSync`, `AttachmentDownloadMethod`.

### Field Reference

| Field | Type | Purpose |
|-------|------|---------|
| `SObject` | OBJECT | API name of the object to sync |
| `Type` | PICKLIST | `DATA` (synced records) or `CONFIGURATION` (metadata-like records) |
| `WhereSoql` | LONGTEXT | WHERE-clause filter (see SOQL Filter Rules below) |
| `DeltaDateField` | FIELD | Field used for delta/incremental sync (default `LastModifiedDate`) |
| `OneWaySync` | BOOLEAN | `true` = web→mobile only. **Disables offline edit/DCR** for the object — see Critical Behaviors |
| `AttachmentsSupport` | PICKLIST | `CACHE` (during sync), `BACKGROUND` (after sync), or empty (none) |
| `MandatoryFields` | LONGTEXT | Comma-separated fields that must always sync |
| `PermissionSets` | LONGTEXT | **Semicolon-delimited permission set API names** that gate sync (in addition to profile assignments). The mobile app syncs the object for users holding any listed permission set. Set via the `permissionSets` param on `create_db_schema`/`update_db_schema` |
| `EnableDataUploadNotification` | BOOLEAN | Whether the app surfaces a data-upload notification for this object |
| `Status` | PICKLIST | Validity status of the record (e.g., `VALID`) |
| `SobjectPlatformEvents` | — | Platform-event configuration for the object |
| `Errors` | — | Validation/generation errors recorded against the record |

### Critical Behaviors (warn the user about these)

- **Disabling a DB Schema record is destructive to local iPad data.** `toggle_db_schema({ active: false })` (or removing the record) is not just a visibility toggle — on each device's next sync the app runs `DELETE FROM <table>` for objects no longer in the metadata, **wiping all locally cached records for that object** and any unsynced offline edits. Re-enabling re-syncs from the server, but local-only data does not come back. Only disable when you intend to remove the object from mobile.
- **`OneWaySync = true` disables offline edit / DCR for the object.** One-way (web→mobile) objects get no offline-tracking columns and are treated as unsyncable for edits — so Data Change Requests and any offline modifications to that object will silently fail. Only use `OneWaySync` for read-only or platform-event-style reference data.

### SOQL Filter Rules (WhereSoql)
- Enter **only the WHERE clause** — no `SELECT`, `FROM`, or `WHERE` keyword
- **Encase the entire condition in parentheses** to prevent SQLite errors on mobile
- Use `RecordType.DeveloperName` (not `RecordTypeId`) for record type filtering
- Examples: `(IsActive = true)`, `(RecordType.DeveloperName = 'Detail_Visit')`

### Naming Convention
DbSchema records are named `DbSchema_` followed by the object API name (e.g., `DbSchema_Account`). The dedicated tools accept either "Visit" or "DbSchema_Visit".

### After Any DbSchema Change
**Always** remind the user to regenerate the mobile metadata cache. Ask which profiles, then call `generate_mobile_metadata_cache`.

Attribution

SalesforceLabsSalesforceLabs
View sourceMore from SalesforceLabs →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693621 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →