Skip to content
Back to skills

Pubfi Dsl Server Contract

ASecurity

Use when defining or validating the server-side contract for PubFi DSL requests, including schema validation, aggregation mapping, limits, and response envelopes.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentssqlapi

Works with

  • api

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill pubfi-dsl-server-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pubfi Dsl Server Contract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pubfi Dsl Server Contract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-pubfi-dsl-server-contract/badge)](https://www.skillsdirectory.com/skills/majiayu000-pubfi-dsl-server-contract)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pubfi-dsl-server-contract
description: Use when defining or validating the server-side contract for PubFi DSL requests, including schema validation, aggregation mapping, limits, and response envelopes.
---

# PubFi DSL Server Contract

## Overview

This skill defines the server-side contract for executing PubFi DSL requests. The server only accepts structured DSL and maps requests to a fixed, audited OpenSearch query shape. The server does not accept SQL, OpenSearch DSL, or natural language compilation.

## When To Use

- You are implementing the DSL validation layer.
- You are defining or auditing the allowed query templates.
- You are designing the response envelope and error model.

## Core Rules

- Reject any request that includes SQL, OpenSearch DSL, or unknown fields.
- Validate against the schema before execution.
- Enforce hard limits for time window, top-k, fields, and aggregation sizes.
- Only execute allowed aggregation primitives (terms, date_histogram, cooccurrence).
- Do not compute business metrics server-side. Return documents and aggregation results only.

## Required Server Behaviors

- Provide a `schema` endpoint that lists allowed fields, aggregation kinds, and hard limits.
- Provide a `query` endpoint that accepts DSL and returns a deterministic response envelope.
- Log request metadata for audit and billing reconciliation.

## Error Model

The server returns errors using `ApiEnvelope` codes and English messages.

- `ERR_INVALID_PAYLOAD`: The request violates schema or limits.
- `ERR_INTERNAL`: The service failed unexpectedly.

Rate limiting and quota enforcement are out of scope for this contract draft and should be implemented at the gateway layer.

## References

- See `references/contract.md` for endpoint definitions, response envelopes, and template mappings.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.