/palantir-pack:palantir-hello-worldfrom palantir-pack
Creates a minimal working Palantir Foundry example that queries Ontology objects, reads datasets, and applies actions via the REST API using the foundry-platform-sdk Python library. Useful for starting new Foundry integrations or testing setup.
Ships in palantir-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Build a minimal working example that connects to Palantir Foundry, queries Ontology objects via the REST API, reads a dataset, and applies an action. Uses real foundry-platform-sdk Python API calls.
palantir-install-auth setupimport os
import foundry
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
# List all ontologies you have access to
for ont in client.ontologies.Ontology.list():
print(f"Ontology: {ont.api_name} RID: {ont.rid}")
# List objects of type "Employee" from the default ontology
# The object type api_name comes from your Ontology configuration
ONTOLOGY = "your-ontology-api-name"
OBJECT_TYPE = "Employee"
objects = client.ontologies.OntologyObject.list(
ontology=ONTOLOGY,
object_type=OBJECT_TYPE,
page_size=5,
)
for obj in objects.data:
props = obj.properties
print(f" {props.get('fullName', 'N/A')} — {props.get('department', 'N/A')}")
employee = client.ontologies.OntologyObject.get(
ontology=ONTOLOGY,
object_type=OBJECT_TYPE,
primary_key="EMP-001",
)
print(f"Found: {employee.properties}")
# Read rows from a Foundry dataset (tabular)
DATASET_RID = "ri.foundry.main.dataset.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# Get dataset metadata
dataset = client.datasets.Dataset.get(dataset_rid=DATASET_RID)
print(f"Dataset: {dataset.name}, Path: {dataset.path}")
# Read rows from the dataset (CSV format)
content = client.datasets.Dataset.read(
dataset_rid=DATASET_RID,
branch_id="master",
format="arrow", # or "csv"
)
print(f"Read {len(content)} bytes of data")
# Actions modify objects — e.g., updating an employee's department
result = client.ontologies.Action.apply(
ontology=ONTOLOGY,
action_type="updateDepartment",
parameters={
"employeeId": "EMP-001",
"newDepartment": "Engineering",
},
)
print(f"Action result: {result.validation}")
set -euo pipefail
python hello_foundry.py
# Expected output:
# Ontology: my-company RID: ri.ontology.main.ontology.xxx
# Employee: Jane Doe — Engineering
# Action result: VALID
| Error | Cause | Solution |
|---|---|---|
ObjectTypeNotFound | Wrong api_name | Check Ontology Manager for exact object type names |
ObjectNotFound | Invalid primary key | Verify the key exists; keys are case-sensitive |
ActionValidationFailed | Missing required params | Check action definition for required parameters |
DatasetNotFound | Wrong RID or no access | Verify RID in Foundry UI; check project permissions |
401 Unauthorized | Token expired | Regenerate in Developer Console |
# List objects via REST
curl -s -H "Authorization: Bearer $FOUNDRY_TOKEN" \
"https://$FOUNDRY_HOSTNAME/api/v2/ontologies/my-ontology/objects/Employee?pageSize=5" \
| python -m json.tool
import { createClient } from "@osdk/client";
import { Employee } from "@my-app/sdk"; // generated from OSDK
const employees = await client(Employee)
.where({ department: "Engineering" })
.fetchPage({ pageSize: 10 });
employees.data.forEach(emp => console.log(emp.fullName));
palantir-local-dev-looppalantir-core-workflow-apalantir-core-workflow-bWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub flight505/skill-forge --plugin palantir-pack24 skills in this plugin
/palantir-ci-integrationConfigure CI/CD pipelines for Palantir Foundry integrations with GitHub Actions.
Use when setting up automated testing, running transforms validation,
or integrating Foundry SDK tests into your build process.
Trigger with phrases like "palantir CI", "foundry GitHub Actions",
"palantir automated tests", "CI foundry".
/palantir-common-errorsDiagnose and fix Palantir Foundry common errors and API exceptions.
Use when encountering Foundry errors, debugging failed API calls,
or troubleshooting transform build failures.
Trigger with phrases like "palantir error", "fix palantir",
"foundry not working", "debug foundry", "palantir 401 403".
/palantir-Other plugins' skills for the same job