/palantir-pack:palantir-security-basicsfrom palantir-pack
Applies Palantir Foundry security best practices for API tokens, OAuth2 scopes, credential storage, and secret rotation across dev/staging/prod environments.
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.
Security best practices for Foundry API tokens, OAuth2 credentials, scope management, and secret rotation. Covers both personal access tokens (dev) and service user credentials (production).
# .env — NEVER commit to git
FOUNDRY_HOSTNAME=mycompany.palantirfoundry.com
FOUNDRY_CLIENT_ID=your-client-id
FOUNDRY_CLIENT_SECRET=your-client-secret
# .gitignore — ensure .env files are excluded
echo '.env' >> .gitignore
echo '.env.local' >> .gitignore
echo '.env.*.local' >> .gitignore
For production, use a secrets manager:
# AWS Secrets Manager
aws secretsmanager create-secret --name foundry/prod \
--secret-string '{"client_id":"xxx","client_secret":"yyy","hostname":"zzz"}'
# Google Cloud Secret Manager
echo -n "your-client-secret" | gcloud secrets create foundry-client-secret --data-file=-
# HashiCorp Vault
vault kv put secret/foundry client_id=xxx client_secret=yyy
| Environment | Recommended Scopes | Rationale |
|---|---|---|
| Development | api:read-data | Read-only prevents accidental mutations |
| Staging | api:read-data, api:write-data | Test writes in safe environment |
| Production | Only scopes your app actually needs | Minimize blast radius |
# Production app that only reads Ontology objects:
auth = foundry.ConfidentialClientAuth(
client_id=os.environ["FOUNDRY_CLIENT_ID"],
client_secret=os.environ["FOUNDRY_CLIENT_SECRET"],
hostname=os.environ["FOUNDRY_HOSTNAME"],
scopes=["api:ontology-read"], # Minimum viable scope
)
# 1. Generate new credentials in Developer Console
# 2. Deploy new credentials alongside old ones
# 3. Verify new credentials work
python -c "
import os, foundry
auth = foundry.ConfidentialClientAuth(
client_id=os.environ['NEW_CLIENT_ID'],
client_secret=os.environ['NEW_CLIENT_SECRET'],
hostname=os.environ['FOUNDRY_HOSTNAME'],
scopes=['api:read-data'],
)
auth.sign_in_as_service_user()
print('New credentials verified')
"
# 4. Remove old credentials from Developer Console
# 5. Update environment variables to use new credentials only
# Scan for leaked credentials in git history
git log --all -p | grep -i "foundry_token\|foundry_client_secret" | head -5
# If found: rotate immediately, then use git-filter-repo to remove
# Pre-commit hook to prevent committing secrets
# .pre-commit-config.yaml
# - repo: https://github.com/Yelp/detect-secrets
# hooks:
# - id: detect-secrets
.env files listed in .gitignore| Security Issue | Detection | Mitigation |
|---|---|---|
| Exposed token in git | detect-secrets scan | Rotate immediately, scrub history |
| Overly broad scopes | Audit app permissions | Reduce to minimum needed |
| Stale credentials | Age > 90 days | Rotate on schedule |
| Shared credentials | Multiple users same token | Create per-user service users |
For production deployment, see palantir-prod-checklist.
What SKILL.md sets; muted values are Claude Code's defaults
24 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-core-workflow-aBuild Palantir Foundry data pipelines using Python transforms.
Use when creating ETL pipelines, writing @transform decorators,
or building dataset-to-dataset processing in Foundry.
Trigger with phrases like "palantir pipeline", "foundry transform",
"palantir ETL", "palantir data pipeline", "foundry python transform".
/palantir-core-workflow-bWork with Palantir Foundry Ontology objects, actions, and queries via SDK.
Use when querying objects, applying actions, linking objects,
or building Ontology-driven applications.
Trigger with phrases like "palantir ontology", "foundry objects",
"palantir actions", "ontology query", "OSDK objects".
/palantir-cost-tuningOptimize Palantir Foundry costs through compute tuning, incremental builds, and usage monitoring.
Use when analyzing Foundry compute costs, reducing API usage,
or implementing cost monitoring for Foundry workloads.
Trigger with phrases like "palantir cost", "foundry billing",
"reduce foundry costs", "foundry pricing", "foundry expensive".
/palantir-data-handlingImplement Palantir Foundry data handling with PII protection, markings, and GDPR compliance.
Use when handling sensitive data in Foundry, implementing data classifications,
or ensuring compliance with privacy regulations.
Trigger with phrases like "palantir data", "foundry PII",
"palantir GDPR", "foundry data protection", "palantir markings".
npx claudepluginhub flight505/skill-forge --plugin palantir-packOther plugins' skills for the same job