Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

perplexity-policy-guardrails

verified

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 GitHub

Marketplace

claude-code-plugins-plus

jeremylongshore/claude-code-plugins-plus-skills

Plugin

perplexity-pack

ai-ml

Repository

jeremylongshore/claude-code-plugins-plus-skills
1.2kstars

plugins/saas-packs/perplexity-pack/skills/perplexity-policy-guardrails/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
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-guardrails

Installation paths:

Claude
.claude/skills/perplexity-policy-guardrails/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5635 chars