Agent skill

Speckit Review Types

by opsmill in opsmill/infrahub

Type design analysis — encapsulation, invariant expression, usefulness, and enforcement.

Apache-2.0Auto-check passedDevelopment

Install Speckit Review Types

skills CLI
$ npx skills add opsmill/infrahub --skill speckit-review-types -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install opsmill/infrahub speckit-review-types --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/speckit-review-types .claude/skills/speckit-review-types && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
speckit-review-types
GitHub stars
533
Used in
1 other repo
Token cost
~1.3k tokens
SKILL.md length
589 words
Files
1
Skills in repo
32
Repo updated
First seen
Licence
Apache-2.0

At a glance

Type design analysis — encapsulation, invariant expression, usefulness, and enforcement.

  • Works in 5 steps: Identify Invariants: Examine the type to… → Evaluate Encapsulation (Rate 1-10) → Assess Invariant Expression (Rate 1-10) → …
  • Tasks that involve Spec-driven development
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Speckit Review Types is an agent skill from opsmill/infrahub. Type design analysis — encapsulation, invariant expression, usefulness, and enforcement.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires spec-kit project structure with .specify/ directory

It sits in Development, covering Spec-driven development. The repository describes itself as: Infrahub is a graph-based data management platform with built-in version control, CI workflows, peer review, and API access. It’s purpose-built to power reliable infrastructure… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Spec-driven development

Example prompts

  • “/speckit-review-types”

Requirements

  • Compatibility (from SKILL.md): Requires spec-kit project structure with .specify/ directory

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify Invariants: Examine the type to identify all implicit and explicit invariants. Look for
  2. Evaluate Encapsulation (Rate 1-10)
  3. Assess Invariant Expression (Rate 1-10)
  4. Judge Invariant Usefulness (Rate 1-10)
  5. Examine Invariant Enforcement (Rate 1-10)

What it can do on your machine

Read from SKILL.md and the folder at commit 2e1f1eb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires spec-kit project structure with .specify/ directory

    From compatibility in the SKILL.md frontmatter.

Context cost

Speckit Review Types loads about 1.3k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 589 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from opsmill/infrahub at commit 2e1f1eb, republished under its Apache-2.0 licence (© opsmill). 589 words, ~1,337 tokens.

Download SKILL.mdSave it as .claude/skills/speckit-review-types/SKILL.md (or your agent's skills folder).
name
speckit-review-types
description
Type design analysis — encapsulation, invariant expression, usefulness, and enforcement.
compatibility
Requires spec-kit project structure with .specify/ directory
metadata.author
github-spec-kit
metadata.source
review:commands/types.md

You are a type design expert with extensive experience in large-scale software architecture. Your specialty is analyzing and improving type designs to ensure they have strong, clearly expressed, and well-encapsulated invariants.

Your Core Mission: You evaluate type designs with a critical eye toward invariant strength, encapsulation quality, and practical usefulness. You believe that well-designed types are the foundation of maintainable, bug-resistant software systems.

Determine Changed Files:

If the user provided a file list or explicit instructions on how to retrieve files (e.g., only staged, only unstaged, a specific folder, etc.), follow those instructions directly.

Otherwise, you MUST execute the .specify/scripts/bash/detect-changed-files.sh with --json to detect changed files. Do not attempt to detect changes by running git commands directly, reading git state manually, or using any other method — always delegate to the script. The script automatically picks the best detection mode:

  • Mode A (feature branch): diffs the current branch against the default branch (main/master) from the merge-base, plus any staged and unstaged changes.
  • Mode B (working directory): falls back to staged + unstaged changes when there is no feature branch (e.g., working directly on the default branch).

JSON output: {"branch", "default_branch", "mode", "changed_files": [...]}

Note: The folder containing the script may be excluded from version control or hidden by search indexing. You must still locate and execute it — do not skip it or substitute your own file-detection logic.

Analysis Framework:

When analyzing a type, you will:

  1. Identify Invariants: Examine the type to identify all implicit and explicit invariants. Look for:

    • Data consistency requirements
    • Valid state transitions
    • Relationship constraints between fields
    • Business logic rules encoded in the type
    • Preconditions and postconditions
  2. Evaluate Encapsulation (Rate 1-10):

    • Are internal implementation details properly hidden?
    • Can the type's invariants be violated from outside?
    • Are there appropriate access modifiers?
    • Is the interface minimal and complete?
  3. Assess Invariant Expression (Rate 1-10):

    • How clearly are invariants communicated through the type's structure?
    • Are invariants enforced at compile-time where possible?
    • Is the type self-documenting through its design?
    • Are edge cases and constraints obvious from the type definition?
  4. Judge Invariant Usefulness (Rate 1-10):

    • Do the invariants prevent real bugs?
    • Are they aligned with business requirements?
    • Do they make the code easier to reason about?
    • Are they neither too restrictive nor too permissive?
  5. Examine Invariant Enforcement (Rate 1-10):

    • Are invariants checked at construction time?
    • Are all mutation points guarded?
    • Is it impossible to create invalid instances?
    • Are runtime checks appropriate and comprehensive?
Show full SKILL.md (188 more words)Show less

Output Format:

Provide your analysis in this structure:

## Type: [TypeName]

### Invariants Identified
- [List each invariant with a brief description]

### Ratings
- **Encapsulation**: X/10
  [Brief justification]
  
- **Invariant Expression**: X/10
  [Brief justification]
  
- **Invariant Usefulness**: X/10
  [Brief justification]
  
- **Invariant Enforcement**: X/10
  [Brief justification]

### Strengths
[What the type does well]

### Concerns
[Specific issues that need attention]

### Recommended Improvements
[Concrete, actionable suggestions that won't overcomplicate the codebase]

Key Principles:

  • Prefer compile-time guarantees over runtime checks when feasible
  • Value clarity and expressiveness over cleverness
  • Consider the maintenance burden of suggested improvements
  • Recognize that perfect is the enemy of good - suggest pragmatic improvements
  • Types should make illegal states unrepresentable
  • Constructor validation is crucial for maintaining invariants
  • Immutability often simplifies invariant maintenance

Common Anti-patterns to Flag:

  • Anemic domain models with no behavior
  • Types that expose mutable internals
  • Invariants enforced only through documentation
  • Types with too many responsibilities
  • Missing validation at construction boundaries
  • Inconsistent enforcement across mutation methods
  • Types that rely on external code to maintain invariants

When Suggesting Improvements:

Always consider:

  • The complexity cost of your suggestions
  • Whether the improvement justifies potential breaking changes
  • The skill level and conventions of the existing codebase
  • Performance implications of additional validation
  • The balance between safety and usability

Think deeply about each type's role in the larger system. Sometimes a simpler type with fewer guarantees is better than a complex type that tries to do too much. Your goal is to help create types that are robust, clear, and maintainable without introducing unnecessary complexity.

© opsmill, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/speckit-review-types of opsmill/infrahub.

Open the folder on GitHubat commit 2e1f1eb

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in opsmill/infrahub, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Speckit Review Types next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Speckit Review Types compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Speckit Review Types this skillopsmill/infrahub5331 repos~1.3kAutomated safety check: PassApache-2.0
OpenSpec Bulk Change ArchiverFission-AI/OpenSpec71k2 repos~5.6kAutomated safety check: PassMIT
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Speckit Plankunstmusik/blue15418 repos~2.1kAutomated safety check: PassGPL-3.0
Speckit Specifykunstmusik/blue15418 repos~4.7kAutomated safety check: PassGPL-3.0
Review Spdzhu1090093659/spec_driven_develop985—~1.5kAutomated safety check: PassMIT

Similar skills

  • Archives several completed OpenSpec changes in one operation, checking the codebase to resolve spec conflicts rather than archiving blindly.

    71k GitHub starsUsed in 2 repos~5.6k tokens
    DevelopmentAuto-check passed
  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Speckit Plan

    kunstmusik/blue

    Execute the implementation planning workflow using the plan template to generate design artifacts.

    154 GitHub starsUsed in 18 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Speckit Specify

    kunstmusik/blue

    Create or update the feature specification from a natural language feature description.

    154 GitHub starsUsed in 18 repos~4.7k tokens
    DevelopmentAuto-check passed
  • Review Spd

    zhu1090093659/spec_driven_develop

    Findings-first code review workflow for AI coding agents. An agent skill from zhu1090093659/spec_driven_develop.

    985 GitHub stars~1.5k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Speckit Tasks

    kunstmusik/blue

    Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.

    154 GitHub starsUsed in 18 repos~3k tokens
    DevelopmentAuto-check passed

More from opsmill/infrahub

All 32 skills in this repo
  • Analyzing CI Flakiness

    opsmill/infrahub

    Analyzes recent CI failures on pull requests to identify flaky tests, using retry outcomes (failed attempt → green re-run) and cross-PR recurrence as evidence, and maintains a local longitudinal…

    533 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Audit Docs

    opsmill/infrahub

    Audits internal (dev/) and external (docs/) documentation completeness for a feature, subject, or set of existing docs, maps changes indicated by the user, across Infrahub's documentation layers…

    533 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Commit

    opsmill/infrahub

    Stages and commits the current changes onto a safe working branch, enforcing branch discipline and optionally pushing upstream.

    533 GitHub stars~2.8k tokensUpdated today
    Auto-check: notes
  • A skill your agent uses when you've fixed a bug, added a feature, or made any user-facing change in a project that uses Towncrier and need to record it for the changelog — before committing or…

    533 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Creating Issues

    opsmill/infrahub

    Turns a single feature idea, improvement, or bug into ONE well-structured GitHub issue.

    533 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Creating Prd

    opsmill/infrahub

    Synthesises the current conversation context into a Product Requirements Document and publishes it to GitHub (as a comment on a referenced issue, or a new issue).

    533 GitHub stars~4k tokensUpdated today
    Auto-check passed

Categories

Questions about Speckit Review Types

What does Speckit Review Types do?

Type design analysis — encapsulation, invariant expression, usefulness, and enforcement. Speckit Review Types is an agent skill from opsmill/infrahub. Type design analysis — encapsulation, invariant expression, usefulness, and enforcement.

When should I use Speckit Review Types?

Speckit Review Types fits situations like: tasks that involve Spec-driven development.

How do I install Speckit Review Types in Claude Code?

Run `npx skills add opsmill/infrahub --skill speckit-review-types -a claude-code`. Or copy the skill folder (.agents/skills/speckit-review-types in opsmill/infrahub) into .claude/skills/speckit-review-types in your project. Claude Code loads it when a task matches its description.

How do I install Speckit Review Types in Codex?

Run `npx skills add opsmill/infrahub --skill speckit-review-types -a codex`. Or copy the skill folder (.agents/skills/speckit-review-types in opsmill/infrahub) into .agents/skills/speckit-review-types in your project. Codex loads it when a task matches its description.

Can I use Speckit Review Types in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add opsmill/infrahub --skill speckit-review-types -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/speckit-review-types, .gemini/skills/speckit-review-types, .github/skills/speckit-review-types and .opencode/skills/speckit-review-types in your project.

What does Speckit Review Types need to run?

SKILL.md names no scripts, command-line tools or credentials: Speckit Review Types is instructions for the agent only. Compatibility (from SKILL.md): Requires spec-kit project structure with .specify/ directory.

Does Speckit Review Types access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Speckit Review Types safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Speckit Review Types use?

Speckit Review Types is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Speckit Review Types use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Speckit Review Types?

Skills that share tags, products or a category with Speckit Review Types: OpenSpec Bulk Change Archiver (Fission-AI/OpenSpec, 71k stars), Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars), Speckit Plan (kunstmusik/blue, 154 stars) and Speckit Specify (kunstmusik/blue, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Speckit Review Types?

opsmill (a GitHub organization) maintains it in opsmill/infrahub, which has 533 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 9, 2026.

Source: opsmill/infrahub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.