Agent skill
pubfi-dsl-server-contract
Use when defining or validating the server-side contract for PubFi DSL requests, including schema validation, aggregation mapping, limits, and response envelopes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pubfi-dsl-server-contract
SKILL.md
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
schemaendpoint that lists allowed fields, aggregation kinds, and hard limits. - Provide a
queryendpoint 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.mdfor endpoint definitions, response envelopes, and template mappings.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?