Skip to content
Back to skills

Types

ASecurity

Type-safe frontend types for generation workflows and SSE events. Trigger: when adding new generation types or SSE events to the frontend.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 26, 2026
ai-agentstypescriptpythonbashdockergitfrontend

Works with

  • cli

Security analysis

A100/100

Scanned October 4, 2026

npx -y skills add JNZader/repoforge --skill types --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Types?

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

Security grade badge for Types
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-types/badge)](https://www.skillsdirectory.com/skills/jnzader-types)

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: add-types-endpoint
description: >
  Type-safe frontend types for generation workflows and SSE events.
  Trigger: when adding new generation types or SSE events to the frontend.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
  complexity: medium
  token_estimate: 450
  dependencies: []
  related_skills: []
  load_priority: high
---

<!-- L1:START -->
# add-types-endpoint

Type-safe frontend types for generation workflows and SSE events.

**Trigger**: when adding new generation types or events to the frontend.
<!-- L1:END -->

<!-- L2:START -->
## Quick Reference

| Task | Pattern |
|------|---------|
| Validate user login | `User` |
| Create generation request | `GenerateRequest` |

## Critical Patterns (Summary)
- **User Pattern**: Validates `github_user_id` and `login` from `User` interface
- **GenerationRequest Pattern**: Constructs `GenerateRequest` with required `repo_url`, `mode`, and `provider`
<!-- L2:END -->

<!-- L3:START -->
## Critical Patterns (Detailed)

### User Pattern

Validates `github_user_id` and `login` from `User` interface to ensure authenticated session state before initiating generation workflows.

```typescript
import { User } from '@/lib/types';

if (!User || !User.github_user_id) {
  throw new Error('User not authenticated');
}
```
### GenerationRequest Pattern

Constructs `GenerateRequest` with required `repo_url`, `mode`, and `provider` fields to start a new generation pipeline.

```typescript
import { GenerateRequest } from '@/lib/types';

const request: GenerateRequest = {
  repo_url: 'https://github.com/example/repo',
  mode: 'skills',
  provider: 'openai',
};
```
## When to Use

- Validating authenticated user session before generation
- Constructing generation requests with proper mode and provider selection
- Handling user authentication state in generation workflows

## Commands

```bash
docker build -t repoforge/app:latest .
python repoforge/cli.py --help
```

## Anti-Patterns

### Don't: Missing required fields in GenerateRequest

<Why it's wrong: Omitting `repo_url`, `mode`, or `provider` causes runtime errors during generation pipeline initialization. All three fields are required per the `GenerateRequest` interface definition.>

```typescript
import { GenerateRequest } from '@/lib/types';

const badRequest: GenerateRequest = {
  // Missing repo_url, mode, provider — will fail validation
  mode: 'skills',
};
```
<!-- L3:END -->

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.