Agent skill

Life Sciences Territory Configure

by forcedotcom in forcedotcom/sf-skills

A skill your agent uses to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud.

Apache-2.0Auto-check passed

Install Life Sciences Territory Configure

skills CLI
$ npx skills add forcedotcom/sf-skills --skill life-sciences-territory-configure -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills life-sciences-territory-configure --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/life-sciences-territory-configure .claude/skills/life-sciences-territory-configure && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
life-sciences-territory-configure
GitHub stars
1.1k
Token cost
~2.7k tokens
SKILL.md length
1,132 words
Files
2 (incl. references)
Skills in repo
251
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud.

  • Works in 4 steps: Present Default Names and Get Confirmation → Preview and Confirm → Create and Deploy → …
  • Create and activate a Territory Type
  • SKILL.md covers Scope, Required Inputs, Workflow and Rules / Constraints, plus 3 more sections
  • Calls sf

What it does

Life Sciences Territory Configure is an agent skill from forcedotcom/sf-skills. Use this skill to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud. Trigger when the user says 'set up territories', 'create territory model', 'configure territory hierarchy for Life Sciences', 'territory setup for LSC', or 'create territories for Life Sciences Cloud'. Creates a Geographical territory type, an LSC Territory Model, and a 3-level territory hierarchy (Region, District, Territory). Confirms names with the user, shows a preview, then deploys and activates…

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/territory-metadata.md`).

The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Create and activate a Territory Type
  • Territory Model
  • Territories for Life Sciences Cloud
  • The user says set up territories

Example prompts

  • “set up territories”
  • “create territory model”
  • “configure territory hierarchy for Life Sciences”
  • “/life-sciences-territory-configure”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Present Default Names and Get Confirmation
  2. Preview and Confirm
  3. Create and Deploy
  4. Activate Territory Model

What it can do on your machine

Read from SKILL.md and the folder at commit e5164d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Life Sciences Territory Configure loads about 2.7k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 221 tokens; SKILL.md has 1,132 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~221
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit e5164d9, republished under its Apache-2.0 licence (© forcedotcom). 1,132 words, ~2,724 tokens.

Download SKILL.mdSave it as .claude/skills/life-sciences-territory-configure/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
life-sciences-territory-configure
description
Use this skill to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud. Trigger when the user says 'set up territories', 'create territory model', 'configure territory hierarchy for Life Sciences', 'territory setup for LSC', or 'create territories for Life Sciences Cloud'. Creates a Geographical territory type, an LSC Territory Model, and a 3-level territory hierarchy (Region, District, Territory). Confirms names with the user, shows a preview, then deploys and activates the model. DO NOT TRIGGER when: user wants to validate prerequisites, assign users to territories, create territory assignment rules, or run the full end-to-end Life Sciences Cloud setup / orchestration (that is the `life-sciences-fieldsalesrep-coordinate` orchestrator's job — this skill runs only as a standalone territory setup).
metadata.version
1.0
metadata.minApiVersion
65.0
metadata.domains
Life Sciences
metadata.relatedSkills
life-sciences-fieldsalesrep-coordinate, life-sciences-prerequisites-validate

Life Sciences Territory Setup

Creates and activates a Territory Type, Territory Model, and a 3-level Territory hierarchy for Life Sciences Cloud using the sf CLI.

Scope

  • In scope: Creating territory type, territory model, and territories; activating the territory model
  • Out of scope: Assigning users to territories, creating territory assignment rules, validating prerequisites
Off-topic requests

If the user asks for something unrelated to this skill (either at the start or mid-execution), do not attempt it. Tell the user you did not understand the request, then show what you can help with: setting up Life Sciences Cloud territories (this skill), and — if relevant — point them to life-sciences-prerequisites-validate for prerequisite checks or life-sciences-fieldsalesrep-coordinate for the full end-to-end setup. Then stop and wait.


Required Inputs

Gather before proceeding:

  • Target org: The org alias or username to deploy to (from sf config get target-org or user-specified)

Workflow

Phase 1 — Present Default Names and Get Confirmation
  1. Show the user the default names that will be used for the territory components. Read references/territory-metadata.md for the exact XML templates and default names.

Present the names in a table:

markdown
| Component | Default Name |
|-----------|-------------|
| Territory Type | Geographical |
| Territory Model | LSC Territory Model |
| Territory (Level 1 - Region) | RD - West 20D |
| Territory (Level 2 - District) | DM - San Francisco 20D02 |
| Territory (Level 3 - Territory) | TM - SPC - San Francisco North 20D02T11 |
  1. Ask the user if they are fine with these names or want to change any of them. Ask for each component individually:

    • "Are you fine with the Territory Type name 'Geographical' or would you like to change it?"
    • "Are you fine with the Territory Model name 'LSC Territory Model' or would you like to change it?"
    • "Are you fine with the Region territory name 'RD - West 20D' or would you like to change it?"
    • "Are you fine with the District territory name 'DM - San Francisco 20D02' or would you like to change it?"
    • "Are you fine with the Territory name 'TM - SPC - San Francisco North 20D02T11' or would you like to change it?"
  2. If the user wants to change a name, ask them for the new name they'd like to use. Record the updated name.

Phase 2 — Preview and Confirm
  1. Display a complete preview of what will be created, showing the final XML for each component with the confirmed names. Use the templates from references/territory-metadata.md and substitute any user-provided names.

Show the preview in this format:

text
=== Territory Type ===
Name: <confirmed name>
Priority: 1

=== Territory Model ===
Name: <confirmed model name>

=== Territory Hierarchy ===
Level 1 (Region): <confirmed region name>
  └── Level 2 (District): <confirmed district name>
        └── Level 3 (Territory): <confirmed territory name>

Access Levels (all territories):
- Account: Read
- Contact: Edit
- Case: None
- Opportunity: None
  1. Ask for final confirmation: "Ready to create and deploy these territory components? (yes/no)"

If user says no, go back to Phase 1.

Phase 3 — Create and Deploy
  1. Create a temporary SFDX project structure for deployment. Read references/territory-metadata.md for the exact file structure and XML content.

The directory structure must be:

text
territory-deploy/
├── sfdx-project.json
└── force-app/
    └── main/
        └── default/
            └── territory2Models/
                ├── <ModelApiName>.territory2Model-meta.xml
                └── <ModelApiName>/
                    ├── territory2Types/
                    │   └── <TypeApiName>.territory2Type-meta.xml
                    └── territories/
                        ├── <Level1ApiName>.territory2-meta.xml
                        ├── <Level2ApiName>.territory2-meta.xml
                        └── <Level3ApiName>.territory2-meta.xml
  1. Generate API names from user-confirmed display names:

    • Remove special characters, spaces, and hyphens
    • Use PascalCase for the API name
    • Territory type API name is derived from the type display name
    • Territory model API name is derived from the model display name (remove spaces)
    • Territory API names are derived from territory display names (remove spaces, hyphens, special chars)
  2. Write the metadata files using the templates from references/territory-metadata.md with confirmed names.

  3. Deploy the metadata using:

    bash
    sf project deploy start --source-dir territory-deploy/force-app --target-org <org>
  4. Check deployment status — if it fails, show the error and suggest remediation.

    STOP-GATE (component count). The single deploy package must land the complete hierarchy: 1 Territory2Type + 1 Territory2Model + 3 Territory2 records (one Region, one District, one Territory). Confirm the deploy result reports 0 component failures AND verify the territories exist before activating:

    bash
    sf data query --query "SELECT COUNT(Id) c FROM Territory2 WHERE Territory2Model.DeveloperName = '<ModelApiName>'" --target-org <org> --json

    The count MUST be 3. A parent-reference failure (e.g. the District deploying before its Region) can land a partial hierarchy — a Level-3 territory with no path to its Region silently breaks downstream user/visit territory assignment. Do NOT activate the model (Phase 4) until all 3 territories are present with 0 deploy failures.

Show full SKILL.md (523 more words)Show less
Phase 4 — Activate Territory Model
  1. Report that the model deployed in Planning state and ask the user if they want to activate it. Include this warning:

    Note: Once a Territory Model is activated, it can be deactivated but cannot be deleted. Do you want to proceed with activation?

  2. If the user confirms activation, activate the model by querying its record ID then updating its State to 'Activating' (not 'Active' — the platform transitions asynchronously from Activating → Active):

    bash
    # Query the model ID and current state
    sf data query --query "SELECT Id, State FROM Territory2Model WHERE DeveloperName = '<ModelApiName>' LIMIT 1" --target-org <org> --json

    If the model is in Planning state, update it:

    bash
    sf data update record --sobject Territory2Model --record-id <ModelId> --values "State='Activating'" --target-org <org>

    See references/territory-metadata.md for the full activation logic including error handling.

  3. Verify activation — the platform transitions asynchronously from Activating → Active. Query to confirm:

    bash
    sf data query --query "SELECT Id, DeveloperName, State FROM Territory2Model WHERE DeveloperName='<ModelApiName>'" --target-org <org>

    If still Activating, wait a moment and query again until it reaches Active.

  4. If the user declines activation, report that the model is in Planning state and can be activated later from Setup.

  5. Report success — confirm to the user that all components are created, and report the model's current state (Planning, Activating, or Active).


Rules / Constraints

ConstraintRationale
Create exactly one territory per level — one Level-1 Region, one Level-2 District, one Level-3 Territory (3 territories total)Skill produces a single representative hierarchy branch, not a fully populated multi-child tree
Always confirm names before creatingUser may want to customize territory names for their org
Show preview before deployingUser should see exactly what will be created
Deploy all components togetherTerritory hierarchy has dependencies (parent references)
Warn user before activation that model cannot be deleted once activeIrreversible action — user must explicitly consent
Set State to 'Activating' (not 'Active') when updating the recordThe platform handles the async transition from Activating → Active
Target the update by --record-id <ModelId> or --where "DeveloperName='<ModelApiName>'"Both forms work for sf data update record; use whichever is convenient
Clean up temp directory after deployDon't leave deployment artifacts behind

Gotchas

IssueResolution
Territory model already exists with same nameCheck first with a query; ask user if they want a different name
Territory type already existsCheck first; reuse existing type if it matches
Deploy fails due to parent territory not foundEnsure all territories are in the same deployment package
Setting State to 'Active' directly fails with INVALID_STATUSAlways set State to 'Activating' — the platform transitions to Active asynchronously
Model state shows Activating after updateThis is normal — activation is async. Wait and re-query until Active
API name conflictsEnsure generated API names don't conflict with existing metadata

Output Expectations

Deliverables:

  • Created Territory Type with confirmed name
  • Created Territory Model with confirmed name
  • Created 3-level territory hierarchy with confirmed names
  • Territory Model activated (or manual activation steps if programmatic activation fails)
  • Confirmation message showing all created components and their status

Reference File Index

FileWhen to read
references/territory-metadata.mdDuring all phases — contains XML templates, file structure, and default values for territory components

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/life-sciences-territory-configure of forcedotcom/sf-skills.

  • SKILL.md
  • references/territory-metadata.md

Open the folder on GitHubat commit e5164d9

Compare with similar skills

Life Sciences Territory Configure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Life Sciences Territory Configure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Life Sciences Territory Configure this skillforcedotcom/sf-skills1.1k—~2.7kAutomated safety check: PassApache-2.0
Auditing Azure Active Directory Configurationmukul975/Anthropic-Cybersecurity-Skills34k—~3kAutomated safety check: PassApache-2.0
Configuring Active Directory Tiered Modelmukul975/Anthropic-Cybersecurity-Skills34k—~687Automated safety check: PassApache-2.0
Configure Channelopenclaw/openclaw392k—~946Automated safety check: PassMIT
Hugging ScienceK-Dense-AI/scientific-agent-skills48k1 repos~2.9kAutomated safety check: NotesMIT
ConfigurationBuilderIO/agent-native7.1k—~2.1kAutomated safety check: PassNone

Similar skills

  • Auditing Azure Active Directory Configuration

    mukul975/Anthropic-Cybersecurity-Skills

    Auditing Microsoft Entra ID (Azure Active Directory) configuration to identify risky authentication policies, overly permissive role assignments, stale accounts, conditional access gaps, and guest…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Configuring Active Directory Tiered Model

    mukul975/Anthropic-Cybersecurity-Skills

    Implement Microsoft's Enhanced Security Admin Environment (ESAE) tiered administration model for Active Directory, covering Tier 0/1/2 separation, privileged access workstations (PAWs)…

    34k GitHub stars~687 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Configure Channel

    openclaw/openclaw

    Configure and prove a chat channel with non-interactive one-liners; secrets only as SecretRefs.

    392k GitHub stars~946 tokensUpdated today
    Auto-check passed
  • Hugging Science

    K-Dense-AI/scientific-agent-skills

    Discovers and evaluates scientific datasets, models, methodology posts, and Spaces through the Hugging Science catalog.

    48k GitHub starsUsed in 1 repo~2.9k tokens
    Research & ScienceAuto-check: notes
  • Configuration

    BuilderIO/agent-native

    Where a configuration value belongs — app config schema, agent-native.config.ts, or an environment variable — and how the layers resolve.

    7.1k GitHub stars~2.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Puzzle Activity Planner

    sickn33/agentic-awesome-skills

    Plan puzzle-based activities for classrooms, parties, and events with pre-configured generator links

    47k GitHub starsUsed in 1 repo~790 tokens
    Auto-check passed

More from forcedotcom/sf-skills

All 251 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated 2 days ago
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed

Questions about Life Sciences Territory Configure

What does Life Sciences Territory Configure do?

A skill your agent uses to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud. Life Sciences Territory Configure is an agent skill from forcedotcom/sf-skills. Use this skill to create and activate a Territory Type, Territory Model, and Territories for Life Sciences Cloud.

When should I use Life Sciences Territory Configure?

Life Sciences Territory Configure fits situations like: create and activate a Territory Type; territory Model; territories for Life Sciences Cloud; the user says set up territories.

How do I install Life Sciences Territory Configure in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill life-sciences-territory-configure -a claude-code`. Or copy the skill folder (skills/life-sciences-territory-configure in forcedotcom/sf-skills) into .claude/skills/life-sciences-territory-configure in your project. Claude Code loads it when a task matches its description.

How do I install Life Sciences Territory Configure in Codex?

Run `npx skills add forcedotcom/sf-skills --skill life-sciences-territory-configure -a codex`. Or copy the skill folder (skills/life-sciences-territory-configure in forcedotcom/sf-skills) into .agents/skills/life-sciences-territory-configure in your project. Codex loads it when a task matches its description.

Can I use Life Sciences Territory Configure in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill life-sciences-territory-configure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/life-sciences-territory-configure, .gemini/skills/life-sciences-territory-configure, .github/skills/life-sciences-territory-configure and .opencode/skills/life-sciences-territory-configure in your project.

What does Life Sciences Territory Configure need to run?

Going by SKILL.md and its folder, Life Sciences Territory Configure needs the command-line tools its instructions call (sf).

Does Life Sciences Territory Configure access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Life Sciences Territory Configure safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Life Sciences Territory Configure use?

Life Sciences Territory Configure is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Life Sciences Territory Configure use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Life Sciences Territory Configure?

Skills that share tags, products or a category with Life Sciences Territory Configure: Auditing Azure Active Directory Configuration (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Configuring Active Directory Tiered Model (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Configure Channel (openclaw/openclaw, 392k stars) and Hugging Science (K-Dense-AI/scientific-agent-skills, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Life Sciences Territory Configure?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,065 GitHub stars. The repository holds 251 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.