AGENT SKILL

palantir-install-auth

Install and configure Palantir Foundry SDK authentication with OAuth2 or token auth. Use when setting up a new Foundry integration, configuring API credentials, or initializing the foundry-platform-sdk in your project. Trigger with phrases like "install palantir", "setup palantir", "palantir auth", "configure palantir API key", "foundry SDK setup".

License 许可
MIT
最近更新
2026-07-13
Stars
★ 1
Forks
0

01 前言 Front Matter

name
palantir-install-auth
tags
[ "saas", "palantir", "foundry", "authentication", "setup" ]
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
2.0.0
description
Install and configure Palantir Foundry SDK authentication with OAuth2 or token auth. Use when setting up a new Foundry integration, configuring API credentials, or initializing the foundry-platform-sdk in your project. Trigger with phrases like "install palantir", "setup palantir", "palantir auth", "configure palantir API key", "foundry SDK setup".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep
compatible-with
claude-code, codex, openclaw

03 SKILL.md 正文

Palantir Install & Auth

Overview

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.

Prerequisites

  • Python 3.9+ or Node.js 18+
  • A Palantir Foundry enrollment with API access enabled
  • A third-party application registered in Developer Console (for OAuth2)
  • Your Foundry hostname (e.g., mycompany.palantirfoundry.com)

Instructions

Step 1: Install the SDK

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

Step 2: Configure Environment Variables

# .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

Step 3: Initialize with Bearer Token (Development)

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}")

Step 4: Initialize with OAuth2 (Production)

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})")

Step 5: TypeScript OSDK Setup

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,
);

Step 6: Generate Credentials via Developer Console

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

Output

  • SDK installed and importable (foundry-platform-sdk or @osdk/client)
  • Environment variables configured for your Foundry enrollment
  • Authenticated client verified against the Foundry API
  • Ontology or dataset listing confirms read access

Error Handling

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

Examples

SDK Comparison

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

Resources

Next Steps

Proceed to palantir-hello-world for your first Ontology query, or palantir-local-dev-loop for development workflow.

04 同仓库更多 Skills

jukeyman
jukeyman/jukeyman-skills

zustand-store-creator

Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".

★ 1
jukeyman
jukeyman/jukeyman-skills

zero-trust-config-helper

Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".

★ 1
jukeyman
jukeyman/jukeyman-skills

zapier-integration-helper

Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".

★ 1
jukeyman
jukeyman/jukeyman-skills

yaml-config-validator

Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".

★ 1
jukeyman
jukeyman/jukeyman-skills

xvary-stock-research

Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).

★ 1
jukeyman
jukeyman/jukeyman-skills

xss-vulnerability-scanner

Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".

★ 1