prose-reader
Read and parse an OpenProse program file, extracting its contract (requires, ensures, strategies, errors, invariants) and services into a structured representation
Best use case
prose-reader is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
It is a strong fit for teams already working in Codex.
Read and parse an OpenProse program file, extracting its contract (requires, ensures, strategies, errors, invariants) and services into a structured representation
Teams using prose-reader should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/prose-reader/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How prose-reader Compares
| Feature / Agent | prose-reader | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Read and parse an OpenProse program file, extracting its contract (requires, ensures, strategies, errors, invariants) and services into a structured representation
Which AI agents support this skill?
This skill is designed for Codex.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# Prose Reader Skill
You read and parse OpenProse program files (`.md` with contract semantics), extracting the full contract specification into a structured, human-readable summary.
## Triggers
- "read prose program" / "parse prose file"
- "what does [file] require and ensure"
- "show me the contract for [file]"
- "extract prose contract from [path]"
- "what are the inputs and outputs of [program]"
## Input
A path to a `.md` file that is an OpenProse program (has `requires:` and/or `ensures:` sections).
## Behavior
Given a path to an OpenProse program file:
### Step 0: Detect OpenProse Installation
Before any operation, run `/prose-detect` to locate the OpenProse installation and resolve `PROSE_ROOT`. `/prose-detect` handles the full detection chain (env var, AIWG config, AIWG-local install, project plugin manifest, user home, global CLI).
If `/prose-detect` reports no installation found, do NOT auto-clone. Inform the user:
```
OpenProse not found. Run /prose-setup to install it, or set PROSE_ROOT to an existing installation.
```
### Step 1: Read the File
Read the target file using the Read tool.
### Step 2: Parse Frontmatter
Extract YAML frontmatter fields:
- `name` — program name
- `kind` — `program`, `service`, `library`, or `test`
- `services` — list of service component names (multi-service programs only)
- `model` — preferred model if specified
- Any other frontmatter fields
### Step 3: Extract Contract Elements
Parse the markdown body for contract sections. Each section uses a specific keyword followed by a colon and a list:
| Section | Keyword | Format | Meaning |
|---------|---------|--------|---------|
| Inputs | `requires:` | `- name: description` | What the program needs to run |
| Outputs | `ensures:` | `- name: description` | What the program commits to produce (obligation) |
| Conditional behavior | `strategies:` | `- when condition: action` | How to handle specific situations |
| Failure channels | `errors:` | `- condition description` | When the program cannot proceed |
| Invariants | `invariants:` | `- property description` | Properties that always hold |
### Step 4: Identify Services
If `kind: program` and `services:` is present in frontmatter:
- List each service name
- Check if corresponding `.md` file exists in the same directory
- Note any missing service files
### Step 5: Output Structured Summary
Format the extracted information as:
```markdown
## Program: {name}
**Kind**: {kind}
**Services**: {services list or "single-component"}
**Model**: {model or "not specified"}
### Requires (Inputs)
| Name | Description |
|------|-------------|
| {name} | {description} |
### Ensures (Outputs — Obligations)
| Name | Description |
|------|-------------|
| {name} | {description} |
### Strategies
- when {condition}: {action}
### Errors
- {error condition}
### Invariants
- {invariant property}
### Services
| Service | File | Exists |
|---------|------|--------|
| {name} | {name}.md | {yes/no} |
```
## Edge Cases
- **No `requires:`**: Report as "No declared inputs (implicit)"
- **No `ensures:`**: Flag as warning — all valid programs should have ensures
- **Conditional ensures**: `ensures:` entries with `when` clauses — parse and display the condition
- **Nested services**: If a service itself has `services:`, note the nesting
- **Legacy `.prose` files**: Treat identically to `.md` files
## Model
This skill runs on **Sonnet** — parsing and extraction don't require complex reasoning.
## References
- @$AIWG_ROOT/agentic/code/addons/prose-integration/README.md — prose-integration addon overview
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md — Run prose-detect before reading any program file
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/instruction-comprehension.md — Extract all contract fields; do not skip optional sections
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for AIWG addon integration commandsRelated Skills
prose-validate
Validate an OpenProse program file against Prose contract grammar without executing it — checks frontmatter, contract structure, service references, and strategy syntax
prose-setup
Clone or update the OpenProse repository to ensure AIWG prose tools hook into the latest version of the specification and examples
prose-run
Execute an OpenProse program within the current AIWG session, following the two-phase model (Forme wiring + Prose VM execution)
prose-install
Install OpenProse for AIWG use when no existing installation is found. Tries npx skills add first, falls back to git clone, then saves the resolved path to .aiwg/config.json.
prose-detect
Locate an existing OpenProse installation using a prioritized signal chain — env var, AIWG config, AIWG-local install, project plugin manifest, user home directory, or global CLI. Returns the resolved PROSE_ROOT path. Does not install OpenProse; triggers prose-setup if no installation is found.
aiwg-orchestrate
Route structured artifact work to AIWG workflows via MCP with zero parent context cost
venv-manager
Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
pytest-runner
Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.
vitest-runner
Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.
eslint-checker
Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.
repo-analyzer
Analyze GitHub repositories for structure, documentation, dependencies, and contribution patterns. Use for codebase understanding and health assessment.
pr-reviewer
Review GitHub pull requests for code quality, security, and best practices. Use for automated PR feedback and approval workflows.