palantir-local-dev-loop
Configure Palantir Foundry local development with Python transforms and testing. Use when setting up a development environment, running transforms locally, or establishing a fast iteration cycle with Foundry. Trigger with phrases like "palantir dev setup", "palantir local development", "foundry local dev", "develop with palantir".
Best use case
palantir-local-dev-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Palantir Foundry local development with Python transforms and testing. Use when setting up a development environment, running transforms locally, or establishing a fast iteration cycle with Foundry. Trigger with phrases like "palantir dev setup", "palantir local development", "foundry local dev", "develop with palantir".
Teams using palantir-local-dev-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/palantir-local-dev-loop/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How palantir-local-dev-loop Compares
| Feature / Agent | palantir-local-dev-loop | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Palantir Foundry local development with Python transforms and testing. Use when setting up a development environment, running transforms locally, or establishing a fast iteration cycle with Foundry. Trigger with phrases like "palantir dev setup", "palantir local development", "foundry local dev", "develop with palantir".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# Palantir Local Dev Loop
## Overview
Set up local development for Palantir Foundry integrations. Covers running transforms locally against sample data, mocking the Foundry API for fast iteration, and testing with pytest before pushing to Foundry.
## Prerequisites
- Completed `palantir-install-auth` setup
- Python 3.9+ with pip
- A Foundry Code Repository cloned locally (or a standalone project)
## Instructions
### Step 1: Project Structure
```
my-foundry-project/
├── src/myproject/
│ ├── __init__.py
│ ├── pipeline.py # @transform functions
│ └── utils.py # Shared logic
├── tests/
│ ├── conftest.py # Fixtures with sample DataFrames
│ ├── test_pipeline.py # Transform unit tests
│ └── sample_data/ # CSV/Parquet test fixtures
├── .env # FOUNDRY_HOSTNAME, FOUNDRY_TOKEN
├── requirements.txt # foundry-platform-sdk, pytest, pyspark
└── pyproject.toml
```
### Step 2: Install Local Dependencies
```bash
set -euo pipefail
pip install foundry-platform-sdk pyspark pytest pandas
python -c "import foundry; import pyspark; print('Dependencies ready')"
```
### Step 3: Test Transforms Locally with PySpark
```python
# tests/conftest.py
import pytest
from pyspark.sql import SparkSession
@pytest.fixture(scope="session")
def spark():
return SparkSession.builder.master("local[2]").appName("test").getOrCreate()
@pytest.fixture
def sample_orders(spark):
data = [
("ORD-001", "alice@company.com", "2026-03-01", 99.99),
("ORD-002", "bob@test.com", "2026-03-02", 49.99), # test email
(None, "carol@company.com", "2026-03-03", 149.99), # null ID
]
return spark.createDataFrame(data, ["order_id", "email", "order_date_str", "total"])
```
```python
# tests/test_pipeline.py
from myproject.pipeline import clean_orders
def test_clean_orders_removes_nulls_and_test_emails(sample_orders):
result = clean_orders(sample_orders)
assert result.count() == 1 # Only alice remains
assert result.columns == ["order_id", "email", "order_date", "total_cents"]
row = result.first()
assert row.total_cents == 9999 # 99.99 * 100
```
### Step 4: Mock Foundry API for Integration Tests
```python
# tests/test_api.py
import pytest
from unittest.mock import MagicMock, patch
def test_list_ontology_objects():
mock_client = MagicMock()
mock_client.ontologies.OntologyObject.list.return_value.data = [
MagicMock(properties={"fullName": "Alice", "department": "Engineering"}),
]
result = mock_client.ontologies.OntologyObject.list(
ontology="test", object_type="Employee", page_size=10
)
assert len(result.data) == 1
assert result.data[0].properties["fullName"] == "Alice"
```
### Step 5: Run Tests
```bash
set -euo pipefail
pytest tests/ -v --tb=short
# Expected: all tests pass against local Spark + mocked API
```
### Step 6: Live API Smoke Test (Optional)
```python
# scripts/smoke_test.py — runs against real Foundry (needs credentials)
import os, foundry, sys
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
try:
ontologies = list(client.ontologies.Ontology.list())
print(f"Smoke test passed: {len(ontologies)} ontologies accessible")
except foundry.ApiError as e:
print(f"Smoke test failed: {e.status_code} {e.message}", file=sys.stderr)
sys.exit(1)
```
## Output
- Local PySpark environment for testing transforms without Foundry
- Mocked Foundry API client for integration tests
- pytest suite validating pipeline logic
- Optional live smoke test for credential verification
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `Java not found` (PySpark) | JDK not installed | Install JDK 11+: `apt install openjdk-11-jdk` |
| `ModuleNotFoundError: pyspark` | Missing dependency | `pip install pyspark` |
| Import error on transform functions | Circular imports | Keep transforms in separate modules |
| Spark `AnalysisException` | Column name mismatch | Print `df.columns` in test to debug |
## Examples
### Watch Mode with pytest-watch
```bash
pip install pytest-watch
ptw tests/ -- -v --tb=short
# Re-runs tests on every file save
```
## Resources
- [Foundry Local Development](https://www.palantir.com/docs/foundry/transforms-python/local-development)
- [Code Examples](https://www.palantir.com/docs/foundry/code-examples/foundry-apis-local-environment)
- [PySpark Testing](https://spark.apache.org/docs/latest/api/python/getting_started/testing_pyspark.html)
## Next Steps
- Apply SDK patterns: `palantir-sdk-patterns`
- Build data pipelines: `palantir-core-workflow-a`Related Skills
workhuman-local-dev-loop
Workhuman local dev loop for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman local dev loop".
wispr-local-dev-loop
Wispr Flow local dev loop for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr local dev loop".
windsurf-local-dev-loop
Configure Windsurf local development workflow with Cascade, Previews, and terminal integration. Use when setting up a development environment, configuring Turbo mode, or establishing a fast iteration cycle with Windsurf AI. Trigger with phrases like "windsurf dev setup", "windsurf local development", "windsurf dev environment", "windsurf workflow", "develop with windsurf".
webflow-local-dev-loop
Configure a Webflow local development workflow with TypeScript, hot reload, mocked API tests, and webhook tunneling via ngrok. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with the Webflow Data API. Trigger with phrases like "webflow dev setup", "webflow local development", "webflow dev environment", "develop with webflow".
vercel-local-dev-loop
Configure Vercel local development with vercel dev, environment variables, and hot reload. Use when setting up a development environment, testing serverless functions locally, or establishing a fast iteration cycle with Vercel. Trigger with phrases like "vercel dev setup", "vercel local development", "vercel dev environment", "develop with vercel locally".
veeva-local-dev-loop
Veeva Vault local dev loop for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva local dev loop".
vastai-local-dev-loop
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai".
twinmind-local-dev-loop
Set up local development workflow with TwinMind API integration. Use when building applications that integrate TwinMind transcription, testing API calls locally, or developing meeting automation tools. Trigger with phrases like "twinmind dev setup", "twinmind local development", "twinmind API testing", "build with twinmind".
together-local-dev-loop
Together AI local dev loop for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together local dev loop".
techsmith-local-dev-loop
TechSmith local dev loop for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith local dev loop".
supabase-local-dev-loop
Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".
stackblitz-local-dev-loop
Configure local development for WebContainer applications with hot reload and testing. Use when building browser-based IDEs, testing WebContainer file operations, or setting up development workflows for WebContainer projects. Trigger: "stackblitz dev setup", "webcontainer local", "test webcontainers locally".