Skip to content
Back to skills

Tau Prolog Standards

ASecurity

Coding standards and guidelines for Tau Prolog applications, Node.js scripts, and browser DOM targets. Use when targeting Tau Prolog specifically.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 1, 2026
ai-agentsjavascriptjavanode

Works with

  • cli

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add dougransom/prolog-agent-toolkit --skill tau-prolog-standards --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tau Prolog Standards?

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

Security grade badge for Tau Prolog Standards
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dougransom-tau-prolog-standards/badge)](https://www.skillsdirectory.com/skills/dougransom-tau-prolog-standards)

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: tau-prolog-standards
description: Coding standards and guidelines for Tau Prolog applications, Node.js scripts, and browser DOM targets. Use when targeting Tau Prolog specifically.
---

# Tau Prolog Standards

Guidelines for writing idiomatic Tau Prolog code:

## Core Rules

1. **JS Execution & ISO Code Target**: Tau Prolog is an open-source Prolog interpreter implemented entirely in JavaScript for browser and Node.js environments. AI agents should attempt to produce standard ISO-compliant code subject to Tau's capabilities and limitations.
2. **Text & Double Quotes**: Follow standard character lists (`chars`) representation for string manipulation.
3. **DOM & JS Interoperability**:
   - Use `library(dom)` for browser DOM queries and event handling.
   - Use `library(js)` for JavaScript interop and object inspection.
   - Use `library(random)` for random number generation.
4. **Asynchronous Query Execution**:
   - In JavaScript embeddings, handle queries asynchronously using session callback streams (`session.query()`, `session.answer()`).
5. **Library Cheat-Sheet Usage**: Always include explicit `:- use_module(library(...)).` headers based on the Standard Library Cheat Sheet below.
6. **Safety**: Always execute Node.js / CLI runner scripts using `tau-safe` or `prolog-safe` with `PROLOG_ENGINE=tau`.

## Tau Prolog Standard Library Cheat Sheet

> **Universal Coding Standards Note**: The cheat sheet table below specifies Tau-specific module import headers (`:- use_module(library(...)).`) and JS/DOM interop modules. All underlying coding guidelines, purity rules, list manipulation, formatting, and DCG conventions follow the **universal Prolog coding standards** defined in [`prolog-conventions`](../prolog-conventions/SKILL.md) and [`prolog_guidelines.md`](../../references/prolog_guidelines.md).

| Feature / Topic | Import Header | Primary Exported Predicates | Notes / System Rules |
| :--- | :--- | :--- | :--- |
| **DOM Integration** | `:- use_module(library(dom)).` | `get_by_id/2`, `set_html/2`, `add_event_listener/3` | Browser DOM manipulation. |
| **JS Interoperability**| `:- use_module(library(js)).` | `eval/2`, `global/2`, `prop/3` | Direct JavaScript runtime interop. |
| **List Manipulation** | `:- use_module(library(lists)).` | `member/2`, `append/3`, `length/2` | Core ISO list utilities. |
| **Formatted Printing**| `:- use_module(library(format)).` | `format/2`, `format/3` | Formatted string output. |
| **Randomization** | `:- use_module(library(random)).` | `random/1`, `random_integer/3` | JS-backed random generator. |

## Universal Guidelines & References

- [Covington Prolog Style Guide](../../references/covington_style.md)
- [Prolog Purity Guidelines](../../references/prolog_guidelines.md)

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.