Xpersona
A

api-review

CLAWHUB · Unverified

Evaluates API surface design, consistency, and exemplar alignment Skill: api-review Owner: athola Summary: Evaluates API surface design, consistency, and exemplar alignment Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:18:14.686Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:38:32.817Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:55:13.920Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:03:40.810Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:21:46.709Z | user Re

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-pensive-api-review
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-api-review/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,087 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: api-review
description: Evaluates API surface design, consistency, and exemplar alignment
version: 1.9.8
triggers:
  - api
  - design
  - consistency
  - documentation
  - versioning
  - reviewing public API changes or before releasing a new API surface
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/pensive", "emoji": "\ud83d\udd0d", "requires": {"config": ["night-market.pensive:shared", "night-market.imbue:proof-of-work"]}}}
source: claude-night-market
source_plugin: pensive
---

> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


# API Review Workflow

## Table of Contents

1. [Usage](#usage)
2. [Required Progress Tracking](#required-progress-tracking)
3. [Workflow](#workflow)

## Usage

Use this skill to review public API changes, design new surfaces, audit consistency, and validate documentation completeness. Run it before any API release to confirm alignment with project guidelines.

## Required Progress Tracking

1. `api-review:surface-inventory`
2. `api-review:exemplar-research`
3. `api-review:consistency-audit`
4. `api-review:docs-governance`
5. `api-review:evidence-log`

## Workflow

### Step 1: Surface Inventory

Catalog all public APIs by language. Record stability levels, feature flags, and versioning metadata. Use tools like `rg` to find public symbols (e.g., `pub` in Rust or non-underscored `def` in Python). Confirm the working tree state with `git status` before starting.

### Step 2: Exemplar Research

Identify at least two high-quality API references for the relevant language, such as pandas, requests, or tokio. Document their patterns for namespacing, pagination, error handling, and structure to serve as a baseline for the audit.

### Step 3: Consistency Audit

Compare the project's API against the identified exemplar patterns. Analyze naming conventions, parameter ordering, return types, and error semantics. Identify duplication, leaky abstractions, missing feature gates, and documentation gaps.

### Step 4: Documentation Governance

Validate that documentation includes entry points, quickstarts, and a complete API reference. Verify that changelogs and migration notes are maintained. Check for SemVer compliance, stability promises, and clear deprecation timelines. Confirm that documentation is generated automatically using tools like rustdoc, Sphinx, or OpenAPI.

### Step 5: Evidence Log

Record all executed commands and findings. Summarize the final recommendation as Approve, Approve with actions, or Block. Include specific action items with assigned owners and due dates.

## API Quality Checklist

### Naming
Confirm consistent conventions and descriptive names that follow language-specific idioms.

### Parameters
Verify consistent ordering and ensure optional parameters have expl

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-pensive-api-review",
  "version": "1.9.19",
  "publishedAt": 1787750294686
}

modules/consistency-audit.md

---
parent_skill: pensive:api-review
name: consistency-audit
description: Audit API consistency against patterns and exemplars
category: api-analysis
tags: [api, consistency, audit, patterns]
---

# Consistency Audit

Compare API surfaces against exemplar patterns and internal consistency rules.

## Naming Consistency

### Check Patterns
- **Verb/noun ordering**: `get_user` vs `user_get`
- **Pluralization**: `get_items` vs `get_item_list`
- **Abbreviations**: `cfg` vs `config`, `ctx` vs `context`
- **Case conventions**: snake_case, camelCase, PascalCase

### Commands
```bash
# Function name patterns
rg -n "^(pub )?fn " src | cut -d: -f2 | sort | uniq -c

# Type name patterns
rg -n "^(pub )?struct|enum|type" src

# HTTP endpoint patterns
rg -n "path.*=.*\"" src | grep -o '"[^"]*"' | sort
```

### Red Flags
- Mixed naming conventions in same module
- Inconsistent verb prefixes (get vs fetch vs retrieve)
- Language idiom violations

## Parameter Conventions

### Check for Consistency
1. **Ordering**: receiver, required, optional, callbacks
2. **Optional handling**: Option types, defaults, overloads
3. **Builder patterns**: When to use vs direct construction
4. **Type annotations**: Complete and accurate

### Language-Specific

#### Rust
```rust
// Consistent ordering: receiver, required, optional
impl Client {
    pub fn new(config: Config) -> Self { }
    pub fn with_timeout(mut self, timeout: Duration) -> Self { }
}
```

#### Python
```python
# Consistent optional parameters
def read_data(path: str,
              format: str = "csv",
              encoding: str = "utf-8") -> DataFrame:
    pass
```

#### Go
```go
// Consistent context placement
func GetUser(ctx context.Context, id string) (*User, error)
```

### Audit Commands
```bash
# Parameter counts and patterns
rg -n "fn \w+\(" src | rg -o "\(.*\)" | sort | uniq -c

# Optional parameter patterns
rg -n "Option<|Optional<|\?:" src
```

## Return Type Patterns

### Consistency Checks
- **Error handling**: Result types, exceptions, error tuples
- **Null handling**: Option types, nullable annotations
- **Collection returns**: List, Array, Iterator
- **Pagination**: Page objects, cursor tokens

### By Language

#### Rust
```bash
# Result usage
rg -n "-> Result<" src

# Option usage
rg -n "-> Option<" src
```

#### Python
```bash
# Type hints
rg -n "-> (List|Dict|Optional|Union)" package

# Exception documentation
rg -n "Raises:" docs
```

#### Go
```bash
# Error returns (should be last)
rg -n "func .* \(.*error\)$" .

# Pointer returns
rg -n "func .* \*\w+," .
```

### Red Flags
- Mixed error handling strategies
- Inconsistent null/empty semantics
- Varying pagination approaches

## Error Semantics

### Check Consistency
1. **Error types**: Custom vs standard
2. **Error messages**: Format and detail level
3. **Error codes**: Numeric, string, or enum
4. **Retry guidance**: Transient vs permanent

### Audit Pattern
```bash
# Custom error types
rg -n "struct \w*Error|enum \w*Error" src

# Error creati

modules/exemplar-research.md

---
parent_skill: pensive:api-review
name: exemplar-research
description: Research high-quality API exemplars for pattern guidance
category: api-analysis
tags: [api, exemplars, best-practices, patterns]
---

# Exemplar Research

Identify and analyze high-quality API references to establish pattern baselines.

## Language-Specific Exemplars

### Python
**pandas DataFrame API**
- Namespace: `pd.DataFrame.*`
- Patterns: Method chaining, symmetric I/O (`read_*`/`to_*`)
- Documentation: Multi-level (quickstart, API reference, examples)
- URL: https://pandas.pydata.org/docs/reference/frame.html

**requests Session API**
- Namespace: `requests.Session`
- Patterns: Context managers, connection pooling
- Error handling: Structured exceptions hierarchy
- URL: https://requests.readthedocs.io/en/latest/api/

### Rust
**tokio Runtime API**
- Namespace: `tokio::runtime`
- Patterns: Builder pattern, async traits
- Documentation: Module-level docs, examples
- URL: https://docs.rs/tokio/latest/tokio/runtime/

**serde Serialization**
- Namespace: `serde::Serialize`
- Patterns: Derive macros, trait composition
- Stability: Feature gates for optional formats
- URL: https://docs.rs/serde/latest/serde/

### Go
**net/http Package**
- Namespace: `net/http`
- Patterns: Interface composition, handler chains
- Error handling: Explicit error returns
- URL: https://pkg.go.dev/net/http

**database/sql**
- Namespace: `database/sql`
- Patterns: Connection pooling, prepared statements
- Resource management: Explicit Close()
- URL: https://pkg.go.dev/database/sql

### TypeScript
**Express.js Router**
- Namespace: `express.Router`
- Patterns: Middleware composition, fluent API
- Type safety: DefinitelyTyped integration
- URL: https://expressjs.com/en/4x/api.html

### REST APIs
**Stripe API**
- Patterns: Nested resources, pagination, idempotency
- Versioning: Date-based with headers
- Documentation: Interactive examples
- URL: https://stripe.com/docs/api

**GitHub REST API**
- Patterns: HATEOAS links, rate limiting
- Pagination: Link headers, cursor-based
- Errors: Structured error responses
- URL: https://docs.github.com/en/rest

## Pattern Capture

### For Each Exemplar
Record:
1. **Relevance**: Why this exemplar applies
2. **Key patterns**: 2-3 standout design decisions
3. **Documentation approach**: Structure and tooling
4. **Versioning strategy**: How stability is managed

### Common Patterns to Extract

#### Namespacing
- Flat vs hierarchical
- Module organization
- Import conventions

#### Pagination
- Cursor-based
- Offset-based
- Link headers
- Total count metadata

#### Error Handling
- Exception hierarchies
- Error codes/types
- Error response structure
- Retry guidance

#### Authentication
- API keys
- OAuth flows
- Token refresh
- Scope management

## Citation Format

Store references:
```markdown
## Exemplar: [Name]
**Language**: [Rust/Python/etc]
**URL**: [link]
**Relevance**: [why applicable]

### Key Patterns
1. [Pattern 1]: [description]
2. [Pattern 2]: [descripti

modules/surface-inventory.md

---
parent_skill: pensive:api-review
name: surface-inventory
description: Detect and catalog API surfaces across languages
category: api-analysis
tags: [api, inventory, surface, detection]
---

# Surface Inventory

Catalog all public API surfaces, stability promises, and versioning metadata.

## Detection by Language

### Rust
```bash
# Public functions and types
rg -n "^pub" src

# Generate documentation
cargo doc --no-deps

# Check feature flags
rg -n "^#\[cfg\(feature" src
```

### Python
```bash
# Public functions
rg -n "^def [^_]" package

# Exported items
rg -n "^__all__" package

# Sphinx documentation
sphinx-build -b html docs docs/_build
```

### Go
```bash
# List packages
go list ./...

# Public functions
rg -n "^func [A-Z]"

# Generate docs
go doc -all
```

### TypeScript
```bash
# Show configuration
tsc --showConfig

# Exported items
rg -n "^export" src

# Generate documentation
npx typedoc
```

### HTTP/REST APIs
```bash
# Framework endpoints
rg -n "@app\.(get|post|put|delete)"

# OpenAPI spec
grep -n "path:" openapi.yaml
yq eval '.paths' openapi.yaml
```

## Stability Metadata

### Capture for Each API
- **Stability level**: stable, beta, alpha, experimental
- **Version introduced**: semver or date
- **Deprecation status**: deprecated, planned, stable
- **Feature flags**: compile-time, runtime, experimental

### Commands by Language
```bash
# Rust: Stability attributes
rg -n "#\[(stable|unstable|deprecated)" src

# Python: Version metadata
rg -n "__version__|version_info" package

# Go: Build tags
rg -n "^// \+build" .

# OpenAPI: Version field
yq eval '.info.version' openapi.yaml
```

## Output Structure

Record in evidence log:
```markdown
## Surface Inventory

### Language: [Rust/Python/Go/etc]
- Public functions: N
- Public types: N
- Feature flags: N
- Stability: [table]

### Endpoints (HTTP)
- GET endpoints: N
- POST endpoints: N
- Version: v1, v2

### Stability Distribution
- Stable: N
- Beta: N
- Experimental: N
```

## Versioning Patterns

### SemVer (Rust, Node.js)
```bash
grep "^version" Cargo.toml
grep "\"version\"" package.json
```

### CalVer (APIs)
```bash
yq eval '.info.version' openapi.yaml
```

### Feature Versioning
```bash
# API version headers
rg -n "api-version|API-Version" src
```

Sponsored

Ads related to api-review and adjacent AI workflows.