/palantir-pack:palantir-install-authfrom palantir-pack
Installs the Palantir Foundry Platform SDK (Python/TypeScript) and configures OAuth2 or bearer token authentication for API access.
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.
Set up the Palantir Foundry Platform SDK (Python or TypeScript) and configure authentication using either bearer tokens for development or OAuth2 client credentials for production. Covers both the Platform SDK for direct API access and the OSDK for Ontology-based workflows.
mycompany.palantirfoundry.com)Python (Platform SDK):
set -euo pipefail
pip install foundry-platform-sdk
python -c "import foundry; print(f'foundry-platform-sdk {foundry.__version__} installed')"
Python (OSDK for Ontology access):
set -euo pipefail
pip install palantir-sdk
python -c "import palantir; print('palantir-sdk installed')"
TypeScript (OSDK):
set -euo pipefail
npm install @osdk/client @osdk/oauth
npx tsc --version
# .env — never commit this file
FOUNDRY_HOSTNAME=mycompany.palantirfoundry.com
# Option A: Bearer token (development only)
FOUNDRY_TOKEN=eyJhbGciOiJS...
# Option B: OAuth2 client credentials (production)
FOUNDRY_CLIENT_ID=abc123
FOUNDRY_CLIENT_SECRET=secret456
import os
import foundry
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
# Verify connection — list datasets
datasets = client.datasets.Dataset.list()
for ds in datasets:
print(f"Dataset: {ds.rid}")
import os
import foundry
auth = foundry.ConfidentialClientAuth(
client_id=os.environ["FOUNDRY_CLIENT_ID"],
client_secret=os.environ["FOUNDRY_CLIENT_SECRET"],
hostname=os.environ["FOUNDRY_HOSTNAME"],
scopes=["api:read-data", "api:write-data"],
)
auth.sign_in_as_service_user()
client = foundry.FoundryClient(
auth=auth,
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
# Verify — fetch ontology metadata
ontologies = client.ontologies.Ontology.list()
for ont in ontologies:
print(f"Ontology: {ont.api_name} (rid={ont.rid})")
import { createClient } from "@osdk/client";
import { createConfidentialOauthClient } from "@osdk/oauth";
const oauthClient = createConfidentialOauthClient(
process.env.FOUNDRY_CLIENT_ID!,
process.env.FOUNDRY_CLIENT_SECRET!,
`https://${process.env.FOUNDRY_HOSTNAME}/multipass/api/oauth2/token`,
);
const client = createClient(
`https://${process.env.FOUNDRY_HOSTNAME}`,
"<your-ontology-rid>",
oauthClient,
);
1. Navigate to https://<hostname>/workspace/developer-console
2. Create a new application > select "Server application"
3. Grant scopes: api:read-data, api:write-data, api:ontology-read
4. Copy client_id and client_secret
5. For quick testing: generate a personal access token under Settings > Tokens
foundry-platform-sdk or @osdk/client)| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Token expired or invalid | Regenerate token in Developer Console |
403 Forbidden | Insufficient scopes | Add required scopes: api:read-data |
ConnectionError | Wrong hostname | Verify FOUNDRY_HOSTNAME has no https:// prefix |
ModuleNotFoundError: foundry | SDK not installed | pip install foundry-platform-sdk (full name) |
SSL certificate verify failed | Corporate proxy/VPN | Set REQUESTS_CA_BUNDLE env var |
| SDK | Package | Use Case |
|---|---|---|
| Platform SDK | foundry-platform-sdk | Direct REST: datasets, branches, files, builds |
| Python OSDK | palantir-sdk | Ontology objects, actions, queries, links |
| TypeScript OSDK | @osdk/client | Frontend/Node.js Ontology access |
Proceed to palantir-hello-world for your first Ontology query, or palantir-local-dev-loop for development workflow.
What 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