Skip to content
cccskills
FreePublished on GitHub

StreamFlow Mypy Type Checking

This skill should be used when the user asks to "fix mypy errors", "add type annotations", "fix type checking", "resolve no-untyped-def", "fix mypy type errors", or when working with type hints while respecting StreamFlow's forbidden type constraints (no Any, dict[str, Any], etc.).

The English summary is being prepared. Showing the original description.

See how to install

Files included (3)

  • SKILL.md2.6 KB
  • no-untyped-def/SKILL.md2.6 KB
  • var-annotated/SKILL.md2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

StreamFlow Mypy Type Checking Skill

Core Constraint

See AGENTS.md for the authoritative forbidden types list. If a fix requires a forbidden type, DO NOT FIX IT. Skip the error entirely.

Sub-Skills

Error codeDescriptionSub-skill
[no-untyped-def]Function missing type annotationsStreamFlow Mypy no-untyped-def Fixer skill
[var-annotated]Variable missing type annotationStreamFlow Mypy var-annotated Fixer skill

General Workflow

  1. Classify: Can the fix use concrete types only? If NO → skip entirely
  2. Fix: Add annotations (see sub-skill for patterns)
  3. Validate — must return no output:
    git diff | grep -E "Any\b|MutableMapping\[.*Any|MutableSequence\[.*Any|list\[Any|dict\[.*Any"
    
  4. Quality check — must pass:
    uv run make format-check codespell-check typing
    
  5. Commit: Load the StreamFlow Git Workflow skill

Allowed Types Quick Reference

  • Primitives: None, bool, int, str, float, bytes
  • Concrete classes: Workflow, Connector, Port, Token, etc.
  • Unions: str | None, int | bool
  • Generics: list[str], dict[str, int], set[Token]
  • Special: Self, type[MyClass], Literal["a", "b"]

Prefer Literal over str/int for fixed value sets (statuses, connector types, mode flags).

Broad arguments, narrow returns: parameters use abstract types (Iterable, Sequence, Mapping); return types use concrete types (list, dict, set).

Annotation Patterns

# Always annotate with concrete types
def process(self, workflow: Workflow, config: WorkflowConfig) -> bool: ...

# Self for classmethods
@classmethod
async def load(cls, persistent_id: int) -> Self: ...

# Optional: use X | None, not Optional[X]
def get(self, name: str) -> Connector | None: ...

# Always annotate return types — mypy strict mode requires it
async def close(self) -> None: ...

When in doubt, skip it. Better to leave an error than violate the forbidden types constraint.

See Also

  • AGENTS.md — Forbidden types list, mandatory rules
  • StreamFlow Git Workflow skill — Commit message format and approval workflow
  • StreamFlow Code Style skill — Code style guidelines

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

This skill should be used when the user asks to "update the changelog", "add a changelog entry", "write a CHANGELOG entry", or when preparing a git commit in StreamFlow that requires updating the `## [Unreleased]` section of `CHANGELOG.md`.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

This skill should be used when the user asks to "add docstrings", "write error handling", "use naming conventions", "handle exceptions", or when writing new Python code for StreamFlow that requires docstring format, naming conventions, exception handling, or async cleanup patterns.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

This skill should be used when the user asks to "write documentation", "add a doc page", "update RST files", "add a tutorial", or when writing or editing Sphinx RST documentation for StreamFlow.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

This skill should be used when the user asks to "add an example", "write a tutorial", "document a new workflow example", or when creating a new worked example under `docs/source/examples/`.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

This skill should be used when the user asks to "write a commit message", "create a commit", "format a commit", "what commit type to use", or when preparing changes for a git commit in StreamFlow. Provides commit message format, type conventions, and examples.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

This skill should be used when the user encounters "no-untyped-def" mypy errors, asks to "fix no-untyped-def errors", "add type annotations to functions", or mentions "Function is missing a type annotation". Provides specific workflow for fixing missing type annotations while respecting forbidden type constraints.

The English summary is being prepared. Showing the original description.

alpha-unito/streamflow67Updated Oct 19, 2026

See all skills by alpha-unito

Report a problem with this skill