Implement Perplexity lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Perplexity integrations, implementing pre-commit hooks, or configuring CI policy checks for Perplexity best practices. Trigger with phrases like "perplexity policy", "perplexity lint", "perplexity guardrails", "perplexity best practices check", "perplexity eslint".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
perplexity-pack
plugins/saas-packs/perplexity-pack/skills/perplexity-policy-guardrails/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/perplexity-pack/skills/perplexity-policy-guardrails/SKILL.md -a claude-code --skill perplexity-policy-guardrailsInstallation paths:
.claude/skills/perplexity-policy-guardrails/# Perplexity Policy & Guardrails
## Overview
Automated policy enforcement and guardrails for Perplexity integrations.
## Prerequisites
- ESLint configured in project
- Pre-commit hooks infrastructure
- CI/CD pipeline with policy checks
- TypeScript for type enforcement
## ESLint Rules
### Custom Perplexity Plugin
```javascript
// eslint-plugin-perplexity/rules/no-hardcoded-keys.js
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Disallow hardcoded Perplexity API keys',
},
fixable: 'code',
},
create(context) {
return {
Literal(node) {
if (typeof node.value === 'string') {
if (node.value.match(/^sk_(live|test)_[a-zA-Z0-9]{24,}/)) {
context.report({
node,
message: 'Hardcoded Perplexity API key detected',
});
}
}
},
};
},
};
```
### ESLint Configuration
```javascript
// .eslintrc.js
module.exports = {
plugins: ['perplexity'],
rules: {
'perplexity/no-hardcoded-keys': 'error',
'perplexity/require-error-handling': 'warn',
'perplexity/use-typed-client': 'warn',
},
};
```
## Pre-Commit Hooks
```yaml
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: perplexity-secrets-check
name: Check for Perplexity secrets
entry: bash -c 'git diff --cached --name-only | xargs grep -l "sk_live_" && exit 1 || exit 0'
language: system
pass_filenames: false
- id: perplexity-config-validate
name: Validate Perplexity configuration
entry: node scripts/validate-perplexity-config.js
language: node
files: '\.perplexity\.json$'
```
## TypeScript Strict Patterns
```typescript
// Enforce typed configuration
interface PerplexityStrictConfig {
apiKey: string; // Required
environment: 'development' | 'staging' | 'production'; // Enum
timeout: number; // Required number, not optional
retries: number;
}
// Disallow any in Perp